
/* =========================================
   DIF LA YESCA
   HOJA DE ESTILOS PRINCIPAL
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');


/* 1. CONFIGURACION GENERAL */

:root {
    --azul-oscuro: #16324F;
    --azul: #246B9E;
    --azul-celeste: #87CEEB;
    --azul-claro: #EAF5FC;
    --blanco: #FFFFFF;
    --rosa: #F2B8D5;
    --vino: #951316;
    --texto: #344256;
    --texto-suave: #64748B;
    --fondo: #F5F8FC;
    --borde: #E1E8F0;
    --sombra: 0 12px 32px rgba(22, 50, 79, 0.10);
    --radio: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
}

body {
    min-width: 320px;
    color: var(--texto);
    background: var(--fondo);
    font-family: 'Poppins', Arial, sans-serif;
    line-height: 1.7;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

button,
input {
    font: inherit;
}

.container {
    width: min(1200px, 92%);
    margin-right: auto;
    margin-left: auto;
}

section[id] {
    scroll-margin-top: 24px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* 2. ENCABEZADO PRINCIPAL */

.header {
    position: relative;
    min-height: 85vh;
    padding-bottom: 35px;
    overflow: visible;

    background-image:
        linear-gradient(
            120deg,
            rgba(10, 28, 48, 0.76),
            rgba(10, 28, 48, 0.24)
        ),
        url("dif_imagenes/760587865_122175625586634845_7108192113551954833_n.jpg");

    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}


/* 3. MENU Y LOGOTIPO */

.menu-container {
    position: relative;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    width: min(1200px, 96%);
    margin: 0 auto;
    padding: 16px 24px;

    background: rgba(255, 255, 255, 0.97);
    border-radius: 0 0 18px 18px;
    box-shadow: 0 5px 22px rgba(0, 0, 0, 0.10);
}

.logo {
    color: var(--vino);
    font-size: clamp(1.3rem, 2.4vw, 2rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

#menu {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.menu-container > label[for="menu"] {
    display: none;
}

.navbar {
    display: block;
}

.navbar ul {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
}

.navbar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 11px;

    color: var(--azul-oscuro);
    border-radius: 10px;

    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1px;

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease;
}

.navbar a:hover {
    color: var(--azul);
    background: var(--azul-claro);
}

.navbar a:focus-visible,
.logo:focus-visible,
.menu-container > label[for="menu"]:focus-visible {
    outline: 3px solid var(--azul-celeste);
    outline-offset: 3px;
}


/* 4. PRESENTACION PRINCIPAL */

.header-content.container {
    display: flex;
    align-items: center;
    justify-content: flex-start;

    min-height: calc(85vh - 80px);
    padding-top: 55px;
    padding-bottom: 55px;

    text-align: left;
}

.header-info {
    width: 100%;
    max-width: 660px;
    padding: clamp(24px, 4vw, 44px);

    background: rgba(255, 255, 255, 0.96);
    border-left: 6px solid var(--azul-celeste);
    border-radius: var(--radio);
    box-shadow: var(--sombra);
}

.header-info h1 {
    margin-bottom: 18px;

    color: var(--azul-oscuro);
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
}

.header-info p {
    margin-bottom: 25px;

    color: var(--texto);
    font-size: 1rem;
    line-height: 1.9;
}


/* 5. BOTONES */

.btn-1,
.btn-2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 46px;
    padding: 11px 20px;

    color: var(--blanco);
    background: var(--azul);

    border: 2px solid var(--azul);
    border-radius: 50px;

    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;

    cursor: pointer;

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.btn-1:hover,
.btn-2:hover {
    color: var(--azul-oscuro);
    background: var(--azul-celeste);
    border-color: var(--azul-celeste);

    transform: translateY(-2px);

    box-shadow: 0 6px 16px rgba(22, 50, 79, 0.15);
}

.btn-1:focus-visible,
.btn-2:focus-visible {
    outline: 3px solid var(--vino);
    outline-offset: 4px;
}

button.btn-2 {
    font-family: inherit;
}


/* 6. SECCIONES INFORMATIVAS */

.seccion-documentos {
    margin-top: 48px;
    margin-bottom: 48px;
    padding: clamp(24px, 4vw, 44px);

    background: var(--blanco);
    border: 1px solid var(--borde);
    border-top: 5px solid var(--azul);
    border-radius: var(--radio);
    box-shadow: var(--sombra);
}

.seccion-encabezado {
    max-width: 900px;
    margin-bottom: 25px;
}

.seccion-etiqueta {
    display: inline-block;
    margin-bottom: 8px;

    color: var(--azul);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1.2px;
}

.seccion-encabezado h2 {
    margin-bottom: 12px;

    color: var(--azul-oscuro);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    line-height: 1.3;
}

.seccion-encabezado p {
    color: var(--texto-suave);
    line-height: 1.9;
}


/* 7. CUADRICULA Y TARJETAS DE DOCUMENTOS */

.documentos-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(min(100%, 260px), 1fr));

    align-items: stretch;
    gap: 20px;
}

