/* ==========================================================================
   FARMSPHERICA - PREMIUM STYLESHEET
   ========================================================================== */

/* --- Variables --- */
:root {
    --bg-color: #f6f5ef;
    --text-main: #1c2b21;
    --text-muted: #5e7265;
    --primary-dark: #0f3f2d;
    --primary-light: #e4f2e9;
    --accent-green: #90c29a;
    --white: #ffffff;
    --card-shadow: 0 12px 36px rgba(15, 63, 45, 0.06);
    --border-color: #e5e5dd;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 999px;

    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--primary-dark);
}

em {
    font-style: italic;
    color: var(--primary-dark);
}

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

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-dark);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #0a2e20;
    transform: translateY(-2px);
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    background: var(--white);
}

.btn-ghost:hover {
    background-color: #f9f9f5;
}

.btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-block {
    width: 100%;
    padding: 16px;
    font-size: 16px;
}

.pill {
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.pill:hover {
    border-color: var(--accent-green);
    color: var(--primary-dark);
}

.pill.active {
    background: var(--primary-dark);
    color: var(--white);
    border-color: var(--primary-dark);
}

/* --- Header --- */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-dark);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background-color: var(--primary-dark);
    color: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 20px;
    height: 20px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-dark);
}

.header-actions {
    display: flex;
    gap: 16px;
}

/* --- Crop Recommender Quiz --- */
.recommender-section {
    position: relative;
    z-index: 2;
}

.quiz-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quiz-btn {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-family: var(--font-body);
    font-weight: 500;
    transition: var(--transition);
    color: var(--text-muted);
}

.quiz-btn:hover {
    border-color: var(--primary-dark);
    color: var(--text-color);
}

.quiz-btn.active {
    background: var(--primary-dark);
    color: var(--white);
    border-color: var(--primary-dark);
}

.quiz-result-display {
    animation: fadeIn 0.3s ease-out;
}

.quiz-step {
    display: none;
    animation: slideUpFade 0.4s ease-out forwards;
}

.quiz-step.active {
    display: block;
}

.quiz-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    width: 100%;
    gap: 16px;
}

.quiz-actions .btn {
    flex: 1;
    display: inline-flex;
    justify-content: center;
}

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

/* --- Hero Section --- */
.hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    padding: 64px 5%;
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
}

.hero-badges {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 500;
    color: var(--primary-dark);
}

.dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-green);
    border-radius: 50%;
}

.hero-title {
    font-size: 84px;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 48px;
    max-width: 480px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 64px;
}

.hero-stats {
    display: flex;
    gap: 48px;
    border-top: 1px solid var(--border-color);
    padding-top: 32px;
}

.stat-val {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* Hero Image & Floating Card */
.hero-image-container {
    position: relative;
    width: 100%;
    height: 600px;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/hero_bright_pvc_1781374808240.png');
    background-size: cover;
    background-position: center;
    border-radius: 40px;
}

.hero-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 320px;
    box-shadow: var(--card-shadow);
    animation: float 6s ease-in-out infinite;
}

