/* ============================================================
   SECCIÓN NOTICIAS
   (ESTILO INSTITUCIONAL / AVISOS)
============================================================ */

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

/* ============================================================
   ENCABEZADO
============================================================ */

#noticias h1 {
    font-size: 2.4rem;
    font-weight: 800;
    color: #001f3f;
    margin-bottom: 1.2rem;
}

#noticias .intro-seccion {
    max-width: 720px;
    margin: 0 auto 2.5rem;
    font-size: 1.1rem;
    color: #555;
}

/* ============================================================
   FILTROS
============================================================ */

#noticias .filtros {
    display: flex;
    justify-content: center;
    gap: .6rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

#noticias .filtro {
    padding: .6rem 1.2rem;
    border-radius: 6px;
    border: 1px solid #001f3f;
    background: white;
    color: #001f3f;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

#noticias .filtro:hover,
#noticias .filtro.activo {
    background: #001f3f;
    color: white;
}

/* ============================================================
   GRID DE NOTICIAS
============================================================ */

#noticias .grid-avisos-home {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

/* ============================================================
   TARJETA NOTICIA
============================================================ */

#noticias .aviso-card {
    background: white;
    border-left: 6px solid #001f3f;
    border-radius: 12px;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 6px 18px rgba(0,0,0,.10);
    transition: transform .25s ease, box-shadow .25s ease;

    display: flex;
    flex-direction: column;
    position: relative;
    text-align: left;
}

#noticias .aviso-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 26px rgba(0,0,0,.15);
}

/* ============================================================
   IMAGEN
============================================================ */

#noticias .aviso-card img {
    width: 100%;
    height: 350px;
    object-fit: contain;
    background: #f2f2f2;
    padding: .5rem;
    border-radius: 10px;
    margin-bottom: .8rem;
}

/* ============================================================
   TÍTULO
============================================================ */

#noticias .aviso-card h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #001f3f;
    margin-bottom: .5rem;
    line-height: 1.3;
}

/* ============================================================
   DESCRIPCIÓN / RESUMEN
============================================================ */

/* Resumen */
.aviso-info p {
    font-size: .95rem;
    color: #444;
    line-height: 1.45;

    /* 🔒 Limita a 3 líneas */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.leer-mas {
    margin-top: auto;
    padding-top: 1.2rem;
    display: inline-block;
    font-weight: 600;
    font-size: .9rem;
    color: #003366;
}



/* ============================================================
   FECHA
============================================================ */

#noticias .aviso-card time {
    margin-top: .7rem;
    font-size: .85rem;
    font-weight: 600;
    color: #555;
}

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

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

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

/* ============================================================
   PAGINACIÓN
============================================================ */

#noticias .paginacion {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .6rem;
    margin-top: 2.5rem;
}

#noticias .paginacion button {
    padding: .4rem .9rem;
    border-radius: 6px;
    border: 1px solid #001f3f;
    background: white;
    font-weight: 600;
    cursor: pointer;
}

#noticias .paginacion button:disabled {
    opacity: .4;
    cursor: default;
}

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

@media (max-width: 600px) {

    section#noticias {
        padding: 1.5rem .8rem;
    }

    #noticias .aviso-card img {
        height: 180px;
    }
}
