/* ==================== CONSISTENT DESIGN SYSTEM ==================== */

/* Color Scheme - Primary Variables */
:root {
    /* Brand Colors */
    --primary-green: #4CAF50;
    --dark-green: #388E3C;
    --light-green: #70C170;
    --bg-green: #DEFBDD;
    --bg-mint: #BEF8BA;

    /* Accent Colors */
    --accent-yellow: #F2C851;
    --accent-orange: #FF6700;
    --accent-brown: #A0522D;

    /* Neutral Colors */
    --text-grey: #323232;
    --text-muted: #6c757d;
    --bg-cream: #FFF1D7;
    --bg-yellow-light: #FFE7B6;
    --card-bg: #FFFFFF;

    /* Status Colors */
    --success-light: #d4edda;
    --warning-light: #fff3cd;
    --danger-light: #f8d7da;
    --info-light: #d1ecf1;

    /* Spacing System */
    --spacing-xs: 0.25rem;
    /* 4px */
    --spacing-sm: 0.5rem;
    /* 8px */
    --spacing-md: 1rem;
    /* 16px */
    --spacing-lg: 1.5rem;
    /* 24px */
    --spacing-xl: 2rem;
    /* 32px */
    --spacing-xxl: 3rem;
    /* 48px */

    /* Border Radius System */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 15px;
    --radius-xl: 20px;
    --radius-pill: 25px;

    /* Shadow System */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px rgba(34, 139, 34, 0.1);
    --shadow-lg: 0 8px 30px rgba(34, 139, 34, 0.15);
    --shadow-xl: 0 0.5rem 1.5rem rgba(14, 164, 75, 0.2);
}

/* ==================== GLOBAL STYLES ==================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--bg-green) 0%, var(--bg-mint) 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    color: var(--text-grey);
    line-height: 1.6;
}

main {
    flex: 1;
    width: 100%;
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

/* ==================== TYPOGRAPHY ==================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--primary-green);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: 20px;
}

h2 {
    font-size: 18px;
}

h3 {
    font-size: 16px;
}

h4 {
    font-size: 14px;
}

h5 {
    font-size: 12px;
}

h6 {
    font-size: 10px;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    h4 {
        font-size: 1.25rem;
    }
}

p {
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.text-primary-green {
    color: var(--primary-green) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.fw-semibold {
    font-weight: 600 !important;
}

/* Malayalam Text */
.malayalam-text {
    font-family: 'Noto Sans Malayalam', 'Inter', sans-serif;
    line-height: 1.6;
}

/* ==================== CARDS ==================== */

.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    margin-bottom: var(--spacing-lg);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    color: white !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    border: none;
    padding: var(--spacing-lg);
}

.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6 {
    color: white !important;
    margin-bottom: 0;
}

.card-header p {
    color: rgba(255, 255, 255, 0.9) !important;
    margin-bottom: 0;
}

.card-body {
    padding: var(--spacing-lg);
}

.card-title {
    color: var(--primary-green);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

/* Shadow Utilities */
.shadow-green {
    box-shadow: var(--shadow-md) !important;
}

.shadow-green-lg {
    box-shadow: var(--shadow-xl);
}

/* ==================== BUTTONS ==================== */

.btn {
    border-radius: var(--radius-md);
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

/* Primary Success Button */
.btn-success,
.btn-primary-green {
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    color: white;
    border: none;
}

.btn-success:hover,
.btn-primary-green:hover {
    background: linear-gradient(135deg, var(--dark-green), var(--primary-green));
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.3);
    color: white;
}

/* Outline Success Button */
.btn-outline-success {
    border: 2px solid var(--accent-yellow);
    color: var(--primary-green);
    background: transparent;
}

.btn-outline-success:hover {
    background: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
    transform: translateY(-1px);
}

/* Navigation Buttons */
.btn-nav-next {
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    border: none;
    border-radius: var(--radius-pill);
    padding: 12px 24px;
    font-weight: 600;
    color: white;
}

.btn-nav-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.3);
    background: linear-gradient(135deg, var(--dark-green), var(--primary-green));
    color: white;
}

.btn-nav-back {
    border: 2px solid var(--accent-yellow);
    color: var(--text-grey);
    background: transparent;
    border-radius: var(--radius-pill);
    padding: 12px 24px;
    font-weight: 600;
}

