:root {
    --azul: #1f78b9;
    --azul-oscuro: #082f56;
    --azul-medio: #0d5f9f;
    --azul-claro: #62bceb;
    --verde: #3e8f58;
    --verde-profundo: #176242;
    --fondo: #f4fbff;
    --texto: #17324d;
    --muted: #5f7286;
    --blanco: #ffffff;
    --borde: #d9eaf5;
    --sombra: 0 20px 60px rgba(11, 63, 127, 0.16);
    --radius: 26px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--texto);
    background: var(--fondo);
    line-height: 1.65;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(244, 251, 255, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(217, 234, 245, 0.85);
}

.nav {
    max-width: 1220px;
    margin: auto;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
}

.brand img {
    height: 54px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 10px;
    align-items: center;
    font-weight: 800;
    color: #21445f;
}

.nav-links a {
    padding: 10px 14px;
    border-radius: 999px;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: var(--azul-oscuro);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(11, 63, 127, 0.08);
}

.nav-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border: 1px solid var(--borde);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(11, 63, 127, 0.1);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--azul-oscuro);
    border-radius: 99px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 13px 24px;
    font-weight: 900;
    cursor: pointer;
    transition: 0.2s ease;
    background: linear-gradient(135deg, var(--azul-claro), var(--azul-oscuro));
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(31, 120, 185, 0.25);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(31, 120, 185, 0.35);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.88);
    color: var(--azul-oscuro);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: none;
}

/* =========================================================
   HERO PRINCIPAL DE INICIO
   ========================================================= */

.hero {
    position: relative;
    overflow: hidden;
    display: grid;
    align-items: center;
}

.hero-full {
    min-height: calc(100vh - 84px);
}

.hero-slider {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.15s ease;
}

.hero-slide.is-active {
    opacity: 1;
}

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

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(5, 39, 74, 0.82),
        rgba(5, 39, 74, 0.42) 45%,
        rgba(5, 39, 74, 0.05)
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1220px;
    width: 100%;
    margin: auto;
    padding: 98px 22px;
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.hero h1 {
    font-size: clamp(2.6rem, 6vw, 5.9rem);
    line-height: 0.98;
    margin: 22px 0 18px;
    max-width: 900px;
}

.hero p {
    font-size: clamp(1.04rem, 2vw, 1.32rem);
    max-width: 760px;
    color: #eaf7ff;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.hero-dots {
    display: flex;
    gap: 8px;
    margin-top: 34px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 34px;
    background: #ffffff;
}

/* =========================================================
   SECCIONES GENERALES
   ========================================================= */

.section {
    padding: 86px 22px;
}

.section-inner {
    max-width: 1220px;
    margin: auto;
}

.section-overlap {
    padding-top: 70px;
}

.section-title {
    max-width: 860px;
    margin-bottom: 36px;
}

.section-title.centered {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.section-title h2,
.feature h2,
.two-col h2 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.08;
    margin: 0 0 14px;
    color: #103c65;
}

.section-title p,
.feature p,
.two-col p {
    color: var(--muted);
    font-size: 1.08rem;
}

.section-kicker {
    display: inline-block;
    color: var(--verde-profundo);
    font-weight: 1000;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    margin-bottom: 10px;
}

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

.card,
.feature-card,
.info-panel,
.mini-card,
.service-card,
.contact-panel {
    background: #ffffff;
    border: 1px solid var(--borde);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--sombra);
}

.card-body {
    padding: 26px;
}

.card h3,
.mini-card h3,
.service-card h3,
.info-panel h3 {
    margin: 0 0 10px;
    color: #103c65;
    font-size: 1.35rem;
}

.card p,
.mini-card p,
.service-card p,
.info-panel p {
    margin: 0;
    color: var(--muted);
}

.link-card {
    transition: 0.22s ease;
}

.link-card:hover {
    transform: translateY(-3px);
}

.card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.text-card .card-body {
    min-height: 230px;
}

.feature {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 40px;
    align-items: center;
}

.feature.reverse {
    grid-template-columns: 0.95fr 1.05fr;
}

.feature-card {
    padding: 34px;
}

.feature-visual {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--sombra);
    min-height: 380px;
}

.feature-visual img {
    width: 100%;
    height: 100%;
    min-height: 380px;
    object-fit: cover;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 28px;
}

.stat {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--borde);
    border-radius: 20px;
    padding: 20px;
}

.stat strong {
    display: block;
    font-size: 1.9rem;
    color: var(--azul-oscuro);
    line-height: 1.1;
}

.stat span {
    color: var(--muted);
    font-weight: 700;
}

.public-strip {
    background: linear-gradient(135deg, #eaf7ff, #f6fff8);
}

.mini-card,
.service-card {
    padding: 28px;
}

.mini-card span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #e3f5ff;
    color: var(--azul-oscuro);
    font-weight: 1000;
    margin-bottom: 16px;
}

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

/* =========================================================
   HERO INTERNO DE INTERFACES PUBLICAS
   ========================================================= */

.page-hero {
    position: relative;
    min-height: clamp(440px, 42.9vw, 690px);
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: #0b3557;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.page-hero.compact {
    min-height: clamp(430px, 42.9vw, 690px);
}

