/* =========================================
   noticias.css — Página pública de noticias
   ========================================= */

.seccion-noticias {
    position: relative;
    z-index: 10;
    margin-top: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 56px 5% 80px;
    background-color: #ffffff;
    min-height: 60vh;
}

/* Encabezado */
.noticias-encabezado {
    text-align: center;
    margin-bottom: 50px;
}

/* Mismo estilo que .qs-texto del inicio */
.noticias-subtitulo {
    color: #4a5568;
    font-size: 1.2rem;
    line-height: 1.85;
    margin-top: 8px;
}

@media (max-width: 768px) {
    .noticias-subtitulo {
        font-size: 1.05rem;
    }
}

/* Grid de tarjetas */
.noticias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Tarjeta individual */
.tarjeta-noticia {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    border-bottom: 4px solid #1a365d;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-bottom-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.tarjeta-noticia:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-bottom-color: #ecc94b;
}

/* Imagen de la tarjeta */
.tarjeta-imagen-wrap {
    position: relative;
    overflow: hidden;
}

.tarjeta-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.tarjeta-noticia:hover .tarjeta-img {
    transform: scale(1.04);
}

.tarjeta-fecha {
    position: absolute;
    bottom: 10px;
    left: 14px;
    background: rgba(26, 54, 93, 0.85);
    color: #ecc94b;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

/* Badge NEW */
.badge-nuevo {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #e53e3e;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.45);
    animation: pulse-nuevo 2s ease-in-out infinite;
    text-transform: uppercase;
}

@keyframes pulse-nuevo {
    0%, 100% { transform: scale(1); box-shadow: 0 2px 8px rgba(229, 62, 62, 0.45); }
    50%       { transform: scale(1.07); box-shadow: 0 4px 14px rgba(229, 62, 62, 0.65); }
}

/* Cuerpo de la tarjeta */
.tarjeta-cuerpo {
    padding: 22px 22px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tarjeta-titulo {
    color: #1a365d;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.35;
}

.tarjeta-resumen {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.65;
    flex: 1;
    margin-bottom: 18px;
}

/* Botón leer más */
.btn-leer-mas {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1a365d;
    font-weight: 700;
    font-size: 0.9rem;
    background: none;
    border: 2px solid #1a365d;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    align-self: flex-start;
}

.btn-leer-mas:hover {
    background: #1a365d;
    color: white;
}

/* Estado vacío */
.noticias-vacio {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    font-size: 1.1rem;
}

/* ── MODAL ── */
.modal-fondo {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 9000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(3px);
}

.modal-fondo.activo {
    display: flex;
}

.modal-caja {
    background: white;
    border-radius: 16px;
    max-width: 680px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modal-entrar 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modal-entrar {
    from { transform: scale(0.9); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.modal-cerrar {
    position: sticky;
    top: 0;
    float: right;
    margin: 14px 14px 0 0;
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: background 0.2s;
}

.modal-cerrar:hover { background: #e2e8f0; }

.modal-imagen {
    display: block;
    max-width: 100%;
    max-height: 420px;
    width: auto;
    object-fit: contain;
    margin: 0 auto;
    background: #f0f0f0;
    clear: both;
}

.modal-cuerpo {
    padding: 28px 30px 32px;
}

.modal-titulo {
    color: #1a365d;
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.25;
}

.modal-contenido {
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.8;
}

.modal-contenido p     { margin-bottom: 12px; }
.modal-contenido ul,
.modal-contenido ol    { padding-left: 20px; margin-bottom: 12px; }
.modal-contenido strong { color: #1a365d; }

/* ── RESPONSIVE ── */
@media (max-width: 680px) {
    .noticias-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .seccion-noticias { padding: 40px 4% 80px; }
    .modal-cuerpo  { padding: 20px; }
    .modal-titulo  { font-size: 1.3rem; }
    .modal-imagen  { max-height: 300px; }
}