.btn-nav-back:hover {
    background: var(--accent-yellow);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(242, 200, 81, 0.3);
}

/* Button Sizes */
.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ==================== FORMS ==================== */

.form-control,
.form-select {
    border: 2px solid #e9ecef;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    font-family: 'Poppins', sans-serif;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem rgba(34, 139, 34, 0.15);
    background: white;
    outline: none;
}

.form-label {
    font-weight: 400;
    font-size: 14px;
    color: var(--primary-green);
    margin-bottom: var(--spacing-sm);
    display: block;
}

.form-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: var(--spacing-xs);
}

/* Input Groups */
.input-group {
    margin-bottom: var(--spacing-md);
}

.input-group-text {
    background: var(--bg-green);
    border: 2px solid #e9ecef;
    border-right: none;
    color: var(--primary-green);
    font-weight: 600;
}

.custom-input {
    border-radius: var(--radius-md);
}

.custom-input-icon {
    background: var(--bg-green);
    color: var(--primary-green);
    border-color: #e9ecef;
}

/* Checkboxes and Radio Buttons */
.form-check-input {
    width: 1em;
    height: 1em;
    margin-top: 0.125em;
    border: 3px solid var(--primary-green);
    background-color: white;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem rgba(34, 139, 34, 0.25);
}

.form-check-input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem rgba(34, 139, 34, 0.25);
}

.form-check-input[type="radio"] {
    border-radius: 50%;
}

.form-check-label {
    font-weight: 400;
    color: var(--primary-green);
    margin-left: var(--spacing-sm);
    cursor: pointer;
}

/* Form Sections */
.form-section-compact {
    margin-bottom: var(--spacing-lg);
}

.section-header-minimal {
    margin-bottom: var(--spacing-md);
}

/* ==================== ALERTS ==================== */

.alert {
    border: none;
    border-radius: var(--radius-md);
    border-left: 4px solid;
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.alert-info {
    background: linear-gradient(135deg, #FFE7B6, #FFE7B6);
    border-left-color: #FFE7B6;
    color: #627578;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-left-color: #ffc107;
    color: #856404;
}

.alert-success {
    background: linear-gradient(135deg, var(--success-light), #c3e6cb);
    border-left-color: #28a745;
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, var(--danger-light), #f5c6cb);
    border-left-color: #dc3545;
    color: #721c24;
}

/* ==================== TABLES ==================== */

.table {
    margin-bottom: var(--spacing-lg);
}

.comparison-table {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.comparison-table th {
    background: var(--primary-green);
    color: white;
    font-weight: 600;
    border: none;
    padding: var(--spacing-md);
}

.comparison-table td {
    padding: var(--spacing-md);
    border-color: #f8f9fa;
    vertical-align: middle;
}

.comparison-table tbody tr:hover {
    background-color: rgba(34, 139, 34, 0.05);
}

.table-responsive {
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
}

/* ==================== METRIC CARDS ==================== */

.metric-card {
    background: white;
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-green);
}

.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.12);
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-green);
    display: block;
    line-height: 1.2;
}

.metric-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: var(--spacing-sm);
    font-weight: 500;
}

.metric-change {
    font-size: 0.8rem;
    margin-top: var(--spacing-xs);
}

.metric-change.positive {
    color: #28a745;
}

.metric-change.negative {
    color: #dc3545;
}

