/* ============================================================
   ARCHIVO: index.css (LIMPIO / CORREGIDO)
   USO: ESTILOS EXCLUSIVOS DEL INDEX
   CAMBIOS:
   - Corregidos selectores con > (antes escapados como &gt;)
   - Eliminadas reglas no usadas: .slider-noticias-home, .acceso-admin
   - Agregados estilos para .titulo-slider y .intro-gobierno
   - Conservado todo lo que sí usa el HTML + JS
============================================================ */


/* ============================================================
   1. CONTENEDOR PRINCIPAL – SECCIÓN INICIO
============================================================ */

section#inicio {
    padding: 2rem 1rem;
    background-color: white;
    margin: 1rem auto;
    max-width: 1100px;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.15);
    text-align: center;
}

/* Título principal institucional */
section#inicio h1 {
    font-size: 2.4rem;
    font-weight: 800;
    color: #001f3f;
}

/* ✅ CORRECCIÓN: usar hijo directo con ">" (antes estaba &gt;) */
section#inicio > p {
    font-size: 1.1rem;
    color: #444; /* mejora leve de legibilidad */
}

/* ❓ Si NO usas <a class="boton"> en el home, puedes moverlo a base.css o eliminarlo
section#inicio a.boton {
    background-color: #001f3f;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
}
section#inicio a.boton:hover {
    background-color: #003366;
}
*/


/* ============================================================
   2. TARJETA VIDEO INSTITUCIONAL
============================================================ */

.card-video {
    background: white;
    border-left: 6px solid #001f3f;
    border-radius: 14px;
    padding: 2rem 1rem;
    max-width: 1000px;
    margin: 2rem auto;
    box-shadow: 0 10px 28px rgba(0,0,0,0.15);
    text-align: center;
}

/* Título del video */
.card-video .titulo-video {
    font-size: 1.75rem;
    font-weight: 800;
    color: #001f3f;
    margin-bottom: .5rem;
}

/* Texto descriptivo */
.card-video .descripcion-video {
    font-size: 1.05rem;
    color: #444;
    margin-bottom: 1.5rem;
}

/* Contenedor responsivo del video */
.card-video .contenedor-video {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 14px;
}

/* Video */
.card-video video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ============================================================
   3. SLIDER PRINCIPAL – GOBIERNO CERCANO (FADE + MICRO-ZOOM)
============================================================ */

.slider-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

.card-slider {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.10);
    border-left: 6px solid #001f3f;
    /* 🔥 Mantiene altura consistente */
    aspect-ratio: 16 / 9;
    position: relative;
}

/* El contenedor ya NO usa display:flex */
.slider {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Slides apiladas una sobre otra */
.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;

    /* Fade rápido + micro-zoom profesional */
    transform: scale(1.03);
    transition:
        opacity 0.45s ease-in-out,
        transform 0.45s ease-out;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* Slide visible */
.slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

/* Imagen dentro del slide */
.slide img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

@media (prefers-reduced-motion: reduce) {
    .slide {
        transition: none;
    }
}


/* ============================================================
   3.1 TÍTULO + INTRO DEL SLIDER (AGREGADO)
   (El HTML tiene .titulo-slider y .intro-gobierno)
============================================================ */

.titulo-slider {
    font-size: 1.75rem;
    font-weight: 800;
    color: #001f3f;
    margin-bottom: .4rem;
    text-align: center;
}

.intro-gobierno {
    font-size: 1.05rem;
    color: #555;
    margin-bottom: 1.25rem;
    text-align: center;
}


/* ============================================================
   3.1 TÍTULO + Cards(AGREGADO)
   (El HTML tiene .titulo-slider y .intro-gobierno)
============================================================ */

.titulo-cards {
    font-size: 1.75rem;
    font-weight: 800;
    color: #001f3f;
    margin-bottom: .4rem;
    
}

.intro-cards{
    font-size: 1.05rem;
    color: #555;
    margin-bottom: 1.3rem;
    
}

/* ============================================================
   4. TARJETAS MODERNAS – ACCESOS RÁPIDOS
============================================================ */

.cards-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.8rem;
    max-width: 1000px;
    margin: 0 auto;
}