.documento-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;

    min-width: 0;
    padding: 22px;

    background: var(--fondo);
    border: 1px solid var(--borde);
    border-radius: 16px;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.documento-card:hover {
    transform: translateY(-3px);
    border-color: var(--azul-celeste);
    box-shadow: var(--sombra);
}

.documento-info {
    min-width: 0;
}

.documento-info h3 {
    margin-bottom: 9px;

    color: var(--azul-oscuro);
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.45;

    overflow-wrap: anywhere;
}

.documento-info p {
    margin-bottom: 14px;

    color: var(--texto-suave);
    font-size: 0.92rem;
    line-height: 1.75;

    overflow-wrap: anywhere;
}

.documento-tipo {
    display: inline-block;
    padding: 5px 10px;

    color: var(--azul);
    background: var(--azul-claro);
    border-radius: 6px;

    font-size: 0.76rem;
    font-weight: 700;
}

.documento-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.documento-acciones .btn-2 {
    flex: 1 1 130px;
    min-width: 0;
}

.mensaje-vacio {
    grid-column: 1 / -1;
    padding: 20px;

    color: var(--texto-suave);
    background: var(--fondo);

    border: 1px dashed #B8C9D8;
    border-radius: 12px;

    text-align: center;
}


/* 8. BUSCADOR DEL APARTADO ARCHIVO */

.archivo-controles {
    max-width: 650px;
    margin: 0 0 24px;
}

.archivo-controles label {
    display: block;
    margin-bottom: 8px;

    color: var(--azul-oscuro);
    font-size: 0.9rem;
    font-weight: 700;
}

.archivo-controles input {
    width: 100%;
    min-height: 48px;
    padding: 11px 15px;

    color: var(--texto);
    background: var(--blanco);

    border: 1px solid #C9D6E2;
    border-radius: 10px;

    outline: none;
}

.archivo-controles input:focus {
    border-color: var(--azul);
    box-shadow: 0 0 0 3px rgba(36, 107, 158, 0.13);
}

.archivo-resultados {
    min-height: 24px;
    margin-top: 8px;

    color: var(--texto-suave);
    font-size: 0.82rem;
}


/* 9. PIE DE PAGINA */

.footer.container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;

    margin-top: 70px;
    padding-top: 30px;
    padding-bottom: 35px;

    border-top: 1px solid var(--borde);
}

.footer h3 {
    color: var(--vino);
    font-size: 1.5rem;
    font-weight: 800;
}

.footer .links ul {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.footer .links a {
    color: var(--azul-oscuro);
    font-size: 0.82rem;
    font-weight: 600;

    transition: color 0.2s ease;
}

.footer .links a:hover {
    color: var(--azul);
}


/* 10. VISOR PDF MODAL */

.visor-dialog {
    width: min(1100px, 94vw);
    max-width: none;

    height: min(90vh, 900px);
    max-height: 90vh;

    margin: auto;
    padding: 0;
    overflow: hidden;

    color: var(--texto);
    background: var(--blanco);

    border: 1px solid var(--borde);
    border-radius: 16px;

    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.visor-dialog::backdrop {
    background: rgba(9, 23, 38, 0.78);
    backdrop-filter: blur(3px);
}

.visor-contenido {
    display: flex;
    flex-direction: column;

    width: 100%;
    height: 100%;
}

.visor-encabezado {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    min-height: 60px;
    padding: 10px 18px;

    background: var(--blanco);
    border-bottom: 1px solid var(--borde);
}

.visor-encabezado h2 {
    color: var(--azul-oscuro);
    font-size: 1rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.visor-cerrar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;

    width: 40px;
    height: 40px;

    color: var(--azul-oscuro);
    background: var(--azul-claro);

    border: 0;
    border-radius: 50%;

    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
}

.visor-cerrar:hover {
    color: var(--blanco);
    background: var(--azul);
}

.visor-contenido iframe {
    display: block;
    flex: 1 1 auto;

    width: 100%;
    min-height: 0;

    border: 0;
    background: #EEF2F6;
}


/* 11. EVENTOS */

.DIF.EVENTOS {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);

    align-items: center;
    gap: clamp(24px, 4vw, 48px);

    width: min(1200px, 92%);
    margin: 55px auto;
    padding: clamp(22px, 3.5vw, 42px);

    background: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: 24px;
    box-shadow: var(--sombra);
}

.ALIM-1 {
    min-width: 0;
}

.ALIM-1 h2 {
    margin-bottom: 20px;

    color: var(--azul-oscuro);
    font-size: clamp(1.6rem, 2.7vw, 2.35rem);
    font-weight: 800;
    line-height: 1.3;
}

.ALIM-1 h2 span {
    color: var(--azul);
}

.ALIM-1 p {
    margin-bottom: 24px;

    color: var(--texto-suave);
    font-size: 0.96rem;
    line-height: 1.9;

    overflow-wrap: anywhere;
}

.ALIM-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    align-items: center;
    gap: 14px;

    min-width: 0;
}