/* Health Risk Variants */
.health-risk-low {
    background: linear-gradient(135deg, var(--success-light), #c3e6cb);
    color: #155724;
    border-left-color: #28a745;
}

.health-risk-moderate {
    background: linear-gradient(135deg, var(--warning-light), #ffeaa7);
    color: #856404;
    border-left-color: #ffc107;
}

.health-risk-high {
    background: linear-gradient(135deg, var(--danger-light), #f5c6cb);
    color: #721c24;
    border-left-color: #dc3545;
}

.health-risk-very-high {
    background: linear-gradient(135deg, #721c24, #a71e2a);
    color: white;
    border-left-color: #990000;
}

/* ==================== CHARTS ==================== */

.chart-container {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-xl);
    border: 1px solid rgba(34, 139, 34, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chart-container:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--dark-green));
}

.chart-title {
    color: var(--primary-green);
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    text-align: center;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.chart-container canvas {
    max-height: 400px !important;
    border-radius: var(--radius-sm);
    background: rgba(248, 249, 250, 0.5);
}

.chart-footnote {
    margin-top: var(--spacing-md);
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-muted);
}

/* Chart States */
.chart-container.loading {
    position: relative;
}

.chart-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(34, 139, 34, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-green);
    animation: spin 1s ease-in-out infinite;
}

.chart-error {
    background: rgba(220, 53, 69, 0.05);
    border: 2px dashed rgba(220, 53, 69, 0.2);
    border-radius: var(--radius-sm);
    padding: var(--spacing-lg);
    text-align: center;
    margin: var(--spacing-md) 0;
    transition: all 0.3s ease;
}

.chart-error:hover {
    background: rgba(220, 53, 69, 0.08);
    border-color: rgba(220, 53, 69, 0.3);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==================== PROGRESS STEPS ==================== */

.progress-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md) 0;
    margin-bottom: var(--spacing-lg);
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 150px;
}

.progress-step .step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e9ecef;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    border: 3px solid #e9ecef;
    transition: all 0.3s ease;
    z-index: 2;
}

.progress-step .step-label {
    margin-top: var(--spacing-sm);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 500;
    line-height: 1.2;
}

.progress-step.completed .step-number {
    background: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
}

.progress-step.completed .step-label {
    color: var(--primary-green);
    font-weight: 600;
}

.progress-step.active .step-number {
    background: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 4px rgba(34, 139, 34, 0.2);
    transform: scale(1.1);
}

.progress-step.active .step-label {
    color: var(--primary-green);
    font-weight: 700;
}

.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 18px;
    left: calc(50% + 18px);
    width: calc(100% - 36px);
    height: 3px;
    background: #e9ecef;
    z-index: 1;
}

.progress-step.completed:not(:last-child)::after {
    background: var(--primary-green);
}

/* ==================== HEADER ==================== */

.header-container {
    width: 100%;
    background: white;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 1000;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 5%;
    max-width: 1400px;
    margin: 0 auto;
    background: white;
}

.logo-left img {
    height: 70px;
    width: auto;
    transition: all 0.3s ease;
}

.logo-right-group {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.emc-logo {
    height: 55px;
    width: auto;
}

.green-strip {
    background: linear-gradient(90deg, var(--primary-green), var(--dark-green));
    color: white;
    padding: 0.6rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.green-strip img {
    height: 30px;
}

/* Language Dropdown */
.green-strip .dropdown .lang-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: all 0.3s ease;
}

.green-strip .dropdown .lang-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.green-strip .dropdown-menu {
    border: none;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-top: var(--spacing-sm);
}

.green-strip .dropdown-item {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.green-strip .dropdown-item:hover {
    background-color: var(--bg-green);
    color: var(--primary-green);
}

/* ==================== FOOTER ==================== */

.footer-area {
    background-color: white;
    border-top: 1px solid #e9ecef;
    padding: var(--spacing-xxl) 0 var(--spacing-lg);
    margin-top: auto;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.02);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-xxl);
    margin-bottom: var(--spacing-xl);
}

.footer-logos {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.footer-logos img {
    height: 40px;
    width: auto;
    transition: transform 0.3s;
}

.footer-logos img:hover {
    transform: scale(1.05);
}

.footer-location {
    font-size: 0.95rem;
    color: var(--text-grey);
    font-weight: 500;
}

.footer-copyright {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid #f0f0f0;
    font-size: 0.85rem;
    color: #888;
    line-height: 1.6;
}

/* ==================== HERO SECTION (INDEX PAGE) ==================== */

.hero-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    animation: fadeInUp 0.6s ease-out;
}

.hero-content {
    order: 2;
}

.hero-image-wrapper {
    order: 1;
}

.hero-image {
    width: 100%;
    height: 200px;
    border-radius: var(--radius-md);
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 0.3rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-grey);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

/* CTA Buttons */
.cta-primary {
    background: var(--light-green);
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(112, 193, 112, 0.3);
    text-decoration: none;
}

.cta-primary:hover {
    background: #5da55d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(112, 193, 112, 0.4);
}

