/* ================================================================
   MJUE MUNGU — Next Event Preview & Popup (index.html)
================================================================ */

/* ── Next Program button ─────────────────────────────────── */
#next-program-btn {
    position: relative;
}

/* ── Hover thumbnail preview (desktop) ──────────────────── */
.next-evt-preview {
    position: absolute;
    bottom: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    background: #162130;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.12);
    overflow: hidden;
    pointer-events: none;
    z-index: 500;
    animation: nep-fade 0.18s ease;
}

.next-evt-preview[hidden] { display: none; }

@keyframes nep-fade {
    from { opacity: 0; transform: translateX(-50%) translateY(8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.nep-poster {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
}

.nep-no-poster {
    width: 100%;
    aspect-ratio: 1/1;
    background: linear-gradient(135deg, #1a2e42, #243d5c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.nep-body {
    padding: 0.75rem 0.9rem 0.9rem;
}

.nep-title {
    font-family: 'Playfair Display', serif;
    font-size: 0.88rem;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 0.35rem;
}

.nep-date {
    font-size: 0.75rem;
    color: var(--gold, #D4A04C);
    font-weight: 600;
}

.nep-hint {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.45);
    margin-top: 0.25rem;
}

/* Hero buttons wrapper needs relative for preview positioning */
.hero-buttons {
    position: relative;
}

/* ── Popup Modal ─────────────────────────────────────────── */
.next-evt-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.78);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(7px);
    animation: nep-fade-bg 0.2s ease;
}

.next-evt-modal-overlay[hidden] { display: none; }

@keyframes nep-fade-bg {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.next-evt-modal-inner {
    background: #162130;
    border-radius: 22px;
    max-width: 500px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 28px 90px rgba(0,0,0,0.65);
    border: 1px solid rgba(255,255,255,0.1);
    animation: nep-slide-up 0.25s ease;
}

@keyframes nep-slide-up {
    from { transform: translateY(28px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.next-evt-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.45);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.35rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    line-height: 1;
    transition: background 0.15s;
}

.next-evt-modal-close:hover { background: rgba(255,255,255,0.15); }

.next-evt-modal-poster {
    width: 100%;
    display: block;
    border-radius: 22px 22px 0 0;
    max-height: 340px;
    object-fit: cover;
}

.next-evt-modal-no-poster {
    width: 100%;
    min-height: 160px;
    background: linear-gradient(135deg, #1a2e42 0%, #243d5c 100%);
    border-radius: 22px 22px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
}

.next-evt-modal-content {
    padding: 1.5rem 1.8rem 2rem;
}

.next-evt-modal-badge {
    display: inline-block;
    background: rgba(212,160,76,0.15);
    color: var(--gold, #D4A04C);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 0.75rem;
}

.next-evt-modal-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.25rem, 4vw, 1.65rem);
    color: #fff;
    margin: 0 0 1.1rem;
    line-height: 1.25;
    padding-right: 2.5rem;
}

.next-evt-modal-meta {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 1.2rem;
}

.next-evt-modal-meta-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.72);
}

.next-evt-modal-meta-row svg { flex-shrink: 0; margin-top: 2px; }
.next-evt-modal-meta-row strong { color: rgba(255,255,255,0.95); }

.next-evt-modal-desc {
    font-size: 0.92rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.7;
    margin-bottom: 1.6rem;
    white-space: pre-line;
}

.next-evt-modal-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.next-evt-join-btn {
    flex: 1;
    background: var(--gold, #D4A04C);
    color: #0e1825;
    border: none;
    padding: 0.85rem 1.4rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: background 0.15s, transform 0.15s;
}

.next-evt-join-btn:hover { background: #e6b55c; transform: translateY(-1px); }

.next-evt-more-btn {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 0.85rem 1.2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.15s;
}

.next-evt-more-btn:hover { background: rgba(255,255,255,0.14); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
    .next-evt-preview { display: none !important; } /* no hover on touch */
    .next-evt-modal-inner { border-radius: 18px; max-height: 96vh; }
    .next-evt-modal-poster { border-radius: 18px 18px 0 0; }
    .next-evt-modal-no-poster { border-radius: 18px 18px 0 0; }
    .next-evt-modal-content { padding: 1.2rem 1.3rem 1.5rem; }
}
