/* =========================================================
   SIM ADONAI - PORTAL PÚBLICO
   ========================================================= */

:root {
    --azul: #087cf0;
    --azul-oscuro: #063f70;
    --azul-footer: #003f70;
    --texto: #123b68;
    --blanco: #ffffff;
    --fondo: #f4f9fd;
    --agua: #087cf0;
    --vaso: #f53662;
    --sombra: 0 8px 25px rgba(0, 60, 120, 0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--texto);
    background: var(--fondo);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: min(1240px, 92%);
    margin: 0 auto;
}


/* =========================================================
   ENCABEZADO
   ========================================================= */

.site-header {
    height: 78px;
    background: var(--blanco);
    border-bottom: 1px solid #e4edf5;
    position: relative;
    z-index: 10;
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}


/* MARCA */

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.brand-logo {
    width: 58px;
    height: 68px;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-name {
    font-size: 41px;
    font-weight: 700;
    line-height: .95;
    letter-spacing: -1.5px;
    color: #063d6d;
}

.brand-name strong {
    color: var(--azul);
}

.brand-subtitle {
    margin-top: 7px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: 1.8px;
    color: #365b80;

    max-width: 390px;
}


/* =========================================================
   MENÚ
   ========================================================= */

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    min-width: 105px;
    height: 56px;
    padding: 7px 13px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 5px;

    border-radius: 9px;

    color: #073e6f;
    font-size: 14px;
    font-weight: 500;

    transition:
        background .2s ease,
        color .2s ease,
        transform .2s ease;
}

.nav-link span:first-child {
    font-size: 19px;
    line-height: 1;
}

.nav-link:hover,
.nav-link.active {
    background: var(--azul);
    color: #fff;
}

.nav-link:hover {
    transform: translateY(-1px);
}


/* =========================================================
   PORTADA
   ========================================================= */

.hero {
    min-height: 320px;
    position: relative;
    overflow: hidden;

    background:
        linear-gradient(
            90deg,
            rgba(255,255,255,.98) 0%,
            rgba(255,255,255,.93) 22%,
            rgba(255,255,255,.70) 40%,
            rgba(255,255,255,.22) 62%,
            rgba(255,255,255,0) 78%
        ),
        url("../img/municipalidad.jpg") center right / cover no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(255,255,255,.12) 0%,
            rgba(255,255,255,0) 65%
        );
}

.hero-content {
    min-height: 320px;

    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;
}

.hero-text {
    width: 58%;
    padding: 24px 0 24px 5px;
}

.hero-text h1 {
    font-size: clamp(25px, 4.3vw, 35px);
    line-height: .90;

    color: #073e6f;

    letter-spacing: -3px;
}

.hero-text h1 span {
    color: var(--azul);
}

.hero-text h2 {
    margin-top: 12px;

    font-size: clamp(15px, 2.1vw, 20px);
    line-height: 1.1;

    color: #153f69;
}

.hero-line {
    width: 65px;
    height: 3px;

    margin: 14px 0;

    background: var(--azul);
    border-radius: 3px;
}

.hero-text p {
    max-width: 520px;

    font-size: 16px;
    line-height: 1.4;

    color: #365b80;
}


/* =========================================================
   MÓDULOS
   ========================================================= */

.modules-section {
    padding: 20px 0 24px;

    background:
        linear-gradient(
            #f5faff,
            #eaf4fc
        );
}

.modules-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 24px;
}


/* TARJETA */

.module-card {
    min-height: 215px;

    position: relative;
    overflow: hidden;

    display: flex;
    align-items: center;

    padding: 22px 26px;

    background: #fff;

    border-radius: 12px;

    box-shadow: var(--sombra);

    border: 1px solid rgba(0, 80, 150, .08);
}


/*
   Zona decorativa lateral.
   Queda detrás de la fotografía.
*/

.module-card::after {
    content: "";

    position: absolute;

    width: 255px;
    height: 430px;

    right: -65px;
    top: -65px;

    border-radius: 55% 0 0 55%;

    opacity: .10;

    pointer-events: none;

    z-index: 0;
}

.module-agua::after {
    background: var(--agua);
}

.module-vaso::after {
    background: var(--vaso);
}


/* =========================================================
   ICONO PRINCIPAL
   ========================================================= */

.module-icon {
    flex: 0 0 70px;

    width: 70px;
    height: 70px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 34px;

    color: #fff;

    z-index: 4;

    position: relative;
}

.module-agua .module-icon {
    background: var(--agua);
}

.module-vaso .module-icon {
    background: var(--vaso);
}


/*
   Si después reemplazamos los emojis por
   Bootstrap Icons, estos tamaños quedan preparados.
*/

.module-icon i {
    font-size: 40px;
    line-height: 1;
}


/* =========================================================
   CONTENIDO DE TARJETA
   ========================================================= */

.module-content {
    position: relative;
    z-index: 5;

    /*
       Reservamos espacio para la fotografía
       que está ubicada a la derecha.
    */
    width: 64%;
    max-width: 235px;

    margin-left: 18px;

    padding-right: 5px;
}

.module-content h2 {
    font-size: 24px;
    line-height: 1.1;

    color: #082f59;

    margin-bottom: 8px;
}

.module-content p {
    font-size: 14px;
    line-height: 1.4;

    color: #45627e;

    margin-bottom: 15px;
}


/* =========================================================
   BOTONES
   ========================================================= */