.cta-secondary {
    background: white;
    color: var(--text-grey);
    border: 2px solid var(--accent-yellow);
    border-radius: var(--radius-pill);
    padding: 0.8rem 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    transition: all 0.3s;
    margin-top: var(--spacing-md);
    text-decoration: none;
}

.cta-secondary:hover {
    background: #fffdf5;
    color: var(--text-grey);
    transform: translateY(-1px);
}

/* Stats Section */
.stats-container {
    background: white;
    border-radius: var(--radius-lg);
    padding: 0.4rem 0.8rem;
    margin: 0.4rem 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-value {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-yellow);
    display: block;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-grey);
    margin-top: 0.3rem;
    line-height: 1.2;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: #E3E3E3;
    margin: 0 var(--spacing-sm);
}

/* ==================== INSTITUTION SELECTION ==================== */

.institution-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.institution-btn-wrapper {
    position: relative;
    height: 100%;
}

.institution-btn-wrapper input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.institution-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg) var(--spacing-md);
    background: white;
    border: 2px solid #e9ecef;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
    text-align: center;
    color: var(--text-grey);
}

.institution-btn i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--primary-green);
    transition: all 0.3s ease;
}

.institution-btn span {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
}

.institution-btn-wrapper input[type="radio"]:checked+.institution-btn {
    border-color: var(--primary-green);
    background-color: var(--bg-green);
    color: var(--primary-green);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2);
    transform: translateY(-3px);
}

.institution-btn-wrapper input[type="radio"]:checked+.institution-btn i {
    transform: scale(1.1);
}

.institution-btn:hover {
    border-color: var(--light-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* ==================== DISH SELECTION ==================== */

.dish-selection {
    max-height: 300px;
    overflow-y: auto;
    padding: var(--spacing-sm);
}

.dish-selection .form-check {
    padding: 0.2rem;
    border-radius: var(--radius-sm);
    margin-left: 15px;
    transition: background-color 0.2s;
}

.dish-selection .form-check:hover {
    background-color: rgba(76, 175, 80, 0.05);
}

/* Fuel Inline Selector */
.fuel-inline {
    min-height: 24px;
}

/* ==================== METHOD CARDS ==================== */

.method-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
}

.method-card:hover {
    border-color: var(--primary-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.method-card.selected {
    border-color: var(--primary-green);
    background-color: rgba(76, 175, 80, 0.05);
}

/* ==================== SCENARIO CARDS ==================== */

.scenario-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
}

.scenario-card:hover {
    border-color: var(--primary-green);
    transform: translateY(-2px);
}

.scenario-card.selected {
    border-color: var(--primary-green);
    background-color: rgba(76, 175, 80, 0.05);
}

/* ==================== ICONS ==================== */

.icon-small {
    font-size: 1rem;
    color: var(--primary-green);
}

.icon-medium {
    font-size: 1.5rem;
    color: var(--primary-green);
}

.icon-large {
    font-size: 2rem;
    color: var(--primary-green);
}

.icon-xl {
    font-size: 3rem;
    color: var(--primary-green);
}

.icon-xxl {
    font-size: 4rem;
    color: var(--primary-green);
}

.icon-giant {
    font-size: 5rem;
    color: var(--primary-green);
}

/* ==================== ANIMATIONS ==================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.slide-in {
    animation: slideInUp 0.5s ease-out forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation Delays */
.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Desktop (992px+) */
@media (min-width: 992px) {
    .hero-section {
        flex-direction: row-reverse;
        align-items: center;
        gap: 5rem;
        padding: 4rem 5%;
        min-height: calc(100vh - 200px);
    }

    .hero-content {
        flex: 1;
        max-width: 50%;
        order: 1;
    }

    .hero-image-wrapper {
        flex: 1;
        max-width: 50%;
        order: 2;
    }

    .hero-image {
        height: 500px;
        border-radius: var(--radius-xl);
    }

    .hero-title {
        font-size: 3.5rem;
        margin-bottom: var(--spacing-lg);
    }

    .hero-subtitle {
        font-size: 1.25rem;
        margin-bottom: 2.5rem;
    }

    .cta-primary {
        width: auto;
        padding: 1rem 3rem;
        font-size: 1.1rem;
    }

    .cta-secondary {
        width: auto;
        padding: 0.9rem 2.5rem;
        font-size: 1rem;
    }

    .stats-container {
        padding: var(--spacing-xl);
        margin: var(--spacing-xxl) 0;
        gap: var(--spacing-xxl);
    }

    .stat-value {
        font-size: 2.5rem;
    }

    .stat-label {
        font-size: 0.95rem;
    }

    .stat-divider {
        height: 60px;
    }
}

/* Tablet (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-image {
        height: 350px;
    }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 1.5rem;
        --spacing-xxl: 2rem;
    }

    .container {
        padding: 0 var(--spacing-md);
    }

    .card {
        margin-bottom: var(--spacing-md);
    }

    .card-body {
        padding: var(--spacing-md);
    }

    .hero-section {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-image {
        height: 180px;
    }

    /* Header Mobile */
    .top-bar {
        padding: 0.75rem var(--spacing-md);
    }

    .logo-left img {
        height: 50px;
    }

    .emc-logo {
        height: 40px;
    }

    .green-strip {
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .green-strip img {
        height: 24px;
    }

    .lang-text {
        display: none;
    }

    /* Progress Steps Mobile */
    .progress-container {
        padding: 0.75rem var(--spacing-sm);
        margin-bottom: var(--spacing-md);
    }

    .progress-step .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
        border-width: 2px;
    }

    .progress-step .step-label {
        font-size: 0.65rem;
        margin-top: 0.35rem;
    }

    .progress-step:not(:last-child)::after {
        top: 14px;
        left: calc(50% + 14px);
        width: calc(100% - 28px);
        height: 2px;
    }

    .progress-step.active .step-number {
        box-shadow: 0 0 0 3px rgba(34, 139, 34, 0.2);
    }

    /* Footer Mobile */
    .footer-area {
        padding: var(--spacing-xl) 0 var(--spacing-md);
    }

    .footer-top {
        flex-direction: column;
        gap: var(--spacing-xl);
    }

    .footer-logos img {
        height: 20px;
    }

    /* Charts Mobile */
    .chart-container {
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-lg);
    }

    .chart-container canvas {
        max-height: 300px !important;
    }

    .chart-title {
        font-size: 1rem;
        margin-bottom: var(--spacing-md);
    }

    /* Tables Mobile */
    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem var(--spacing-sm);
        font-size: 0.85rem;
    }

    /* Buttons Mobile */
    .btn-nav-next,
    .btn-nav-back {
        font-size: 0.9rem;
        padding: 0.8rem 1.5rem;
    }
}

