/* ============================================================
   Novedades ("Qué hay de nuevo") — modal de bienvenida global
   Prefijo: ann-  ·  Sistema reutilizable (config/announcements.php)
   Colores 100% branding-aware: var(--primary) / var(--primary-rgb).
   ============================================================ */

.ann-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity .2s ease;
}
.ann-modal.is-open { opacity: 1; }
.ann-modal.is-closing { opacity: 0; }

.ann-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.ann-modal__panel {
    position: relative;
    width: min(440px, 100%);
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--bg-card, #fff);
    border-radius: 22px;
    padding: 30px 28px 26px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .34);
    transform: translateY(16px) scale(.97);
    opacity: 0;
    transition: transform .26s cubic-bezier(.16, 1, .3, 1), opacity .26s ease;
}
.ann-modal.is-open .ann-modal__panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Resplandor superior con el color de la marca (sutil, decorativo). */
.ann-modal__glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 78%;
    height: 120px;
    background: radial-gradient(60% 100% at 50% 0%,
        rgba(var(--primary-rgb), .16), transparent 70%);
    pointer-events: none;
    border-radius: 22px 22px 0 0;
}

.ann-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 9px;
    background: var(--bg-muted, #f1f5f9);
    color: var(--text-soft, #64748b);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, color .15s ease;
    z-index: 2;
}
.ann-modal__close:hover { background: #e2e8f0; color: var(--text-main, #0f172a); }

.ann-modal__icon {
    position: relative;
    width: 66px;
    height: 66px;
    margin: 6px auto 16px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary, #199c82);
    background: rgba(var(--primary-rgb), .12);
    box-shadow: 0 6px 18px rgba(var(--primary-rgb), .22);
}

.ann-modal__eyebrow {
    margin: 0 0 6px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--primary, #199c82);
}

.ann-modal__title {
    margin: 0 0 12px;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--text-main, #0f172a);
}

.ann-modal__body {
    margin: 0 0 24px;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--text-soft, #64748b);
}

.ann-modal__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ann-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 20px;
    border-radius: 13px;
    font-size: 14.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
    text-decoration: none;
}
.ann-btn--primary {
    color: #fff;
    background: var(--primary, #199c82); /* fallback WebKit viejo sin color-mix */
    background: linear-gradient(135deg, var(--primary, #199c82), color-mix(in srgb, var(--primary, #199c82) 82%, #000));
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), .32);
}
.ann-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(var(--primary-rgb), .4);
    color: #fff;
}
.ann-btn--ghost {
    color: var(--text-soft, #64748b);
    background: transparent;
    border-color: transparent;
}
.ann-btn--ghost:hover {
    background: var(--bg-muted, #f1f5f9);
    color: var(--text-main, #0f172a);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 480px) {
    .ann-modal { padding: 0; align-items: flex-end; }
    .ann-modal__panel {
        width: 100%;
        max-height: calc(100dvh - 24px);
        border-radius: 22px 22px 0 0;
        padding: 28px 20px 22px;
    }
    .ann-modal.is-open .ann-modal__panel { transform: translateY(0); }
    .ann-modal__panel { transform: translateY(100%); }
    .ann-modal__title { font-size: 19px; }
}

/* Respeta la preferencia de menos movimiento. */
@media (prefers-reduced-motion: reduce) {
    .ann-modal,
    .ann-modal__panel { transition: opacity .15s ease; }
    .ann-modal__panel { transform: none; }
    .ann-modal.is-open .ann-modal__panel { transform: none; }
}
