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

#noticias {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(0,0,0,.15);
}

/* =========================
   TOP LAYOUT
========================= */
.layout-top {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* HERO */
.hero {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
}

.hero img {
    width: 100%;
    height: 420px;
    object-fit: cover;
}

.hero .overlay {
    position: absolute;
    bottom: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,.8), transparent);
    color: white;
}

/* SECUNDARIAS */
.secundaria {
    display: flex;
    gap: .8rem;
    margin-bottom: 1rem;
}

.secundaria img {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

/* =========================
   MAIN LAYOUT
========================= */
.layout-main {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 2rem;
}

/* GRID */
.grid-noticias {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
    gap: 1.5rem;
}

/* TARJETAS */
.card-noticia {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,.1);
    transition: .25s;
}

.card-noticia:hover {
    transform: translateY(-5px);
}

.card-noticia img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card-noticia .contenido {
    padding: 1rem;
}

/* =========================
   SIDEBAR
========================= */
.sidebar {
    background: #f5f7fa;
    padding: 1rem;
    border-radius: 10px;
}

.sidebar h3 {
    margin-bottom: 1rem;
}

.item-sidebar {
    margin-bottom: .8rem;
    font-size: .9rem;
}

/* =========================
   FILTROS
========================= */
.filtros {
    text-align: center;
    margin-bottom: 1.5rem;
}

.filtro {
    padding: .5rem 1rem;
    border: none;
    background: #e6ecf3;
    margin: .2rem;
    border-radius: 6px;
    cursor: pointer;
}

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

/* =========================
   RESPONSIVE
========================= */
@media(max-width: 900px){
    .layout-top,
    .layout-main {
        grid-template-columns: 1fr;
    }

    .hero img {
        height: 260px;
    }
}