/* Small Mobile (< 480px) */
@media (max-width: 480px) {
    .progress-step .step-label {
        display: none;
    }

    .progress-container {
        padding: var(--spacing-sm);
    }

    .stat-value {
        font-size: 0.8rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .stat-divider {
        height: 35px;
    }

    .comparison-table th,
    .comparison-table td {
        padding: var(--spacing-sm) 0.25rem;
        font-size: 0.8rem;
    }

    .chart-container {
        height: 250px !important;
        min-height: 250px !important;
    }
}

/* ==================== UTILITY CLASSES ==================== */

.bg-primary-green {
    background-color: var(--primary-green) !important;
}

.bg-soft-green {
    background-color: rgba(34, 139, 34, 0.05) !important;
}

.border-primary-green {
    border-color: var(--primary-green) !important;
}

/* Spacing Utilities */
.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: var(--spacing-xs) !important;
}

.mb-2 {
    margin-bottom: var(--spacing-sm) !important;
}

.mb-3 {
    margin-bottom: var(--spacing-md) !important;
}

.mb-4 {
    margin-bottom: var(--spacing-lg) !important;
}

.mt-0 {
    margin-top: 0 !important;
}

.mt-1 {
    margin-top: var(--spacing-xs) !important;
}

.mt-2 {
    margin-top: var(--spacing-sm) !important;
}

.mt-3 {
    margin-top: var(--spacing-md) !important;
}

.mt-4 {
    margin-top: var(--spacing-lg) !important;
}

.p-3 {
    padding: var(--spacing-md) !important;
}

.p-4 {
    padding: var(--spacing-lg) !important;
}

/* Width Utilities */
.w-100 {
    width: 100% !important;
}

.mw-150 {
    max-width: 150px !important;
}

