/* =============================================
   EVENTS PAGE — PARVAAZ FOUNDATION
   ============================================= */

/* ---------- Events Page Header ---------- */
.events-page-header {
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    padding: 100px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.events-page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(244, 162, 97, 0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 50%, rgba(42, 157, 143, 0.15) 0%, transparent 60%);
}

.events-page-header .container {
    position: relative;
}

.page-tagline {
    display: inline-block;
    background: rgba(244, 162, 97, 0.2);
    color: #F4A261;
    border: 1px solid rgba(244, 162, 97, 0.4);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.events-page-header .page-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: white;
    margin-bottom: 16px;
}

.events-page-header .page-subtitle {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.1rem;
    max-width: 560px;
    margin: 0 auto 48px;
}

.events-stats-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.ev-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ev-stat-num {
    font-size: 2rem;
    font-weight: 700;
    color: #F4A261;
    line-height: 1;
}

.ev-stat-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---------- Filter Bar ---------- */
.events-filter-bar {
    background: white;
    border-bottom: 1px solid #e8e8e8;
    padding: 0;
    position: sticky;
    top: 72px;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.filter-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    flex-shrink: 0;
    padding: 18px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-tab:hover {
    color: #264653;
    background: #f9fafb;
}

.filter-tab.active {
    color: #E76F51;
    border-bottom-color: #E76F51;
    font-weight: 600;
}

/* ---------- Events Section ---------- */
.events-section {
    background: #f8f9fa;
    padding-top: 60px;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
}

.events-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #9ca3af;
}

.events-loading i {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
}

/* ---------- Event Card ---------- */
.event-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    animation: fadeInUp 0.4s ease both;
    border: 2px solid transparent;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.event-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-color: rgba(42, 157, 143, 0.2);
}

.event-card.expanded {
    border-color: rgba(42, 157, 143, 0.3);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.event-card.hidden {
    display: none;
}

/* Cover Photo */
.event-cover {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.event-card:hover .event-cover {
    transform: scale(1.03);
}

.event-card.expanded .event-cover {
    cursor: zoom-in;
}

.event-cover-wrap {
    overflow: hidden;
    position: relative;
    height: 220px;
    background: #e5e7eb;
}

.event-photo-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.65);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(4px);
}

/* Expand hint overlay on cover */
.event-expand-hint {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(42, 157, 143, 0.85);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(4px);
    transition: opacity 0.2s, transform 0.2s;
}

.event-expand-hint i {
    font-size: 0.65rem;
    transition: transform 0.3s ease;
}

.event-card.expanded .event-expand-hint i {
    transform: rotate(180deg);
}

.event-card.expanded .event-expand-hint {
    background: rgba(231, 111, 81, 0.85);
}

/* Card Body */
.event-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.event-category-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 12px;
    width: fit-content;
}

.badge-career    { background: #dbeafe; color: #1d4ed8; }
.badge-school    { background: #d1fae5; color: #065f46; }
.badge-scholarship { background: #fef3c7; color: #92400e; }
.badge-relief    { background: #fee2e2; color: #991b1b; }
.badge-health    { background: #ede9fe; color: #5b21b6; }
.badge-community { background: #f0fdf4; color: #166534; }
.badge-awards    { background: #fdf4ff; color: #86198f; }

.event-title {
    font-family: 'Merriweather', serif;
    font-size: 1.1rem;
    color: #1a2332;
    margin-bottom: 8px;
    line-height: 1.4;
}

.event-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.event-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: #6b7280;
}

.event-meta-item i {
    color: #E76F51;
    width: 14px;
}

.event-desc {
    font-size: 0.88rem;
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 12px;
}

/* ---------- Expandable Card Content ---------- */
.event-expanded-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.3s ease, margin-top 0.3s ease;
    margin-top: 0;
}

.event-card.expanded .event-expanded-content {
    max-height: 2000px;
    opacity: 1;
    margin-top: 16px;
}

.event-expanded-desc {
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    margin-bottom: 16px;
}

/* Inline Photo Gallery */
.event-expanded-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin-top: 12px;
    margin-bottom: 16px;
}

.event-gallery-thumb {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s;
    border: 2px solid transparent;
}

.event-gallery-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #2A9D8F;
    opacity: 0.9;
}

/* Speakers list inside card */
.event-speakers {
    margin-top: 12px;
    font-size: 0.8rem;
    color: #6b7280;
}

.event-speakers strong {
    color: #374151;
}

/* ---------- Patrons Section ---------- */
.patrons-section {
    background: #0f1923;
}

.bg-dark {
    background: #0f1923;
}

.patrons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

.patron-card {
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    background: #1a2530;
}

.patron-card:hover {
    transform: translateY(-4px);
}

.patron-thumb {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.patron-play-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.85);
    transition: transform 0.3s ease, color 0.3s ease;
    z-index: 2;
}

.patron-card:hover .patron-play-icon {
    transform: scale(1.15);
    color: #F4A261;
}

.patron-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    padding: 12px;
    text-align: left;
}

.patron-name {
    display: block;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
}

.patron-role {
    display: block;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.7rem;
}

.patron-info {
    padding: 14px 16px;
}

.patron-info h3 {
    font-size: 0.92rem;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.patron-info p {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ---------- Lightbox ---------- */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.94);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-counter {
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ---------- Video Modal ---------- */
.video-modal-overlay {
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.video-modal-content {
    width: 100%;
    max-width: 900px;
    background: black;
    border-radius: 12px;
    overflow: hidden;
}

.patron-video-player {
    width: 100%;
    max-height: 70vh;
    display: block;
}

/* ---------- Highlights ---------- */
.event-highlights {
    margin-top: 12px;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.event-highlights li {
    font-size: 0.82rem;
    color: #4b5563;
    display: flex;
    align-items: flex-start;
    gap: 7px;
}

.event-highlights li::before {
    content: '✓';
    color: #2A9D8F;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .events-stats-row {
        gap: 24px;
    }

    .events-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .patrons-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .lightbox-nav {
        display: none;
    }

    .filter-tab {
        padding: 14px 14px;
        font-size: 0.82rem;
    }

    .event-expanded-gallery {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .event-gallery-thumb {
        height: 65px;
    }
}

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