/**
 * Events Page & Detail Modal Stylesheet
 * Brand colors: --blue (#173B7A), --gold (#C9A227), --emerald (#1F8A5F)
 */

/* Hero Banner */
.events-hero-banner {
    background: linear-gradient(135deg, var(--blue-dark, #0E2A5C) 0%, var(--blue, #173B7A) 100%);
    padding: 70px 24px 60px;
    text-align: center;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.events-hero-banner::after {
    content: '';
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--gold-light) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.events-hero-banner .eyebrow {
    font-family: 'Manrope', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gold, #C9A227);
    display: inline-block;
    margin-bottom: 8px;
}

.events-hero-banner h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.3rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: #ffffff;
}

.events-hero-banner p {
    font-size: 1rem;
    color: #E2E8F0;
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Category Filter Bar */
.events-filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.filter-btn {
    background: #ffffff;
    border: 1px solid #E2E8F0;
    color: #475569;
    padding: 8px 18px;
    border-radius: 20px;
    font-family: 'Manrope', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--blue, #173B7A);
    color: #ffffff;
    border-color: var(--blue, #173B7A);
    box-shadow: 0 4px 12px rgba(23, 59, 122, 0.2);
}

/* Vertical List of Event Cards */
.events-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
}

.event-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: stretch;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s ease;
    position: relative;
    cursor: pointer;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(23, 59, 122, 0.12);
    border-color: rgba(23, 59, 122, 0.2);
}

/* Left Image Thumbnail */
.event-card-media {
    width: 260px;
    min-width: 260px;
    position: relative;
    overflow: hidden;
}

.event-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.event-card:hover .event-card-media img {
    transform: scale(1.05);
}

/* Middle Content */
.event-card-body {
    padding: 24px 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.event-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

/* Category Pill Badges (Dynamic Color Variations) */
.category-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-family: 'Manrope', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.category-pill.pill-blue {
    background: rgba(23, 59, 122, 0.1);
    color: var(--blue, #173B7A);
}

.category-pill.pill-gold {
    background: rgba(201, 162, 39, 0.15);
    color: #92720E;
}

.category-pill.pill-emerald {
    background: rgba(31, 138, 95, 0.12);
    color: var(--emerald, #1F8A5F);
}

.category-pill.pill-indigo {
    background: rgba(79, 70, 229, 0.12);
    color: #4F46E5;
}

.category-pill.pill-teal {
    background: rgba(13, 148, 136, 0.12);
    color: #0D9488;
}

.event-location {
    font-size: 0.82rem;
    color: #64748B;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.event-card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.22rem;
    font-weight: 700;
    color: var(--blue-dark, #0E2A5C);
    margin: 0 0 8px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.event-card:hover .event-card-title {
    color: var(--blue, #173B7A);
}

.event-card-desc {
    font-size: 0.92rem;
    color: #475569;
    line-height: 1.55;
    margin: 0 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-action-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--blue, #173B7A);
    font-family: 'Manrope', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: gap 0.2s ease, color 0.2s ease;
}

.event-action-link i {
    transition: transform 0.2s ease;
}

.event-card:hover .event-action-link {
    color: var(--gold, #C9A227);
}

.event-card:hover .event-action-link i {
    transform: translateX(4px);
}

/* Right Side Date Badge */
.event-card-date-badge {
    width: 110px;
    min-width: 110px;
    background: #F8FAFC;
    border-left: 1px solid #F1F5F9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    text-align: center;
    transition: background 0.3s ease;
}

.event-card:hover .event-card-date-badge {
    background: rgba(23, 59, 122, 0.03);
}

.date-day {
    font-family: 'Poppins', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--blue-dark, #0E2A5C);
}

.date-month {
    font-family: 'Manrope', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold, #C9A227);
    margin-top: 4px;
}

.date-year {
    font-size: 0.78rem;
    color: #94A3B8;
    font-weight: 600;
    margin-top: 2px;
}

/* Detail Popup Modal Overlay */
.event-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(14, 42, 92, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1300;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.event-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.event-modal-container {
    background: #ffffff;
    width: 100%;
    max-width: 820px;
    max-height: 90vh;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    animation: modalSlideUp 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.event-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.08);
    border: none;
    color: #1E293B;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s ease, transform 0.2s ease;
}

.event-modal-close:hover {
    background: rgba(15, 23, 42, 0.15);
    transform: scale(1.08);
}

.event-modal-header {
    padding: 32px 32px 20px;
    border-bottom: 1px solid #F1F5F9;
}

.event-modal-header .category-pill {
    margin-bottom: 12px;
}

.event-modal-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--blue-dark, #0E2A5C);
    margin: 0 0 12px;
    line-height: 1.3;
}

.event-modal-meta-row {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.88rem;
    color: #64748B;
    flex-wrap: wrap;
}

.event-modal-meta-row span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.event-modal-body {
    padding: 28px 32px 36px;
}

.event-full-description {
    font-size: 0.98rem;
    line-height: 1.7;
    color: #334155;
    margin-bottom: 32px;
    white-space: pre-line;
}

/* Photos Grid in Modal */
.modal-section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--blue-dark, #0E2A5C);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-section-title i {
    color: var(--gold, #C9A227);
}

.modal-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 32px;
}

.modal-photo-item {
    border-radius: 12px;
    overflow: hidden;
    height: 130px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #E2E8F0;
    position: relative;
    cursor: pointer;
}

.modal-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.modal-photo-item:hover img {
    transform: scale(1.08);
}

/* Videos Section in Modal */
.modal-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.modal-video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

.modal-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    .events-hero-banner {
        padding: 50px 16px 40px;
    }
    .events-hero-banner h1 {
        font-size: 1.8rem;
    }
    .event-card {
        flex-direction: column;
    }
    .event-card-media {
        width: 100%;
        min-width: 100%;
        height: 200px;
    }
    .event-card-date-badge {
        width: 100%;
        min-width: 100%;
        border-left: none;
        border-top: 1px solid #F1F5F9;
        flex-direction: row;
        gap: 10px;
        padding: 10px 16px;
    }
    .date-day {
        font-size: 1.4rem;
    }
    .date-month {
        margin-top: 0;
    }
    .date-year {
        margin-top: 0;
    }
    .event-modal-container {
        max-height: 95vh;
        border-radius: 16px;
    }
    .event-modal-header,
    .event-modal-body {
        padding: 20px;
    }
    .modal-photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
    .modal-videos-grid {
        grid-template-columns: 1fr;
    }
}
