/* ==================================================
   HERO — TABLET
================================================== */

@media (max-width: 980px) {
    .hero {
        background-position: 58% center;
    }

    .hero-overlay {
        background:
            linear-gradient(
                90deg,
                rgba(7, 29, 47, 0.97) 0%,
                rgba(7, 29, 47, 0.88) 50%,
                rgba(7, 29, 47, 0.50) 100%
            );
    }

    .hero-content {
        padding-top: 116px;
        padding-bottom: 92px;
    }

    .hero h1 {
        max-width: 700px;
        font-size: clamp(2.7rem, 6.4vw, 4.35rem);
    }

    .hero-description {
        max-width: 690px;
    }
}


/* ==================================================
   HERO — CELULAR
================================================== */

@media (max-width: 850px) {
    .hero {
        min-height: 100svh;
        align-items: flex-end;
        background-position: 66% center;
    }

    .hero-overlay {
        background:
            linear-gradient(
                180deg,
                rgba(7, 29, 47, 0.66) 0%,
                rgba(7, 29, 47, 0.83) 38%,
                rgba(7, 29, 47, 0.98) 100%
            );
    }

    .hero::before,
    .hero::after {
        display: none;
    }

    .hero-content {
        width: 88%;
        padding-top: 118px;
        padding-bottom: 92px;
        text-align: center;
    }

    .hero-label {
        max-width: 100%;
        margin-inline: auto;
        margin-bottom: 14px;
        font-size: 0.67rem;
        letter-spacing: 0.10em;
    }

    .hero h1 {
        max-width: 620px;
        margin-inline: auto;
        margin-bottom: 21px;
        font-size: clamp(2.25rem, 10.5vw, 3.55rem);
        line-height: 1.04;
        letter-spacing: -0.04em;
    }

    .hero-description {
        max-width: 600px;
        margin-inline: auto;
        font-size: 0.94rem;
        line-height: 1.7;
    }

    .hero-buttons {
        width: min(100%, 360px);
        flex-direction: column;
        align-items: stretch;
        margin: 29px auto 0;
    }

    .hero-buttons .btn {
        width: 100%;
        min-width: 0;
    }

    .scroll-indicator {
        bottom: 16px;
        font-size: 1.45rem;
    }
}


/* ==================================================
   HERO — CELULARES PEQUEÑOS
================================================== */

@media (max-width: 480px) {
    .hero {
        background-position: 69% center;
    }

    .hero-content {
        width: 90%;
        padding-top: 106px;
        padding-bottom: 82px;
    }

    .hero h1 {
        font-size: clamp(2rem, 11vw, 2.9rem);
    }

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

/* ==================================================
   TABLETS Y PANTALLAS MEDIANAS
================================================== */

@media (max-width: 1120px) {
    .nav-links {
        gap: 11px;
    }

    .nav-links > a {
        font-size: 0.66rem;
    }

    .nav-phone {
        font-size: 0.65rem;
    }
}

@media (max-width: 980px) {
    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .service-expanded {
        grid-template-columns: 1fr;
    }

    .service-expanded-image {
        min-height: 390px;
    }

    .about-grid,
    .contact-grid,
    .sustainability-grid {
        grid-template-columns: 1fr;
    }

    .purpose-grid {
        grid-template-columns: 1fr;
    }

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

    .about-grid,
    .contact-grid,
    .sustainability-grid {
        gap: 48px;
    }

    .image-placeholder {
        min-height: 470px;
    }

    .footer-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ==================================================
   CELULARES
================================================== */

@media (max-width: 850px) {
    .navbar {
        padding: 14px 0;
        background-color: rgba(7, 29, 47, 0.97);
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 69px;
        right: -100%;
        width: min(350px, 90%);
        height: calc(100vh - 69px);
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 0;
        overflow-y: auto;
        padding: 25px;
        background-color: var(--navy-950);
        transition: right var(--transition);
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links > a {
        width: 100%;
        padding: 16px 4px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.10);
        font-size: 0.9rem;
    }

    .nav-contact {
        width: 100%;
        margin-top: 20px;
    }

    .nav-phone {
        flex: 1;
        padding: 12px;
        font-size: 0.78rem;
        text-align: center;
    }

    .nav-whatsapp {
        width: 44px;
        height: 44px;
    }


    .section {
        padding: 82px 0;
    }

    .services-grid,
    .advantages-grid,
    .experience-stats,
    .ods-grid {
        grid-template-columns: 1fr;
    }

    .service-summary {
        min-height: 325px;
    }

    .expandable-service.active {
        grid-column: auto;
    }

    .service-expanded-image {
        min-height: 290px;
    }

    .service-expanded-content {
        padding: 28px;
    }

    .service-expanded-header {
        gap: 14px;
    }

    .service-expanded-actions {
        flex-direction: column;
    }

    .service-expanded-actions .btn {
        width: 100%;
    }

    .image-placeholder {
        min-height: 390px;
    }

    .advantages-image-panel {
        min-height: 420px;
    }

    .contact-actions {
        flex-direction: column;
    }

    .contact-actions .btn {
        width: 100%;
    }

    .contact-form {
        padding: 25px;
    }

    .contact-form .btn {
        width: 100%;
    }

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

/* ==================================================
   ACCESIBILIDAD: REDUCIR ANIMACIONES
================================================== */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