.page-hero.hero-quienes-somos {
    background-image:
        linear-gradient(
            90deg,
            rgba(5, 39, 74, 0.90) 0%,
            rgba(5, 39, 74, 0.72) 36%,
            rgba(5, 39, 74, 0.38) 63%,
            rgba(5, 39, 74, 0.10) 100%
        ),
        url("/assets/img/web/banner-quienes-somos-comunidad-acuab.png");
}

.page-hero.hero-servicios {
    background-image:
        linear-gradient(
            90deg,
            rgba(5, 39, 74, 0.90) 0%,
            rgba(5, 39, 74, 0.72) 36%,
            rgba(5, 39, 74, 0.38) 63%,
            rgba(5, 39, 74, 0.10) 100%
        ),
        url("/assets/img/web/banner-servicios-infraestructura-acuab.png");
}

.page-hero.hero-comunidad {
    background-image:
        linear-gradient(
            90deg,
            rgba(5, 39, 74, 0.90) 0%,
            rgba(5, 39, 74, 0.72) 36%,
            rgba(5, 39, 74, 0.38) 63%,
            rgba(5, 39, 74, 0.10) 100%
        ),
        url("/assets/img/web/banner-comunidad-participacion-acuab.png");
}

.page-hero.hero-calidad-agua {
    background-image:
        linear-gradient(
            90deg,
            rgba(5, 39, 74, 0.90) 0%,
            rgba(5, 39, 74, 0.72) 36%,
            rgba(5, 39, 74, 0.38) 63%,
            rgba(5, 39, 74, 0.10) 100%
        ),
        url("/assets/img/web/banner-calidad-agua-laboratorio-acuab.png");
}

.page-hero.hero-atencion {
    background-image:
        linear-gradient(
            90deg,
            rgba(5, 39, 74, 0.90) 0%,
            rgba(5, 39, 74, 0.72) 36%,
            rgba(5, 39, 74, 0.38) 63%,
            rgba(5, 39, 74, 0.10) 100%
        ),
        url("/assets/img/web/banner-atencion-usuario-acuab.png");
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(
            circle at 22% 48%,
            rgba(98, 188, 235, 0.12),
            transparent 36%
        );
}

.page-hero-content {
    position: relative;
    z-index: 2;
    max-width: 1220px;
    width: 100%;
    margin: 0 auto;
    padding: 96px 22px 72px;
    color: #ffffff;
}

.page-hero .eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.page-hero h1 {
    max-width: 760px;
    color: #ffffff;
    font-size: clamp(2.8rem, 5.2vw, 5.4rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
    margin: 0 0 24px;
}

.page-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.96);
    font-size: clamp(1.05rem, 1.7vw, 1.35rem);
    line-height: 1.65;
    margin: 0;
}

/* =========================================================
   CONTENIDO INTERNO
   ========================================================= */

.two-col {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 34px;
    align-items: start;
}

.info-panel {
    padding: 32px;
}

.clean-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.clean-list li {
    padding: 12px 0 12px 28px;
    border-bottom: 1px solid #e7f1f7;
    position: relative;
    color: var(--muted);
    font-weight: 700;
}

.clean-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--azul-claro), var(--verde));
}

.timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.timeline article {
    background: #ffffff;
    border: 1px solid var(--borde);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 14px 36px rgba(11, 63, 127, 0.08);
}

.timeline strong {
    display: inline-block;
    color: var(--verde-profundo);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    margin-bottom: 10px;
}

.timeline h3 {
    color: #103c65;
    margin: 0 0 10px;
}

.timeline p {
    color: var(--muted);
    margin: 0;
}

.muted {
    background: #eaf5fb;
}

.contact-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 34px;
}

.site-footer {
    background: #082b4a;
    color: #d9efff;
    padding: 34px 22px;
}

.footer-inner {
    max-width: 1220px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.footer-inner img {
    height: 48px;
    width: auto;
    max-width: 180px;
    filter: brightness(1.15);
}

.footer-inner p {
    margin: 4px 0;
}

.offline-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f4fbff, #dff3ff);
}

.offline-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    box-shadow: var(--sombra);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 980px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        left: 18px;
        right: 18px;
        top: 82px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        background: #ffffff;
        border: 1px solid var(--borde);
        border-radius: 22px;
        padding: 14px;
        box-shadow: var(--sombra);
    }

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

    .nav-links a {
        text-align: left;
    }

    .hero-full {
        min-height: 760px;
    }

    .feature,
    .feature.reverse,
    .two-col,
    .grid-3,
    .service-grid,
    .stats,
    .timeline {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 64px 18px;
    }

    .brand img {
        height: 48px;
    }

    .contact-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-hero,
    .page-hero.compact {
        min-height: 520px;
        background-size: cover;
        background-position: center center;
    }

    .page-hero-content {
        width: min(100% - 32px, 1180px);
        padding: 86px 0 64px;
    }

    .page-hero h1 {
        font-size: clamp(2.5rem, 13vw, 4rem);
    }
}

@media (max-width: 560px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .page-hero,
    .page-hero.compact {
        min-height: 480px;
    }

    .page-hero h1 {
        font-size: 2.4rem;
    }

    .section-title h2,
    .feature h2,
    .two-col h2 {
        font-size: 2.1rem;
    }

    .feature-card {
        padding: 24px;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-inner img {
        height: 44px;
        max-width: 170px;
    }
}