.hero-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.hero-card-rows {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.hero-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.hero-card-row span {
    color: var(--text-muted);
}

.hero-card-row strong {
    color: var(--primary-dark);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-card-result {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
}

.hero-add {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.hero-amount {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1;
}

.hero-amount span {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
}

.hero-card-targets {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* --- Section Headers --- */
.section-label {
    font-family: monospace;
    font-size: 13px;
    color: var(--accent-green);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-title {
    font-size: 56px;
    line-height: 1.1;
    margin-bottom: 64px;
    max-width: 800px;
    letter-spacing: -0.02em;
}

/* --- How It Works --- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.step-card {
    background: var(--white);
    padding: 48px 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
}

.step-number {
    font-family: monospace;
    font-size: 14px;
    color: var(--accent-green);
    margin-bottom: 24px;
}

.step-title {
    font-size: 28px;
    margin-bottom: 16px;
}

.step-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- Crops --- */
.crops-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 64px;
}

.crops-header .section-title {
    margin-bottom: 0;
}

.crops-header .section-subtitle {
    max-width: 400px;
    color: var(--text-muted);
}

.crops-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
}

.crop-showcase-card {
    grid-column: span 2;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: var(--white);
    min-height: 300px;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.crop-showcase-card.lettuce { background-image: url('assets/lettuce.png'); }
.crop-showcase-card.tomato { background-image: url('assets/tomato.png'); }
.crop-showcase-card.basil { background-image: url('assets/basil.png'); }
.crop-showcase-card.spinach { background-image: url('assets/spinach.png'); }
.crop-showcase-card.strawberry { background-image: url('assets/strawberry.png'); }

.crop-showcase-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.crop-showcase-card:nth-child(4) {
    grid-column: 2 / span 2;
}

.crop-showcase-card:nth-child(5) {
    grid-column: 4 / span 2;
}

.crop-showcase-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 60%);
    z-index: 1;
}

.crop-showcase-card>* {
    position: relative;
    z-index: 2;
}

.badge-tag {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.crop-name {
    font-size: 32px;
    color: var(--white);
    margin-bottom: 8px;
}

.crop-desc {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 24px;
    max-width: 80%;
}

.crop-stats {
    display: flex;
    gap: 24px;
}

.crop-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.crop-stat span {
    font-size: 11px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.crop-stat strong {
    font-size: 18px;
    font-weight: 600;
}

/* Backgrounds for crops - using generated images if available, else placeholder colors */
.lettuce {
    background-image: url('assets/how_it_works_3_1781367355607.png');
}

.tomato {
    background-image: url('assets/tomato_crop_1781374563648.png');
}

.basil {
    background-image: url('assets/basil_crop_1781374577162.png');
}

.spinach {
    background-image: url('assets/spinach_crop_1781374590341.png');
}

.strawberry {
    background-image: url('assets/strawberry_crop_1781374602716.png');
}


/* --- Calculator --- */
.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--white);
    border-radius: 40px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.calc-form-card {
    padding: 64px;
}

.calc-result-card {
    background: var(--primary-dark);
    padding: 64px;
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.form-group {
    margin-bottom: 32px;
}

.form-group label {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.form-group label span {
    font-weight: 400;
    color: var(--text-muted);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: var(--transition);
}

.input-wrapper:focus-within {
    border-color: var(--primary-dark);
}

.input-icon {
    color: var(--text-muted);
    margin-right: 12px;
}

.input-wrapper input {
    border: none;
    outline: none;
    font-size: 16px;
    font-family: var(--font-body);
    width: 100%;
    color: var(--primary-dark);
}

.input-unit {
    color: var(--text-muted);
    margin-left: 12px;
}

.input-stepper {
    display: flex;
    flex-direction: column;
    margin-left: 12px;
}

.input-stepper button {
    background: none;
    border: none;
    font-size: 10px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px;
}

.crop-select-btn {
    cursor: pointer;
    justify-content: space-between;
}

.crop-select-btn .placeholder {
    color: var(--text-muted);
}

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

.stage-option {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.stage-option svg {
    color: var(--text-muted);
}

.stage-option span {
    font-size: 14px;
    font-weight: 500;
}

.stage-option small {
    font-size: 12px;
    color: var(--text-muted);
}

.stage-option.active {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
}

.stage-option.active svg,
.stage-option.active small {
    color: var(--primary-light);
}

.form-actions {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-top: 48px;
}

/* Result Area */
.result-placeholder {
    text-align: center;
}

.placeholder-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px;
}

.result-placeholder h3 {
    color: var(--white);
    font-size: 32px;
    margin-bottom: 16px;
}

.result-placeholder p {
    color: rgba(255, 255, 255, 0.7);
    max-width: 300px;
    margin: 0 auto;
}

/* Actual Result Content (Injected via JS) */
.result-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.result-top-badges {
    display: flex;
    gap: 12px;
    margin-bottom: 48px;
}

.result-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-crop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 64px;
}

.result-crop-name {
    font-family: var(--font-heading);
    font-size: 40px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.result-stage {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: 14px;
}

.result-calc-area {
    margin-bottom: 64px;
}

.result-add-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 16px;
}

.result-big-number {
    font-family: var(--font-heading);
    font-size: 120px;
    line-height: 1;
    font-weight: 700;
}

.result-big-number span {
    font-family: var(--font-body);
    font-size: 32px;
    font-weight: 500;
    color: var(--accent-green);
}

.result-targets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: auto;
}

.target-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 24px;
}

.target-card span {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.target-card strong {
    font-size: 28px;
    font-weight: 600;
}

.target-card strong small {
    font-size: 14px;
    font-weight: 400;
}

.growing-tip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 48px;
    color: var(--accent-green);
    font-size: 14px;
    line-height: 1.6;
}


/* --- PPM & EC (Dark Section) --- */
.dark-section {
    background-color: var(--primary-dark);
    color: var(--white);
}

.dark-section .section-title {
    color: var(--white);
}

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

.primer-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 48px;
}

.primer-tag {
    font-family: monospace;
    color: var(--accent-green);
    margin-bottom: 24px;
}

.primer-card h3 {
    color: var(--white);
    font-size: 24px;
    margin-bottom: 16px;
}

.primer-card p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* --- Lists Section --- */
.lists-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
}

.list-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.list-header h3 {
    font-size: 32px;
    font-weight: 700;
}

.list-header span {
    font-family: monospace;
    font-size: 12px;
    color: var(--text-muted);
}