.mw-100-px {
    max-width: 100px !important;
}

/* Font Size Utilities */
.fs-075 {
    font-size: 0.75rem !important;
}

.fs-09 {
    font-size: 0.9rem !important;
}

.fs-095 {
    font-size: 0.95rem !important;
}

.fs-1-1 {
    font-size: 1.1rem !important;
}

/* Display Utilities */
.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.d-flex {
    display: flex !important;
}

/* Error Container */
.error-container-dashed {
    text-align: center;
    padding: var(--spacing-lg);
    color: #dc3545;
    border: 1px dashed #dc3545;
    border-radius: var(--radius-sm);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* ==================== ANALYSIS SPECIFIC STYLES ==================== */

.analysis-container-custom {
    background-color: #f4fff4;
    margin-left: 15px;
    margin-right: 15px;
}

@media (min-width: 992px) {
    .analysis-container-custom {
        margin-left: auto;
        margin-right: auto;
    }
}

.analysis-container-custom .card-body {
    background-color: white;
    margin: 0;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
}

/* Option Cards (Analysis Selection) */
.option-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: var(--radius-md);
}

.option-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 1.25rem 2rem rgba(0, 0, 0, 0.12) !important;
}

.proceed-btn-custom {
    border: 2.5px solid var(--primary-green) !important;
    transition: all 0.35s ease;
    font-weight: 600;
}

.proceed-btn-custom:hover {
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green)) !important;
    color: white !important;
    border-color: var(--primary-green) !important;
    transform: translateY(-2px);
}

/* Recommendation Cards */
.recommendation-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    overflow: hidden;
}

.recommendation-card.top-choice {
    border-color: var(--primary-green);
    box-shadow: 0 6px 30px rgba(34, 139, 34, 0.2);
}

/* ==================== ADDITIONAL STYLES ==================== */

/* Badge Styles */
.badge {
    padding: 0.35em 0.65em;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.375rem;
}

.bg-light {
    background-color: #f8f9fa !important;
}

/* Small Text */
.small {
    font-size: 0.875rem;
}

/* Household Card (Admin) */
.household-card {
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    padding: 15px;
    margin-bottom: 15px;
    background-color: #f9f9f9;
}

.household-id {
    font-family: monospace;
    font-size: 0.9em;
    color: #666;
}

/* Quick Link Cards (Error Page) */
.quick-link-card {
    padding: var(--spacing-lg);
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    background: white;
}

.quick-link-card:hover {
    border-color: var(--primary-green);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.quick-link-card i {
    font-size: 2rem;
    color: var(--primary-green);
}

.quick-link-card p {
    color: var(--dark-green);
    font-weight: 500;
}

/* Scheme Cards (Feedback Page) */
.scheme-card {
    border-left: 4px solid #0EA44B;
    transition: all 0.3s ease;
}

.scheme-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(14, 164, 75, 0.2);
    transform: translateX(5px);
}

.form-check-input:checked~.form-check-label .card-body {
    background-color: #f0f9f4;
}

/* ============= ERROR PAGE STYLES ============= */
.error-icon i {
    font-size: 6rem;
}

.quick-link-card {
    padding: 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: white;
}

.quick-link-card:hover {
    border-color: var(--primary-green);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.quick-link-card i {
    font-size: 2rem;
    color: var(--primary-green);
}

.quick-link-card p {
    color: var(--dark-green);
    font-weight: 500;
}

@media (max-width: 768px) {
    .error-icon i {
        font-size: 4rem;
    }

    h1.display-3 {
        font-size: 3rem;
    }
}

/* ============= HOUSEHOLD PROFILE STYLES ============= */
#country_code {
    font-size: 0.95rem;
}

/* ============= ADMIN HOUSEHOLDS STYLES ============= */
.household-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #f9f9f9;
}

.household-id {
    font-family: monospace;
    font-size: 0.9em;
    color: #666;
}

/* ==================== LAYOUT & FOOTER ==================== */
main {
    flex: 1;
    width: 100%;
}

