/* ============================================================
   ARCHIVO: index.css
   USO: ESTILOS EXCLUSIVOS DEL INDEX
   DESCRIPCIÓN:
   Define la estructura visual principal del Home:
   - Contenedor institucional
   - Video destacado
   - Slider principal
   - Accesos rápidos
   - Noticias
============================================================ */


/* ============================================================
   1. CONTENEDOR PRINCIPAL – SECCIÓN INICIO
   ------------------------------------------------------------
   Envuelve TODO el contenido del home:
   - Títulos
   - Video
   - Slider
   - Tarjetas
   - Noticias
============================================================ */

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;
}

/* Texto descriptivo debajo del título */
section#inicio > p {
    font-size: 1.1rem;
}

/* Botón principal (opcional) */
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
   ------------------------------------------------------------
   Video destacado con identidad municipal
============================================================ */

.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 */
.slide img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

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


/* ============================================================
   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: 1100px;
    margin: 2.5rem auto;
    padding: 2rem 1rem;

    text-align: center;
}

.bloque-noticias h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #001f3f;
    margin-bottom: .8rem;
}

.bloque-noticias > p {
    color: #555;
    margin-bottom: 2rem;
}


/* ============================================================
   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
============================================================ */

.aviso-card {
    background: white;
    border-left: 6px solid #001f3f; /* 🔵 TU 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;
}

.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;
}


/* ============================================================
   6. 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; }


/* ============================================================
   7. 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;
}


/* ============================================================
   8. SEPARADOR INSTITUCIONAL
============================================================ */

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


/* ============================================================
   9. RESPONSIVE – MOBILE
============================================================ */

@media (max-width: 768px) {

    .slider-noticias-home {
        padding: 0;
    }

    .slider-noticias-home .aviso-card {
        min-width: 100%;
    }

    .aviso-card img {
        height: 160px;
        object-fit: cover;
        margin-bottom: .8rem;
    }

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

    .aviso-card .aviso-info p {
        font-size: .95rem;
        -webkit-line-clamp: 2;
    }

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


/* ============================================================
   10. EXTRAS
============================================================ */

.acceso-admin {
    font-size: 11px;
    color: #999;
}
