/* --- Global Gallery Padding --- */
/* This ensures left and right margins for the entire gallery page and popups */
.year-selector-section,
.event-list-section,
.modal-body {
    padding-left: 5%;
    padding-right: 5%;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Summary Stats (Dynamic Banner) --- */
.summary-stats-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
}

.stat-pill {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    padding: 10px 22px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px -5px rgba(18, 11, 34, 0.05);
}

.stat-pill .num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--violet, #6D28D9); 
}

.stat-pill .lbl {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Make summary look great on mobile phones */
@media (max-width: 600px) {
    .summary-stats-container { gap: 10px; }
    .stat-pill {
        padding: 12px 8px;
        width: calc(50% - 5px); 
        justify-content: center;
        border-radius: 16px;
        flex-direction: column;
        gap: 2px;
    }
    .stat-pill .num { font-size: 18px; line-height: 1.1; }
    .stat-pill .lbl { font-size: 11px; text-align: center; }
}

/* --- Year Selector Carousel Container --- */
.year-carousel-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 100%;
    margin: 0 auto;
}

.year-selector-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 8px 4px;
    -ms-overflow-style: none; 
    scrollbar-width: none; 
    max-width: calc(100vw - 120px); 
}

@media (min-width: 768px) {
    .year-selector-container { max-width: 500px; }
}

.year-selector-container::-webkit-scrollbar {
    display: none;
}

/* --- Carousel Arrow Buttons --- */
.year-nav-btn {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.1);
    color: #333;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(18, 11, 34, 0.04);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.year-nav-btn:hover {
    background: rgba(0,0,0,0.05);
    transform: scale(1.05);
}

.year-nav-btn:active {
    transform: scale(0.95);
}

/* --- Year Buttons --- */
.year-btn {
    border: none;
    background: transparent;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-family: 'Space Grotesk', sans-serif; 
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: inherit;
    flex-shrink: 0;
    border: 1px solid transparent;
}
.year-btn:hover { 
    background: rgba(0,0,0,0.05); 
}
.year-btn.active {
    background: var(--primary-color, #0056b3); 
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* --- Event Grid (Photos with labels) --- */
.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding-bottom: 4rem;
}
.event-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
}
.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.event-img-wrap {
    overflow: hidden;
    aspect-ratio: 4/3;
}
.event-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.event-card:hover .event-img-wrap img {
    transform: scale(1.08);
}
.event-info {
    padding: 1.5rem;
}
.event-info h3 { margin: 0 0 0.5rem 0; font-size: 1.25rem; }
.event-info p { margin: 0; color: #666; font-size: 0.95rem; }

/* --- Fullscreen Gallery Modal --- */
.fullscreen-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #fff;
    z-index: 1050;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.fullscreen-modal.show {
    opacity: 1;
    visibility: visible;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: sticky;
    top: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    z-index: 10;
    border-bottom: 1px solid #eee;
}
.modal-header h2 { margin: 0; font-size: 1.5rem; }
.close-btn {
    background: none; border: none; font-size: 2.5rem; line-height: 1;
    cursor: pointer; color: #333; transition: color 0.2s;
}
.close-btn:hover { color: #d9534f; }

/* --- Masonry Grid (Popup Photos) --- */
.masonry-grid {
    column-count: 3;
    column-gap: 1.5rem;
    padding: 2rem 0;
}

/* Changed from 992px to 768px so laptops stay at 3 columns */
@media (max-width: 768px) { 
    .masonry-grid { column-count: 2; } 
}

/* Mobile phones stay at 1 column */
@media (max-width: 576px) { 
    .masonry-grid { column-count: 1; } 
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}
.gallery-item img {
    width: 100%;
    display: block;
    transition: filter 0.3s ease;
}
.gallery-item:hover img { filter: brightness(0.85); }

/* --- Lightbox Viewer --- */
.lightbox-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 1100;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease;
}
.lightbox-modal.show { opacity: 1; visibility: visible; }

.lightbox-toolbar {
    position: absolute; top: 0; left: 0; width: 100%;
    padding: 1rem 2rem;
    display: flex; justify-content: space-between; align-items: center;
    color: #fff; z-index: 1110;
}
.lightbox-actions { display: flex; gap: 1.5rem; align-items: center; }
.action-btn { color: #fff; background: none; border: none; cursor: pointer; text-decoration: none;}
.action-btn:hover { color: #ccc; }
.close-lightbox { font-size: 2.5rem; line-height: 0.5;}

.lightbox-content img {
    max-height: 85vh; max-width: 90vw;
    object-fit: contain;
    user-select: none;
}

/* ========================================== */
/* PASTE THIS NEW CODE AT THE BOTTOM          */
/* ========================================== */

/* --- Lightbox Thumbnails (WhatsApp Style) --- */
.lightbox-thumbnails {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    max-width: 90vw;
    overflow-x: auto;
    padding: 10px;
    z-index: 1110;
    /* Hide scrollbar for a cleaner look */
    -ms-overflow-style: none;  
    scrollbar-width: none;  
}
.lightbox-thumbnails::-webkit-scrollbar { 
    display: none; 
}
.lightbox-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    cursor: pointer;
    object-fit: cover;
    opacity: 0.4;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    flex-shrink: 0; /* Prevents thumbnails from squishing */
}
.lightbox-thumb:hover {
    opacity: 0.8;
}
.lightbox-thumb.active {
    opacity: 1;
    border-color: #fff;
    transform: scale(1.1);
}

.nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.1); border: none; color: #fff;
    width: 50px; height: 50px; border-radius: 50%;
    font-size: 1.5rem; cursor: pointer; transition: background 0.2s;
    z-index: 1110;
}
.nav-btn:hover { background: rgba(255,255,255,0.3); }
.prev-btn { left: 2%; }
.next-btn { right: 2%; }

@media (max-width: 768px) {
    .nav-btn { width: 40px; height: 40px; font-size: 1.2rem; }
}

/* ========================================== */
/* Photo Gallery Hover Icon Overlay           */
/* ========================================== */

.photo-view-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0);
    transition: background 0.3s ease;
    z-index: 2; /* Sits above the image but below the photo counter badge */
}

/* Darken the image slightly on hover to make the icon pop */
.lead-card:hover .photo-view-overlay {
    background: rgba(0,0,0,0.25);
}

.photo-view-icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--violet, #6D28D9);
    font-size: 24px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease, color 0.3s ease;
}

/* Fade in and pop out the icon on hover */
.lead-card:hover .photo-view-icon {
    transform: scale(1);
    opacity: 1;
}

/* Subtle extra interaction when hovering directly over the icon itself */
.lead-card:hover .photo-view-icon:hover {
    transform: scale(1.15);
    color: var(--pink, #EC4899);
}

/* Responsive adjustment for mobile screens */
@media (max-width: 768px) {
    .photo-view-icon {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}