.ALIM-2 img {
    width: 100%;
    height: clamp(200px, 25vw, 340px);

    object-fit: cover;
    object-position: center;

    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(22, 50, 79, 0.12);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.ALIM-2 .img-2 {
    margin-top: 35px;
}

.ALIM-2 img:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(22, 50, 79, 0.18);
}


/* 12. RESPONSIVE: TABLETAS Y MOVILES */

@media (max-width: 1100px) {

    .menu-container {
        flex-wrap: wrap;
        justify-content: space-between;

        width: 100%;
        padding: 13px 5%;

        border-radius: 0;
    }

    .menu-container > label[for="menu"] {
        display: inline-flex;
        align-items: center;
        justify-content: center;

        width: 46px;
        height: 46px;

        color: var(--azul-oscuro);
        background: var(--azul-claro);

        border: 1px solid #D5E8F6;
        border-radius: 12px;

        cursor: pointer;
        user-select: none;
    }

    .menu-container > label[for="menu"] img {
        display: none;
    }

    .menu-container > label[for="menu"]::before {
        content: "☰";
        font-size: 1.65rem;
        line-height: 1;
    }

    .navbar {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;

        max-height: 0;
        padding: 0 5%;

        overflow: hidden;
        visibility: hidden;
        opacity: 0;

        background: var(--blanco);
        border-radius: 0 0 16px 16px;

        transform: translateY(-6px);

        transition:
            max-height 0.3s ease,
            padding 0.3s ease,
            opacity 0.2s ease,
            transform 0.2s ease,
            visibility 0.2s ease;
    }

    #menu:checked ~ .navbar {
        max-height: 600px;
        padding: 12px 5% 22px;

        overflow-y: auto;
        visibility: visible;
        opacity: 1;

        transform: translateY(0);

        box-shadow: 0 14px 20px rgba(22, 50, 79, 0.12);
    }

    .navbar ul {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }

    .navbar a {
        display: flex;
        width: 100%;
        padding: 11px 14px;
        font-size: 0.88rem;
    }

    .header {
        min-height: auto;
    }

    .header-content.container {
        width: 90%;
        min-height: 60vh;
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .DIF.EVENTOS {
        gap: 24px;
        padding: 25px;
    }

}


@media (max-width: 760px) {

    .seccion-documentos {
        width: 90%;
        margin-top: 32px;
        margin-bottom: 32px;
        padding: 23px;
    }

    .DIF.EVENTOS {
        grid-template-columns: minmax(0, 1fr);

        width: 90%;
        margin: 32px auto;
        padding: 23px;
        gap: 25px;

        border-radius: 19px;
    }

    .ALIM-1 h2 {
        font-size: clamp(1.55rem, 6vw, 2rem);
    }

    .ALIM-1 p {
        font-size: 0.93rem;
    }

    .ALIM-2 img {
        height: clamp(190px, 48vw, 290px);
    }

    .ALIM-2 .img-2 {
        margin-top: 22px;
    }

    .footer.container {
        width: 90%;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        margin-top: 45px;
    }

    .footer .links ul {
        justify-content: flex-start;
        gap: 12px 18px;
    }

}


@media (max-width: 480px) {

    .logo {
        font-size: 1.15rem;
    }

    .header-info {
        padding: 21px;
    }

    .ALIM-2 {
        gap: 8px;
    }

    .ALIM-2 img {
        height: 175px;
        border-radius: 12px;
    }

    .documento-card {
        padding: 18px;
    }

    .documento-acciones {
        flex-direction: column;
    }

    .documento-acciones .btn-2 {
        width: 100%;
    }

    .visor-dialog {
        width: 96vw;
        height: 88vh;
        max-height: 88vh;
        border-radius: 10px;
    }

    .visor-encabezado {
        padding: 8px 12px;
    }

    .visor-encabezado h2 {
        font-size: 0.9rem;
    }

}


/* 13. ACCESIBILIDAD: REDUCIR ANIMACIONES */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

}

