/* ==========================================================================
   AGROSERVICES - Premium Light Theme (2026)
   ========================================================================== */

/* 1. Tokens (Variables) */
:root {
    /* Colors - Light Premium Agriculture Theme */
    --primary: #4CAF50;
    /* Fresh Green */
    --primary-dark: #388E3C;
    --primary-light: #E8F5E9;
    --secondary: #2C3E50;
    /* Dark slate for contrast */
    --accent: #FFC107;
    /* Harvest Gold */

    /* Neutrals */
    --bg-main: #FAFBFC;
    --bg-light: #FFFFFF;
    --bg-alt: #F3F4F6;

    --text-main: #334155;
    --text-light: #64748B;
    --text-inverse: #FFFFFF;

    /* Layout & Spacing */
    --max-width: 1280px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 20px;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Shadows - Soft & Elegant */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 25px 50px -12px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 2. Resets & Typography Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--secondary);
    line-height: 1.2;
    font-weight: 600;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    margin-inline: auto;
    padding-inline: 1.5rem;
    max-width: var(--max-width);
}

.bg-light {
    background-color: var(--bg-light);
}

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

/* 3. Utility Classes & Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

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

.delay-1 {
    transition-delay: 150ms;
}

.delay-2 {
    transition-delay: 300ms;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    font-family: var(--font-heading);
    border-radius: var(--border-radius);
    transition: var(--transition-base);
    cursor: pointer;
    border: none;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--text-inverse);
    box-shadow: 0 4px 14px 0 rgba(76, 175, 80, 0.39);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.23);
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: var(--secondary);
    border: 2px solid var(--secondary);
}

.btn-outline:hover {
    background-color: var(--secondary);
    color: var(--text-inverse);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-family: var(--font-heading);
}

.link-arrow svg {
    transition: var(--transition-fast);
}

.link-arrow:hover svg {
    transform: translateX(4px);
}

/* 4. Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: var(--transition-base);
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
    padding-block: 0.5rem;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    transition: var(--transition-base);
}

.navbar.scrolled .navbar-container {
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
}

.nav-links {
    display: none;
}

.nav-cta {
    display: none;
}

.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: max-content;
    min-width: 200px;
    background-color: var(--bg-light);
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 0;
    z-index: 1005;
    flex-direction: column;
}

.nav-dropdown:hover .dropdown-menu {
    display: flex;
}

.dropdown-menu a {
    padding: 0.75rem 1.5rem;
    color: var(--text-main) !important;
    font-weight: 400 !important;
    display: block;
    width: 100%;
}

.dropdown-menu a:hover {
    background-color: var(--bg-alt);
    color: var(--primary) !important;
}

.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    /* To be above full screen menu if needed */
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--secondary);
    border-radius: 3px;
    transition: var(--transition-base);
}

/* 5. Hero Section */
.hero {
    padding-top: 120px;
    padding-bottom: 4rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Ambient gradient background */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 80% 20%, rgba(76, 175, 80, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(255, 193, 7, 0.05) 0%, transparent 40%);
    z-index: -1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
}

.hero-content h1 span {
    color: var(--primary);
}

.hero-content p {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-collage {
    position: relative;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1.25rem;
    height: 100%;
    min-height: 400px;
    z-index: 2;
    overflow: visible;
}

.hero-collage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
}

.hero-collage img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
    z-index: 10;
    position: relative;
}

/* La decoración de cristal va primero en el HTML */
.hero-collage img:nth-child(2) {
    grid-row: 1 / -1;
    grid-column: 1 / 2;
}

.hero-collage img:nth-child(3) {
    grid-row: 1 / 2;
    grid-column: 2 / 3;
}

.hero-collage img:nth-child(4) {
    grid-row: 2 / 3;
    grid-column: 2 / 3;
}

.glass-decoration {
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    z-index: 20;
    filter: drop-shadow(0 6px 16px rgba(0,0,0,0.45));
    animation: sealFloat 4s ease-in-out infinite;
    pointer-events: none;
}

.quality-seal {
    width: 100%;
    height: 100%;
}

@keyframes sealFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(2deg); }
}

/* 6. Benefits (Nosotros) */
.benefits {
    padding-block: 5rem;
}

.benefits-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.benefit-card {
    background: var(--bg-light);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    background-color: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.benefit-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.benefit-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* 7. Products */
.products {
    padding-block: 6rem;
}

.section-header {
    margin-bottom: 4rem;
    max-width: 600px;
    margin-inline: auto;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

.product-card {
    background: var(--bg-light);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
}

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

.product-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-heading);
}

.product-content {
    padding: 2rem;
}

.product-content h3 {
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

.product-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* 8. Strip CTA */
.strip-cta {
    background-color: var(--primary-dark);
    padding-block: 5rem;
    color: white;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0));
}

.strip-cta h2 {
    color: white;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: 1rem;
}

.strip-cta p {
    opacity: 0.9;
    max-width: 600px;
    margin-inline: auto;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

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

.cta-strip-btn:hover {
    background-color: var(--bd-alt);
    color: var(--secondary);
}

/* 9. Contact Section */
.contact {
    padding-block: 6rem;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
}

.contact-info h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
}

