/* Novedades del sistema (2026-10-18; layouts/news.php + utilities/news.js). Encabezado con degradé del color primario, tarjetas con
   ícono que entran de a una (salvo con prefers-reduced-motion) y grilla de 2 columnas que pasa a 1 en celulares. */
.newsModal {
    overflow: hidden;
    border: 0;
    border-radius: 1rem;
}

.newsHero {
    position: relative;
    padding: 2rem 1.5rem 1.6rem;
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, #4680ff 0%, #2f66e6 55%, #7c5cff 100%);
}

.newsHero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 15% 20%, rgba(255, 255, 255, .22) 0, transparent 40%), radial-gradient(circle at 85% 80%, rgba(255, 255, 255, .16) 0, transparent 35%);
    pointer-events: none;
}

.newsClose {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1;
}

.newsHeroIcon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: .75rem;
    border-radius: 50%;
    font-size: 1.7rem;
    background-color: rgba(255, 255, 255, .2);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, .08);
    animation: newsSparkle 2.4s ease-in-out infinite;
}

.newsHeroTitle {
    margin-bottom: .4rem;
    color: #fff;
    font-weight: 700;
}

.newsHeroText {
    max-width: 34rem;
    margin: 0 auto;
    color: rgba(255, 255, 255, .9);
}

.newsGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.newsCard {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .85rem .9rem;
    border: 1px solid #e3e9f3;
    border-radius: .75rem;
    background-color: #fbfcff;
    animation: newsCardIn .45s ease both;
    animation-delay: calc(var(--newsIndex, 0) * 70ms + .15s);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.newsCard:hover {
    border-color: #b9ccf7;
    box-shadow: 0 4px 14px rgba(70, 128, 255, .1);
}

.newsCardIcon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: .65rem;
    font-size: 1.2rem;
    color: #4680ff;
    background-color: rgba(70, 128, 255, .1);
}

.newsCardBody {
    min-width: 0;
}

.newsCardTitle {
    margin-bottom: .2rem;
    font-weight: 600;
}

.newsCardText {
    margin: 0;
    color: #5b6b79;
    font-size: .85rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.newsPreviewNote {
    margin: 1rem 0 0;
    color: #5b6b79;
    font-size: .85rem;
}

@keyframes newsCardIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes newsSparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(1.08) rotate(-8deg);
    }
}

@media (max-width: 575.98px) {
    .newsGrid {
        grid-template-columns: 1fr;
    }

    .newsHero {
        padding: 1.75rem 1rem 1.4rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .newsCard,
    .newsHeroIcon {
        animation: none;
    }
}