.footer-area {
    background-color: white;
    border-top: 1px solid #e9ecef;
    padding: 3rem 0 1.5rem;
    margin-top: auto;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.02);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-logos {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-logos img {
    height: 40px;
    width: auto;
    transition: transform 0.3s;
}

.footer-logos img:hover {
    transform: scale(1.05);
}

.footer-location {
    font-size: 0.95rem;
    color: var(--text-grey);
    font-weight: 500;
}

.footer-contact-title {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-green);
    font-size: 1.1rem;
}

.footer-contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-contact-links a {
    color: var(--text-grey);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.footer-contact-links a i {
    color: var(--primary-green);
    font-size: 1.1rem;
}

.footer-contact-links a:hover {
    color: var(--primary-green);
    transform: translateX(3px);
}

.footer-copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
    font-size: 0.85rem;
    color: #888;
    line-height: 1.6;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-top {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-logos img {
        height: 20px;
    }
}

/* ==================== ANALYSIS RESPONSIVE STYLES ==================== */
/* Mobile Table Optimizations */
@media (max-width: 768px) {

    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .comparison-table .badge {
        font-size: 0.75rem;
        padding: 0.35em 0.5em;
    }

    .comparison-table th i {
        font-size: 0.8rem;
    }

    .card-header h3 {
        font-size: 1.5rem;
    }

    .card-header h5 {
        font-size: 1.1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .metric-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {

    .comparison-table th,
    .comparison-table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }

    .table-responsive {
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1rem;
        border-radius: 8px;
        box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.02);
    }

    .card-header h3 {
        font-size: 1.25rem;
    }

    .chart-container {
        height: 250px !important;
        min-height: 250px !important;
    }
}

/* Analysis Selection Page Specifics */
.analysis-container-custom {
    background-color: #f4fff4;
    margin-left: 15px;
    margin-right: 15px;
}

@media (min-width: 992px) {
    .analysis-container-custom {
        margin-left: auto;
        margin-right: auto;
    }
}

.analysis-container-custom .card-body {
    background-color: white;
    margin: 7px;
    border-radius: 12px;
}

/* ==================== DISH SELECTION STYLES ==================== */
.dish-selection {
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
}

.dish-selection .form-check {
    padding: 0.2rem;
    border-radius: 8px;
    margin-left: 15px;
    transition: background-color 0.2s;
}

.dish-selection .form-check:hover {
    background-color: rgba(76, 175, 80, 0.05);
}

/* ==================== SCENARIO CARDS ==================== */
.scenario-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
}

.scenario-card:hover {
    border-color: var(--primary-green);
    transform: translateY(-2px);
}

.scenario-card.selected {
    border-color: var(--primary-green);
    background-color: rgba(76, 175, 80, 0.05);
}

/* ==================== TABLE UTILITIES ==================== */
.table-sm td,
.table-sm th {
    padding: 0.5rem;
}

/* ==================== MISC UTILITIES ==================== */
.bg-light {
    background-color: #f8f9fa !important;
}

.text-muted {
    color: #6c757d !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.small {
    font-size: 0.875rem;
}

/* ==================== PAGE-SPECIFIC UTILITIES (NEW) ==================== */

/* Tailwind-style text helpers used in tables and cards */
.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.text-gray-900 {
    color: #111827;
}

.text-gray-500 {
    color: #6b7280;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

/* Hoverable card/link wrapper used on Contact page and elsewhere */
.hover-shadow {
    transition: all 0.25s ease;
}

.hover-shadow:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.12);
    border-color: var(--primary-green) !important;
    background-color: var(--bg-green);
}

/* Wrapper that groups all per-fuel input blocks in energy assessment forms */
.fuel-details {
    border-left: 3px solid var(--primary-green);
    padding-left: 1rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

/* Container used to toggle between different calculation methods */
.method-content {
    animation: fadeIn 0.3s ease-out;
}

/* Sortable column headers in comparison tables */
.sortable {
    cursor: pointer;
    white-space: nowrap;
}

.sortable i {
    font-size: 0.85em;
    opacity: 0.6;
    margin-left: 0.15rem;
}

/* Make Bootstrap validation state a bit more visible on our green cards */
.needs-validation .form-control:invalid,
.needs-validation .form-select:invalid {
    border-color: #dc3545;
}

.needs-validation .form-control:valid,
.needs-validation .form-select:valid {
    border-color: var(--primary-green);
}

/* Utility: hide content visually but keep it for screen-readers */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