.contact-info>p {
    color: var(--text-light);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.method {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.method .icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--bg-light);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.method h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.method p a {
    color: var(--text-light);
}

/* Modern Form */
.form-wrapper {
    background: var(--bg-light);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.modern-form .form-group {
    margin-bottom: 1.5rem;
}

.modern-form .form-row {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.modern-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
    color: var(--secondary);
}

.req {
    color: #ef4444;
}

.modern-form input,
.modern-form select,
.modern-form textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--bg-alt);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-main);
    background-color: var(--bg-alt);
    transition: var(--transition-base);
}

.modern-form input:focus,
.modern-form select:focus,
.modern-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--bg-light);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.btn-submit {
    width: 100%;
    position: relative;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
    right: 1.5rem;
}

.oculto {
    display: none;
}

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

.form-feedback {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    text-align: center;
    display: none;
}

.form-feedback.success {
    background: var(--primary-light);
    color: var(--primary-dark);
    display: block;
}

.form-feedback.error {
    background: #fee2e2;
    color: #b91c1c;
    display: block;
}

/* 10. Footer */
.footer {
    background-color: var(--secondary);
    color: var(--text-inverse);
    padding-top: 5rem;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-brand .logo {
    color: white;
    margin-bottom: 1rem;
}

.footer-brand .logo svg path {
    stroke: white;
}

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

.footer-links h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-block: 1.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.footer-bottom .credits a {
    color: var(--primary);
    font-weight: bold;
}


/* 11. Media Queries (Desktop) */
@media (min-width: 768px) {
    .benefits-container {
        grid-template-columns: repeat(3, 1fr);
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modern-form .form-row {
        flex-direction: row;
        gap: 1.5rem;
    }

    .modern-form .form-group {
        flex: 1;
    }

    .footer-container {
        grid-template-columns: 2fr 1fr 1fr;
    }

    .footer-bottom .container {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (min-width: 1024px) {

    /* Navbar Desktop */
    .mobile-menu-toggle {
        display: none;
    }

    .nav-links {
        display: flex;
        gap: 2rem;
    }

    .nav-links a {
        color: var(--secondary);
        font-weight: 500;
        font-size: 0.95rem;
    }

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

    .nav-cta {
        display: inline-flex;
    }

    /* Layouts Desktop */
    .hero-container {
        grid-template-columns: 1fr 1fr;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .contact-container {
        grid-template-columns: 1fr 1.5fr;
    }

    .hero {
        min-height: 90vh;
    }
}

/* 12. Modal Overlay & Popup Lead Capture */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-light);
    width: 90%;
    max-width: 500px;
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    position: relative;
    box-shadow: var(--shadow-hover);
    transform: translateY(30px) scale(0.95);
    transition: var(--transition-base);
    opacity: 0;
}

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

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition-fast);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-main);
    transform: scale(1.1);
}

.modal-header h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.modal-header p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}
/* === HERO SLOGAN === */
.hero-slogan {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-style: italic;
    color: var(--accent);
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

/* === STATS STRIP === */
.stats-strip {
    background: linear-gradient(135deg, #1a2a1e 0%, var(--secondary) 60%, #1a2a1e 100%);
    padding: 0;
    border-top: 3px solid var(--primary);
}

.stats-container {
    display: flex;
    align-items: stretch;
    justify-content: center;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 3rem;
    gap: 6px;
    position: relative;
    transition: background var(--transition-fast);
    flex: 1;
    min-width: 180px;
}

.stat-item:hover {
    background: rgba(255,255,255,0.04);
}

.stat-icon {
    color: var(--primary);
    margin-bottom: 4px;
    opacity: 0.9;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.5);
    text-align: center;
    max-width: 120px;
    line-height: 1.4;
}

.stat-divider {
    width: 1px;
    background: rgba(255,255,255,0.1);
    flex-shrink: 0;
    align-self: stretch;
    margin: 1.5rem 0;
}

/* === ORIGINS SECTION === */
.origins-section {
    background: var(--secondary);
    padding: 4rem 0 0;
    overflow: hidden;
}

.origins-header {
    text-align: center;
    padding: 0 2rem 3rem;
}

.origins-eyebrow {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.origins-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}

.origins-header h2 span {
    color: var(--accent);
}

.origins-sub {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.55);
    max-width: 520px;
    margin: 0 auto;
}

.origins-strip {
    display: grid;
    grid-template-columns: repeat(7, 1fr) 6px repeat(6, 1fr);
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* 7 blocks + 6 separators = correct but complex; use flex instead */
.origins-strip {
    display: flex;
    align-items: stretch;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.origin-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 2rem 1rem;
    transition: background var(--transition-fast);
    cursor: default;
}

.origin-block:hover {
    background: rgba(255,255,255,0.05);
}

.origin-flag-lg {
    font-size: 2.2rem;
    line-height: 1;
}

.origin-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.origin-info strong {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
}

.origin-info span {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.4);
    text-align: center;
    line-height: 1.3;
}

.origin-sep {
    width: 1px;
    background: rgba(255,255,255,0.08);
    flex-shrink: 0;
    align-self: stretch;
}

/* Responsive: 4-col benefits at lg */
@media (min-width: 1024px) {
    .benefits-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    .origins-strip {
        flex-wrap: wrap;
    }
    .origin-block {
        flex: 0 0 calc(100% / 4);
    }
    .origin-sep {
        display: none;
    }
}