.module-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 9px;

    min-width: 165px;

    padding: 9px 17px;

    border-radius: 8px;

    color: #fff;

    font-size: 14px;
    font-weight: 700;

    position: relative;
    z-index: 6;

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.module-agua .module-button {
    background: var(--agua);
}

.module-vaso .module-button {
    background: var(--vaso);
}

.module-button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 7px 17px rgba(0,0,0,.15);
}

.module-button span {
    font-size: 19px;
    line-height: 1;
}


/* =========================================================
   IMÁGENES DE LOS MÓDULOS
   ========================================================= */

/*
   La imagen queda exclusivamente en el extremo derecho.
*/

.module-image {
    position: absolute;

    right: 0;
    top: 0;
    bottom: 0;

    width: 34%;

    z-index: 2;

    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;

    /*
       Curva hacia el contenido.
       La imagen no tapa el texto.
    */
    clip-path: ellipse(82% 100% at 100% 50%);
}


/* AGUA */

.agua-image {
    background-image:
        linear-gradient(
            90deg,
            rgba(255,255,255,0) 0%,
            rgba(255,255,255,.02) 100%
        ),
        url("../img/agua.jpg");
}


/* VASO DE LECHE */

.vaso-image {
    background-image:
        linear-gradient(
            90deg,
            rgba(255,255,255,0) 0%,
            rgba(255,255,255,.02) 100%
        ),
        url("../img/vaso_leche.jpg");
}


/* =========================================================
   PIE DE PÁGINA
   ========================================================= */

.site-footer {
    color: #fff;

    background: var(--azul-footer);
}

.footer-main {
    min-height: 120px;

    display: grid;

    grid-template-columns: 1fr 1fr 1fr;

    align-items: center;

    gap: 24px;
}

.footer-brand,
.footer-info {
    display: flex;

    align-items: center;

    gap: 16px;
}

.footer-brand img {
    width: 52px;
    height: 60px;

    object-fit: contain;
}

.footer-brand div,
.footer-info div {
    display: flex;
    flex-direction: column;
}

.footer-brand strong {
    font-size: 21px;
    line-height: 1.1;
}

.footer-brand span,
.footer-info span {
    font-size: 12px;

    opacity: .9;
}

.footer-info {
    border-left: 1px solid rgba(255,255,255,.35);

    padding-left: 24px;
}

.footer-info strong {
    font-size: 15px;

    margin-bottom: 3px;
}

.footer-icon {
    font-size: 24px !important;
}


/* =========================================================
   FOOTER INFERIOR
   ========================================================= */

.footer-bottom {
    background: rgba(0,0,0,.13);
}

.footer-bottom-inner {
    min-height: 46px;

    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 20px;

    font-size: 12px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {

    .site-header {
        height: auto;
    }

    .header-inner {
        padding: 14px 0;

        flex-direction: column;
    }

    .main-nav {
        width: 100%;

        justify-content: center;

        flex-wrap: wrap;
    }

    .hero,
    .hero-content {
        min-height: 330px;
    }

    .hero-text {
        width: 68%;
    }

    .hero-text p {
        font-size: 17px;
    }

    .modules-grid {
        grid-template-columns: 1fr;
    }

    .module-card {
        min-height: 260px;
    }

    .footer-main {
        grid-template-columns: 1fr;

        padding: 30px 0;
    }

    .footer-info {
        border-left: 0;

        padding-left: 0;
    }
}

.module-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.module-button-admin {
    background: #164a7a;
}

.module-button-admin:hover {
    background: #0f3558;
}


/* =========================================================
   MÓVILES
   ========================================================= */

@media (max-width: 700px) {

    .brand {
        gap: 10px;
    }

    .brand-name {
        font-size: 31px;
    }

    .brand-logo {
        width: 60px;
        height: 70px;
    }

    .brand-subtitle {
        font-size: 9px;
        letter-spacing: 3px;
    }

    .main-nav {
        gap: 5px;
    }

    .nav-link {
        min-width: 100px;
        height: 60px;

        font-size: 12px;
    }

    .nav-link span:first-child {
        font-size: 20px;
    }


    /* PORTADA */

    .hero,
    .hero-content {
        min-height: 400px;
    }

    .hero {
        background:
            linear-gradient(
                rgba(255,255,255,.88),
                rgba(255,255,255,.88)
            ),
            url("../img/municipalidad.jpg")
            center / cover no-repeat;
    }

    .hero-text {
        width: 100%;

        padding-left: 0;
    }

    .hero-text h1 {
        font-size: 52px;

        letter-spacing: -2px;
    }

    .hero-text h2 {
        font-size: 24px;
    }

    .hero-text p {
        font-size: 15px;
    }


    /* TARJETAS */

    .module-card {
        min-height: 350px;

        padding: 28px 22px;

        align-items: flex-start;
    }

    .module-icon {
        flex-basis: 75px;

        width: 75px;
        height: 75px;

        font-size: 36px;
    }

    .module-icon i {
        font-size: 35px;
    }

    .module-content {
        width: 58%;

        margin-left: 17px;
    }

    .module-content h2 {
        font-size: 26px;
    }

    .module-content p {
        font-size: 16px;
    }

    .module-button {
        min-width: 190px;

        padding: 12px 18px;

        font-size: 16px;
    }

    .module-image {
        width: 34%;

        opacity: .75;

        clip-path: ellipse(90% 100% at 100% 50%);
    }


    /* FOOTER */

    .footer-bottom-inner {
        flex-direction: column;

        justify-content: center;

        text-align: center;

        padding: 15px 0;
    }
}