/* ==========================================
   GLOBAL STYLES & DESIGN SYSTEM
========================================== */
:root {
    --primary: #10b981;       /* Emerald Green */
    --primary-dark: #047857;  /* Dark Emerald */
    --primary-light: #ecfdf5; /* Soft Mint */
    --surface: #ffffff;
    --background: #f8fafc;    /* Clean off-white slate */
    --text-main: #0f172a;     /* Deep Navy Slate */
    --text-muted: #64748b;    /* Elegant Grey */
    --border: #e2e8f0;
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(16, 185, 129, 0.08), 0 4px 6px -4px rgba(16, 185, 129, 0.08);
    --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.06);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px;
    flex: 1;
}

/* ==========================================
   VISUAL ACCENTS (Floating Micro-details)
========================================== */
.leaf-accent {
    position: absolute;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(16,185,129,0.06) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}
.leaf-1 { top: 15%; right: 5%; }
.leaf-2 { bottom: 20%; left: 2%; }

/* ==========================================
   BRAND HEADER
========================================== */
header {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 700;
}

.logo-icon {
    color: var(--primary);
}

.accent-text {
    color: var(--primary);
}

.partner-badge {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-left: 2px solid var(--primary);
    padding-left: 10px;
}

.partner-badge strong {
    display: block;
    color: var(--text-main);
    font-size: 0.8rem;
}

/* ==========================================
   COMPONENTS: BUTTONS & VISIBILITY
========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    width: auto;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: white;
    color: var(--text-main);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: var(--background);
    border-color: var(--text-muted);
}

.hidden {
    display: none !important;
}

/* ==========================================
   1. HERO SECTION
========================================== */
.hero-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 48px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
    box-shadow: var(--shadow-lg);
    margin-top: 20px;
}

.tagline {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1.5px;
    display: inline-block;
    margin-bottom: 12px;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.hero-image-wrapper {
    position: relative;
    height: 100%;
    min-height: 280px;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.floating-badge {
    position: absolute;
    bottom: -15px;
    left: -15px;
    background: white;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--primary-dark);
}

/* ==========================================
   2. INTERACTIVE QUIZ DESIGN
========================================== */
.quiz-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    margin: 40px auto;
}

.quiz-header {
    margin-bottom: 32px;
}

.progress-bar-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

#step-indicator {
    color: var(--primary-dark);
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background-color: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 25%;
    background-color: var(--primary);
    border-radius: 4px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.question-title {
    font-size: 1.6rem;
    margin-bottom: 24px;
    font-weight: 700;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.option-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.option-card.selected {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.option-icon {
    width: 36px;
    height: 36px;
    background: var(--background);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
}

.option-card:hover .option-icon,
.option-card.selected .option-icon {
    background: var(--primary);
    color: white;
}

.option-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* ==========================================
   3. RECOMMENDATIONS & RESULTS PAGE
========================================== */
.results-wrapper {
    margin-top: 20px;
}

.results-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 40px auto;
}

.success-icon-wrap {
    display: inline-flex;
    background: var(--primary-light);
    color: var(--primary);
    padding: 12px;
    border-radius: 50%;
    margin-bottom: 16px;
}

.results-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.results-header p {
    color: var(--text-muted);
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

/* High-Quality Recommendation Cards */
.crop-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition);
}

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

.crop-image-container {
    position: relative;
    height: 180px;
    width: 100%;
}

.crop-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.match-pill {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.85);
    color: white;
    backdrop-filter: blur(4px);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Best Match Highlights */
.crop-card.best-match {
    border: 2px solid var(--primary);
    box-shadow: 0 20px 25px -5px rgba(16, 185, 129, 0.15);
}

.best-match-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: var(--shadow-sm);
}

.crop-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.crop-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    align-items: center;
}

.badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}

.badge-beginner { background: #dcfce7; color: #15803d; }
.badge-intermediate { background: #fef9c3; color: #a16207; }
.badge-pro { background: #fee2e2; color: #b91c1c; }

.time-frame {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.crop-body h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.crop-reason {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    flex: 1;
}

.crop-specs {
    border-top: 1px solid var(--border);
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-main);
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.spec-item i {
    color: var(--primary);
    width: 16px;
    height: 16px;
}

/* Insights Extra Boxes */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.insight-card {
    background: var(--surface);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.insight-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.insight-title h3 {
    font-size: 1rem;
    font-weight: 700;
}

.fact-icon { color: #eab308; }
.tip-icon { color: var(--primary); }

.insight-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.results-actions {
    text-align: center;
}

/* ==========================================
   ANIMATIONS & TRANSITIONS
========================================== */
.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   FOOTER
========================================== */
footer {
    background: #0f172a;
    color: #94a3b8;
    text-align: center;
    padding: 24px 20px;
    font-size: 0.8rem;
    border-top: 1px solid #1e293b;
}

/* ==========================================
   RESPONSIVE DESIGN RULES (Mobile-First Optimization)
========================================== */
@media (max-width: 900px) {
    .hero-card {
        grid-template-columns: 1fr;
        padding: 32px;
        gap: 24px;
    }
    .hero-image-wrapper {
        min-height: 220px;
        order: -1; /* Image stays up top on mobile devices */
    }
    .recommendations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .options-grid {
        grid-template-columns: 1fr; /* Single column flow for simple option choices */
    }
    .recommendations-grid {
        grid-template-columns: 1fr; /* Force cards stack smoothly */
    }
    .insights-grid {
        grid-template-columns: 1fr;
    }
    .hero-content h1 {
        font-size: 1.85rem;
    }
    .quiz-card {
        padding: 20px;
        margin: 20px auto;
    }
    .nav-container {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    .partner-badge {
        border-left: none;
        border-top: 2px solid var(--primary);
        padding-left: 0;
        padding-top: 4px;
        text-align: center;
    }
    .btn {
        width: 100%; /* Fully accessible interactive targets */
    }
}
/* ==========================================
   ROI CALCULATOR DASHBOARD MODIFICATIONS
========================================== */
.calculator-container {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin: 40px 0;
    box-shadow: var(--shadow-md);
}

.calc-header {
    margin-bottom: 24px;
}

.calc-icon {
    color: var(--primary);
    margin-bottom: 8px;
}

.calc-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-weight: 600;
    font-size: 0.9rem;
}

.control-group select, 
.control-group input[type="range"] {
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-family: inherit;
    background: var(--background);
}

.calc-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.calc-card {
    background: var(--background);
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--border);
}

.calc-card i {
    width: 28px;
    height: 28px;
    margin-bottom: 8px;
}

.icon-yield { color: #10b981; }
.icon-water { color: #3b82f6; }
.icon-money { color: #eab308; }

.calc-card h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.calc-card p {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

@media (max-width: 640px) {
    .calc-controls, .calc-results-grid {
        grid-template-columns: 1fr;
    }
}