/* ═══════════════════════════════════════════════════════
   HAPPENING PAGES — /happening/<slug>
   Depends on: colors.css (tokens), style.css (base)
   ═══════════════════════════════════════════════════════ */

.happening-hero {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    min-height: 220px;
    background: linear-gradient(135deg, var(--happening-start), var(--happening-end));
    margin-bottom: 1.5rem;
}
.happening-hero-fallback {
    background: linear-gradient(135deg, #6366F1, #4F46E5, #4338CA);
}
.happening-hero-fallback .happening-hero-overlay {
    position: relative;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(transparent, rgba(0,0,0,0.3));
}
.happening-hero-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}
.happening-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.5rem 1.5rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
}
.happening-breadcrumb {
    all: unset;
    display: block;
    font-size: var(--text-sm);
    opacity: 0.8;
    margin-bottom: 0.5rem;
    color: #fff;
}
.happening-breadcrumb a {
    color: #fff;
    text-decoration: none;
}
.happening-breadcrumb a:hover {
    text-decoration: underline;
}
.happening-breadcrumb span {
    margin: 0 0.3rem;
}
.happening-hero-title-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.happening-hero-title-row h1 {
    flex: 1;
}
.happening-share {
    flex: 0 0 auto;
    opacity: 0.8;
    color: #fff;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    backdrop-filter: blur(4px);
}
.happening-share:hover {
    opacity: 1;
    background: rgba(255,255,255,0.25);
}
.happening-hero h1 {
    font-size: var(--text-3xl);
    font-weight: 700;
    margin: 0 0 0.5rem;
    line-height: 1.2;
}
.happening-dates {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: var(--text-base);
    opacity: 0.9;
    margin-bottom: 0.5rem;
}
.happening-stats {
    display: flex;
    gap: 0.5rem;
    font-size: var(--text-sm);
    opacity: 0.8;
}
.happening-desc {
    color: var(--gray);
    font-size: var(--text-base);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 700px;
}

/* Programs section */
.happening-programs {
    margin-bottom: 2rem;
}
.happening-programs h2 {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.program-scroll {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.program-scroll::-webkit-scrollbar { display: none; }

.program-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-light);
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--text-sm);
    flex-shrink: 0;
}
.program-card-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}
.program-card {
    flex: 0 0 auto;
    min-width: 160px;
    max-width: 220px;
    padding: 0.75rem 1rem;
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, box-shadow 0.15s;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-family: inherit;
    font-size: var(--text-sm);
    color: var(--black);
}
.program-card:hover {
    border-color: var(--brand);
}
.program-card.active {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px var(--brand-light);
}
.program-actor {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.program-title {
    font-weight: 600;
    font-size: var(--text-base);
}
.program-meta {
    font-size: var(--text-xs);
    color: var(--gray);
}
.program-follow-btn {
    margin-top: 0.35rem;
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--gray-light);
    border-radius: 20px;
    background: transparent;
    color: var(--black);
    font-size: var(--text-xs);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.program-follow-btn:hover {
    background: var(--brand-light);
}
.program-follow-btn.following {
    background: var(--brand);
    color: var(--black);
    border-color: var(--brand);
}

/* Timeline */
.happening-timeline {
    margin-bottom: 2rem;
}
.timeline-day-header {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 1rem 0 0.5rem;
    border-bottom: 1px solid var(--gray-light);
    margin-bottom: 0.5rem;
    position: sticky;
    top: 0;
    background: var(--off-white);
    z-index: 5;
}
.timeline-beep {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--gray-light);
}
.timeline-beep:last-child {
    border-bottom: none;
}
.timeline-beep-time {
    flex: 0 0 auto;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray);
}
.timeline-beep-allday {
    display: none;
}
.timeline-beep-content {
    flex: 1;
    min-width: 0;
}
.timeline-beep-title {
    font-weight: 600;
    font-size: var(--text-base);
    color: var(--black);
    text-decoration: none;
    display: block;
}
.timeline-beep-title:hover {
    color: var(--brand);
}
.timeline-beep-actor {
    font-size: var(--text-sm);
    color: var(--gray);
    margin-right: 0.5rem;
}
.timeline-beep-location {
    font-size: var(--text-sm);
    color: var(--gray);
}
.timeline-beep-action {
    flex: 0 0 auto;
}
.timeline-beep-action .btn-remind-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.timeline-beep-passed {
    opacity: 0.5;
}
.timeline-beep-passed-label {
    font-size: var(--text-xs);
    color: var(--gray);
    font-style: italic;
}