.cards-modern .card {
    background: white;
    border-left: 6px solid #001f3f;
    padding: 2rem 1.4rem;
    border-radius: 12px;
    text-decoration: none;
    color: #001f3f;
    box-shadow: 0 6px 18px rgba(0,0,0,0.10);
    transition: transform .25s ease, box-shadow .25s ease;
}

.cards-modern .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 26px rgba(0,0,0,0.15);
}

.cards-modern h3 {
    font-size: 2rem;
    font-weight: 800;
}

.cards-modern p {
    font-size: .95rem;
    color: #444;
    text-align: center;
}


/* ============================================================
   BLOQUE NOTICIAS HOME
============================================================ */

.bloque-noticias {
    max-width: 1000px;
    margin: 0 auto;
}

.bloque-noticias h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #001f3f;
    margin-bottom: .4rem;
    text-align: center;
}

/* ✅ CORRECCIÓN: usar hijo directo con ">" (antes estaba &gt;) */
.bloque-noticias > p {
    color: #555;
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
    text-align: center;
}


/* ============================================================
   GRID DE NOTICIAS (SIN SLIDER)
============================================================ */

.noticias-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
}

/* Tablet */
@media (max-width: 1024px) {
    .noticias-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Móvil */
@media (max-width: 768px) {
    .noticias-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   TARJETAS DE NOTICIAS / AVISOS
   (Estructura generada por JS: .aviso-card, .aviso-info, etc.)
============================================================ */

.aviso-card {
    background: white;
    border-left: 6px solid #001f3f; /* 🔵 Borde institucional */
    border-radius: 14px;
    position: relative;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 8px 24px rgba(0,0,0,.10);
    transition: all .3s ease;
    display: flex;
    flex-direction: column;
}

.aviso-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 32px rgba(0,0,0,.18);
}

.aviso-card img {
    width: 100%;
    height: 220px;
    object-fit: contain; /* Cambia a cover si quieres recorte uniforme */
    padding: .5rem;
}

.aviso-info {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.aviso-card h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #001f3f;
    margin-bottom: .6rem;
}

.aviso-card p {
    font-size: .95rem;
    color: #444;
    line-height: 1.5;
    flex: 1;
    text-align: justify;
}

.leer-mas {
    margin-top: 1rem;
    font-weight: 600;
    color: #003366;
}


/* ============================================================
   BADGES
============================================================ */

.badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: .3rem .7rem;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 700;
    color: white;
}

.badge.noticia     { background: #001f3f; }
.badge.evento      { background: #2563eb; }
.badge.comunicado  { background: #059669; }
.badge.importante  { background: #b91c1c; }


/* ============================================================
   BOTONES
============================================================ */

.ver-todo {
    text-align: center;
    margin-top: 2rem;
}

.btn-principal {
    padding: .6rem 1.2rem;
    background: #001f3f;
    color: white;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
}

.btn-principal:hover {
    background: #003366;
}


/* ============================================================
   SEPARADOR INSTITUCIONAL
============================================================ */

.separador-institucional {
    width: 100%;
    height: 1px;
    margin: 3rem 0;
    background-color: #e5e7eb;
}


/* ============================================================
   RESPONSIVE – MOBILE
   (⚠️ Se quitaron reglas de .slider-noticias-home que no se usa)
============================================================ */

@media (max-width: 768px) {

    .aviso-card img {
        height: 200px;
        object-fit: contain; /* mejor presentación en móvil */
        margin-bottom: .5rem;
    }

    .aviso-card h3 {
        font-size: 1.15rem;
        margin-bottom: .6rem;
    }

    .aviso-card .aviso-info p {
        font-size: .95rem;
        /* Si usas line-clamp, recuerda requerir display:-webkit-box y -webkit-box-orient */
        /* -webkit-line-clamp: 2; */
    }

    .aviso-card .leer-mas {
        font-size: .85rem;
    }
}


/* ============================================================
   EXTRAS
   ❌ Eliminado: .acceso-admin (no se usa en el HTML del home)
============================================================ */

/* (vacío a propósito) */