.mix-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.mix-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mix-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mix-details {
    font-size: 14px;
    font-weight: 500;
}

.mix-details span {
    color: var(--text-muted);
    font-weight: 400;
}

.mix-time {
    font-size: 13px;
    color: var(--text-muted);
}

.top-crop-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.top-crop-info {
    display: flex;
    align-items: center;
    gap: 24px;
}

.top-rank {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-green);
    text-shadow: 1px 1px 0 var(--primary-dark);
}

.top-crop-name {
    font-size: 18px;
    font-weight: 600;
}

.top-badge {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 500;
}

/* --- Testimonials --- */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.testimonial-card {
    background: var(--white);
    padding: 48px;
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
}

.quote-icon {
    color: var(--accent-green);
    margin-bottom: 24px;
}

.testimonial-card p {
    font-family: var(--font-heading);
    font-size: 20px;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 32px;
    flex-grow: 1;
}

.author strong {
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
}

.author span {
    font-size: 13px;
    color: var(--text-muted);
}

/* --- Footer --- */
.site-footer {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 100px 5% 48px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 64px;
    margin-bottom: 100px;
}

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 24px;
}

.footer-brand .logo-icon {
    background: var(--accent-green);
    color: var(--primary-dark);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    max-width: 300px;
}

.footer-links h4,
.footer-disclaimer h4 {
    color: var(--white);
    font-size: 16px;
    margin-bottom: 24px;
}

.footer-links a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: 12px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-disclaimer p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    line-height: 1.6;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 32px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

/* --- Modals (Crop & Sprout) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    padding: 48px;
    position: relative;
    transform: translateY(20px);
    transition: var(--transition);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: var(--bg-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background: #e0e0d5;
}

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

.modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 32px;
    margin-bottom: 8px;
}

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

.search-container {
    position: relative;
    margin-bottom: 24px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-container input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 1px solid var(--primary-dark);
    border-radius: var(--radius-md);
    font-size: 16px;
    outline: none;
}

.filter-pills {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.crop-grid-modal {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.crop-list-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.crop-list-item:hover {
    border-color: var(--primary-dark);
    background: #f9f9f9;
}

.crop-list-img {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: 8px;
    margin-right: 16px;
    background-size: cover;
    background-position: center;
}

.crop-list-info {
    flex-grow: 1;
}

.crop-list-info strong {
    display: block;
    font-size: 16px;
}

.crop-list-info span {
    font-size: 13px;
    color: var(--text-muted);
}

/* Skeleton Loaders */
.skeleton-line {
    height: 48px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    margin-bottom: 12px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* --- Sprout AI Styles --- */
.sprout-content {
    max-width: 600px;
}

.sprout-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.sprout-chat-area {
    background: var(--primary-dark);
    border-radius: var(--radius-md);
    padding: 24px;
    color: var(--white);
    margin-bottom: 24px;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    gap: 16px;
}

#sprout-modal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden; /* Only the chat area inside should scroll */
}

#sprout-modal .modal-header,
#sprout-modal .sprout-suggestions,
#sprout-modal .sprout-input-area {
    flex-shrink: 0;
}

#sprout-modal .sprout-chat-area {
    flex-grow: 1;
    max-height: none;
}

.sprout-chat-area p.placeholder-text {
    opacity: 0.8;
    margin: auto 0;
    text-align: center;
}

.chat-message {
    display: flex;
    flex-direction: column;
}

.chat-message.user {
    align-items: flex-end;
}

.chat-message.ai {
    align-items: flex-start;
}

.chat-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 85%;
    font-size: 15px;
    line-height: 1.5;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform-origin: bottom left;
}

.chat-message.ai .chat-bubble {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-bottom-left-radius: 4px;
}

.chat-message.user .chat-bubble {
    background: var(--accent-green);
    color: var(--primary-dark);
    border-bottom-right-radius: 4px;
    transform-origin: bottom right;
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 4px 8px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--primary-dark);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

.sprout-chat-area p {
    opacity: 0.8;
}

.sprout-input-area {
    display: flex;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    padding: 6px 8px 6px 24px;
    box-shadow: 0 4px 16px rgba(15, 63, 45, 0.05);
}

.sprout-input-area input {
    flex-grow: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    outline: none;
    padding: 8px 0;
    font-family: var(--font-body);
}

.sprout-input-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sprout-voice-btn,
.sprout-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.sprout-voice-btn {
    background: transparent;
    color: var(--text-muted);
}

.sprout-voice-btn:hover {
    color: var(--primary-dark);
    background: #f0f0e8;
}

@keyframes recordingPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; color: #ff3b30; }
    100% { transform: scale(1); opacity: 1; }
}

.sprout-voice-btn.is-recording {
    color: #ff3b30;
    animation: recordingPulse 1s infinite;
}

