/* Mobile / tablet overlay. Desktop styles stay in the page CSS files. */

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

@media (hover: none) {
    .lift:hover,
    .btn-pri:hover {
        transform: none;
        box-shadow: none;
    }
}

@media (max-width: 1023.98px) {
    html.is-nav-open {
        overflow: hidden;
    }

    .page-shell {
        padding-top: 68px;
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }

    .site-header {
        height: 68px;
        min-height: 68px;
        max-height: 68px;
        padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
        z-index: 80;
        overflow: visible;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: #FFFFFF;
    }

    .nav-brand img {
        height: 32px;
    }

    .nav-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        margin: 0;
        padding: 0;
        border: 0;
        background: transparent;
        cursor: pointer;
        z-index: 83;
        position: relative;
    }

    .nav-toggle-bar {
        display: block;
        width: 20px;
        height: 2px;
        border-radius: 2px;
        background: #141414;
        transition: transform .2s ease, opacity .2s ease;
    }

    html.is-nav-open .nav-toggle-bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    html.is-nav-open .nav-toggle-bar:nth-child(2) {
        opacity: 0;
    }

    html.is-nav-open .nav-toggle-bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 81;
        background: rgba(18, 24, 18, 0.42);
    }

    html.is-nav-open .nav-backdrop {
        display: block;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        bottom: auto;
        z-index: 82;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        width: 100%;
        height: auto;
        max-height: calc(100dvh - 68px);
        margin: 0;
        padding: 8px 24px calc(28px + env(safe-area-inset-bottom));
        background: #FFFFFF;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: 0 16px 40px rgba(18, 24, 18, 0.12);
    }

    html.is-nav-open .nav-links {
        display: flex;
    }

    .nav-links .nav-link,
    .nav-links .nav-link[data-nav] {
        width: auto;
        min-width: 0;
        min-height: 56px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        font-size: 22px;
        font-weight: 600;
        line-height: 1.2;
        color: #141414;
        border-bottom: 1px solid rgba(18, 24, 18, 0.10);
        text-align: left;
    }

    .nav-links .nav-link-active {
        color: #15512B;
    }

    .nav-cta {
        width: 100%;
        min-width: 0;
        justify-content: center;
        margin-top: 24px;
        height: 52px;
        min-height: 52px;
        padding: 0 22px;
        font-size: 17px;
    }

    .lang-switch {
        margin: 20px 0 0;
        align-self: flex-start;
        width: 86px;
        min-width: 86px;
    }

    .hero-header,
    .home-why,
    .stats-inner,
    .crops-section,
    .evidence-inner,
    .home-cta-wrap,
    .soluciones-header,
    .products-section,
    .services-inner,
    .how-section,
    .soluciones-cta-wrap,
    .nosotros-header,
    .nosotros-columns,
    .values-inner,
    .team-section,
    .nosotros-cta-wrap,
    .faq-header,
    .faq-list,
    .faq-cta-wrap,
    .contacto-section {
        padding-left: 20px;
        padding-right: 20px;
    }

    .footer-top,
    .footer-bottom {
        padding-left: 20px;
        padding-right: 20px;
    }

    .hero-header {
        padding-top: 48px;
        padding-bottom: 48px;
    }

    .hero-title {
        font-size: 48px;
        min-height: 144px;
        margin-bottom: 20px;
    }

    .hero-description {
        font-size: 18px;
        min-height: 84px;
        margin-bottom: 28px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .hero-btn-primary,
    .hero-btn-secondary {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 100%;
        min-width: 0;
        min-height: 48px;
        height: 48px;
        box-sizing: border-box;
    }

    .hero-media {
        height: 240px;
        border-radius: 16px;
        margin-top: 40px;
    }

    .partners-row {
        gap: 16px 24px;
        margin-top: 28px;
        align-items: center;
    }

    .partners-label {
        min-width: 0;
    }

    .partners-logo {
        height: 32px;
        max-width: 140px;
    }

    .home-why,
    .stats-inner,
    .crops-section,
    .evidence-inner,
    .how-section,
    .team-section,
    .values-inner,
    .services-inner {
        padding-top: 56px;
        padding-bottom: 56px;
    }

    .home-why-title,
    .crops-title,
    .stats-title,
    .evidence-title,
    .services-title,
    .how-title,
    .values-title,
    .team-title {
        font-size: 34px;
    }

    .benefits-grid,
    .crops-grid,
    .values-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .benefit-card {
        min-height: 0;
        padding: 24px 20px;
    }

    .stats-grid,
    .steps-grid,
    .team-grid,
    .products-grid,
    .plans-grid,
    .columns-grid,
    .contacto-grid,
    .form-row {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 48px;
    }

    .pilot-card {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 22px 20px;
    }

    .cta-home,
    .cta-page,
    .cta-faq {
        padding: 40px 24px;
        border-radius: 20px;
    }

    .cta-home .cta-title,
    .cta-page .cta-title,
    .cta-faq .cta-title {
        font-size: 32px;
    }

    .cta-home .cta-description,
    .cta-page .cta-description,
    .cta-faq .cta-description {
        font-size: 16px;
        margin-bottom: 28px;
    }

    .cta-button,
    .cta-home .cta-button,
    .cta-page .cta-button,
    .cta-faq .cta-button {
        min-width: 0;
        width: auto;
        padding: 0 28px;
    }

    .soluciones-title,
    .nosotros-title,
    .contacto-title,
    .faq-title {
        font-size: 40px;
        min-height: 82px;
    }

    .soluciones-header,
    .nosotros-header,
    .faq-header,
    .contacto-section {
        padding-top: 48px;
    }

    .product-card,
    .plan-card {
        padding: 28px 22px;
    }

    .plan-price {
        font-size: 36px;
    }

    .product-title {
        font-size: 26px;
    }

    .footer-top,
    .footer-bottom,
    .footer-links,
    .footer-legal-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .footer-top {
        padding-top: 36px;
        padding-bottom: 28px;
    }

    .footer-bottom {
        padding-bottom: calc(28px + env(safe-area-inset-bottom));
    }

    .faq-toggle {
        min-height: 56px;
        gap: 16px;
        padding: 18px 0;
    }

    .faq-question {
        font-size: 18px;
    }

    .faq-answer {
        padding-right: 8px;
        font-size: 16px;
    }

    .contact-form-card {
        padding: 24px 20px;
    }

    .contacto-description,
    .contact-value {
        max-width: none;
    }

    .contact-value {
        font-size: 18px;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 767.98px) {
    .hero-title {
        font-size: 36px;
        min-height: 108px;
        letter-spacing: -0.02em;
    }

    .hero-description,
    .soluciones-description,
    .nosotros-description,
    .faq-description,
    .contacto-description {
        font-size: 16px;
    }

    .benefits-grid,
    .crops-grid,
    .values-grid {
        grid-template-columns: 1fr;
    }

    .home-why-title,
    .crops-title,
    .stats-title,
    .evidence-title,
    .services-title,
    .how-title,
    .values-title,
    .team-title {
        font-size: 30px;
    }

    .soluciones-title,
    .nosotros-title,
    .contacto-title,
    .faq-title {
        font-size: 34px;
    }

    .cta-home .cta-title,
    .cta-page .cta-title,
    .cta-faq .cta-title {
        font-size: 28px;
    }

    .stat-value,
    .step-num {
        font-size: 40px;
    }

    .partners-label {
        font-size: 11px;
        letter-spacing: 0.12em;
    }

    .partner-name {
        font-size: 16px;
        color: #5C665E;
    }

    .page-eyebrow-label {
        letter-spacing: 0.18em;
        font-size: 12px;
    }

    .benefit-title {
        font-size: 20px;
    }

    .plan-price {
        font-size: 32px;
    }
}
