/* ============================================
   Gallery — Apple Design System
   Masonry layout with full thumbnails
   ============================================ */

/* ── Event Description — white tile ── */
.event-description {
    background-color: #ffffff;
    padding: 0 0 48px;
    padding-top: 100px;
}

.event-info {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

.event-info h2 {
    font-size: 40px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0;
    color: #1d1d1f;
    margin-bottom: 16px;
}

.event-info h2 .theme-gradient {
    color: #0066cc;
}

.event-info p {
    color: #7a7a7a;
    font-size: 17px;
    line-height: 1.47;
    letter-spacing: -0.374px;
    margin-bottom: 8px;
}

.event-meta {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.event-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: -0.224px;
    color: #7a7a7a;
}

.event-meta-item .icon {
    color: #0066cc;
    font-size: 18px;
}

/* ── Gallery Masonry — parchment tile ── */
.gallery-section {
    background-color: #f5f5f7;
    padding: 48px 0 80px;
}

.gallery-section .container {
    max-width: 1200px;
}

/* Flex-wrap — left-to-right, top-to-bottom, full thumbnails */
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0;
}

.gallery-item {
    position: relative;
    flex: 1 1 calc(25% - 9px); /* flex-grow: 1 allows items to fill gaps */
    min-width: 200px; /* Ensures they don't get too small */
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills the flex item without distortion */
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.03);
}

/* Subtle expand icon on hover */
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.25) 0%,
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* ── Lightbox — Apple-style dark overlay ── */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox.open {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    cursor: pointer;
}

.lightbox-counter {
    position: absolute;
    top: -36px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: -0.224px;
}

.lightbox-close {
    position: absolute;
    top: 16px; right: 16px;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2002;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.lightbox-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-info {
    margin-top: 16px;
    text-align: center;
    position: relative;
    z-index: 2002;
}

.lightbox-info p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    letter-spacing: -0.12px;
}

/* ── Responsive ── */
@media (max-width: 1068px) {
    .gallery-item { flex: 0 0 calc(33.333% - 8px); }
    .event-info h2 { font-size: 34px; letter-spacing: -0.374px; }
}

@media (max-width: 834px) {
    .gallery-item { flex: 0 0 calc(50% - 6px); border-radius: 10px; min-width: 0; }
    .gallery-grid { gap: 10px; }
    .event-meta { gap: 20px; }
}

@media (max-width: 480px) {
    .gallery-item { flex: 0 0 calc(50% - 4px); border-radius: 8px; min-width: 0; }
    .gallery-grid { gap: 8px; }
    .event-description { padding-top: 80px; }
    .event-info h2 { font-size: 28px; }
}