.sprout-send-btn {
    background: var(--primary-dark);
    color: var(--white);
}

.sprout-send-btn:hover {
    background: #0a2e20;
    transform: scale(1.05);
}

/* --- Custom Mic Fallback Prompt --- */
.custom-prompt-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 63, 45, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.custom-prompt-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 90%;
    max-width: 680px;
    position: relative;
    box-shadow: 0 24px 64px rgba(15, 63, 45, 0.4);
    max-height: 90vh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.custom-prompt-content {
    background: var(--bg-color);
    padding: 32px;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 400px;
    box-shadow: 0 24px 64px rgba(15, 63, 45, 0.4);
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-prompt-overlay.active .custom-prompt-content {
    transform: translateY(0);
}

.custom-prompt-content h3 {
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.custom-prompt-content p {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 24px;
    line-height: 1.5;
}

.custom-prompt-content input {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 16px;
    outline: none;
    background: var(--white);
    margin-bottom: 24px;
    font-family: var(--font-body);
}

.custom-prompt-content input:focus {
    border-color: var(--primary-dark);
}

.custom-prompt-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

@keyframes sproutGlow {
    0% {
        box-shadow: 0 8px 24px rgba(15, 63, 45, 0.3), 0 0 0 0 rgba(107, 144, 128, 0.4);
    }
    70% {
        box-shadow: 0 8px 24px rgba(15, 63, 45, 0.3), 0 0 0 15px rgba(107, 144, 128, 0);
    }
    100% {
        box-shadow: 0 8px 24px rgba(15, 63, 45, 0.3), 0 0 0 0 rgba(107, 144, 128, 0);
    }
}

.floating-sprout-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: var(--primary-dark);
    color: var(--white);
    padding: 16px 24px;
    border-radius: var(--radius-pill);
    border: none;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(15, 63, 45, 0.3);
    cursor: pointer;
    transition: var(--transition);
    z-index: 900;
    animation: sproutGlow 3s infinite;
}

.floating-sprout-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 32px rgba(15, 63, 45, 0.5);
    animation: none;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

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

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

@keyframes float {
    0% { transform: translate(-50%, -50%); }
    50% { transform: translate(-50%, calc(-50% - 15px)); }
    100% { transform: translate(-50%, -50%); }
}

.hero-content>* {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.hero-badges {
    animation-delay: 0.1s;
}

.hero-title {
    animation-delay: 0.2s;
}

.hero-subtitle {
    animation-delay: 0.3s;
}

.hero-actions {
    animation-delay: 0.4s;
}

.hero-stats {
    animation-delay: 0.5s;
}

.hero-image-container {
    opacity: 0;
    animation: slideInRight 1s cubic-bezier(0.25, 0.8, 0.25, 1) 0.3s forwards;
}

.fade-in-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive Design (Tablets & Phones) --- */
@media (max-width: 1024px) {

    .hero,
    .steps-grid,
    .quiz-questions-grid,
    .calculator-container,
    .primer-grid,
    .lists-container,
    .testimonials-grid {
        grid-template-columns: 1fr !important;
    }

    .crops-grid {
        display: flex;
        flex-direction: column;
    }
    .crop-showcase-card {
        grid-column: auto !important;
        flex: 1 1 100%;
        min-height: 300px;
    }

    .hero-image-container {
        height: 400px;
    }

    .hero-card {
        width: 90%;
        max-width: 320px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 60px 5%;
    }

    .site-header {
        flex-direction: column;
        gap: 20px;
        padding: 20px 5%;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }

    .hero-title {
        font-size: 56px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }

    .section-title {
        font-size: 40px;
        margin-bottom: 40px;
    }

    .step-card {
        padding: 32px 24px;
    }

    .crops-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .calc-form-card,
    .calc-result-card {
        padding: 32px 24px;
    }

    .stage-options {
        grid-template-columns: 1fr;
    }

    .form-actions {
        grid-template-columns: 1fr;
    }

    .result-crop-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .result-big-number {
        font-size: 80px;
    }

    .result-targets {
        grid-template-columns: 1fr;
    }

    .primer-card,
    .testimonial-card {
        padding: 32px 24px;
    }

    .mix-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .floating-sprout-btn {
        bottom: 16px;
        right: 16px;
        padding: 12px 16px;
        font-size: 14px;
    }

    .modal-content {
        padding: 24px;
        width: 95%;
    }

    .sprout-input-area {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 44px;
    }

    .hero-actions,
    .quiz-actions {
        flex-direction: column;
        align-items: stretch !important;
        gap: 16px;
    }

    .crop-stats {
        flex-wrap: wrap;
        gap: 12px;
    }

    .result-big-number {
        font-size: 64px;
    }
}