/* Happening cards — horizontal scroll row */
.happenings-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
}
.happenings-scroll::-webkit-scrollbar { height: 4px; }
.happenings-scroll::-webkit-scrollbar-thumb { background: var(--gray-light); border-radius: 2px; }
.happenings-scroll .happening-card-discover {
    min-width: 280px;
    max-width: 320px;
    flex-shrink: 0;
    scroll-snap-align: start;
    margin: 0;
    flex-direction: column;
    align-items: flex-start;
}
.happenings-scroll .happening-card-cta {
    align-self: flex-end;
    margin-top: auto;
}

/* Happening card in discover feed */
.happening-card-discover {
    background: var(--white);
    border: none;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    color: var(--black);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: transform 0.2s, box-shadow 0.2s;
    margin: 1rem 0;
    max-width: 640px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.happening-card-discover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%, rgba(0,0,0,0.15) 100%);
    pointer-events: none;
    z-index: 1;
}
.happening-card-discover::after {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 60%;
    height: 80%;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

/* Vibe-specific card effects */
.happening-card-discover[data-vibe="hype"]::after {
    background: radial-gradient(circle, rgba(255,200,50,0.15) 0%, transparent 70%);
}
.happening-card-discover[data-vibe="cozy"]::before {
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 60%, rgba(0,0,0,0.05) 100%);
}
.happening-card-discover[data-vibe="grind"]::before {
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 40%, rgba(0,0,0,0.2) 100%);
}
.happening-card-discover[data-vibe="practical"] {
    border-left: 3px solid rgba(255,255,255,0.4);
}
.happening-card-discover:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}
.happening-card-img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.happening-card-desc {
    font-size: var(--text-sm);
    opacity: 0.85;
    margin-top: 0.25rem;
    line-height: 1.4;
}
.happening-card-info {
    flex: 1;
    position: relative;
    z-index: 2;
}
.happening-card-info h3 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin: 0 0 0.25rem;
}
.happening-card-meta {
    font-size: var(--text-sm);
    opacity: 0.75;
    margin-bottom: 0.25rem;
}
.happening-card-dates {
    font-size: var(--text-sm);
    opacity: 0.75;
}
.happening-card-cta {
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
    background: rgba(255,255,255,0.2);
    color: inherit;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 24px;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    font-size: var(--text-sm);
    cursor: pointer;
    backdrop-filter: blur(4px);
    text-decoration: none;
    white-space: nowrap;
}
.happening-card-cta:hover {
    background: rgba(255,255,255,0.35);
}

/* FAQ section */
.happening-faq {
    margin: 2rem 0;
}
.happening-faq h2 {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.faq-item {
    border-bottom: 1px solid var(--gray-light);
    padding: 0;
}
.faq-item summary {
    padding: 0.85rem 0;
    font-weight: 600;
    font-size: var(--text-base);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.faq-item summary::after {
    content: "+";
    font-size: var(--text-lg);
    color: var(--gray);
    transition: transform 0.2s;
}
.faq-item[open] summary::after {
    content: "−";
}
.faq-item p {
    padding: 0 0 0.85rem;
    color: var(--gray);
    font-size: var(--text-base);
    line-height: 1.6;
    margin: 0;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .happening-hero h1 {
        font-size: var(--text-xl);
    }
    .happening-hero-img {
        height: 200px;
    }
    .happening-hero-overlay {
        padding: 1.5rem 1rem 1rem;
    }
    .program-card {
        min-width: 130px;
    }
    .happening-card-discover {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}
