/* ─── EVENT GALLERY PAGE STYLES ─── */

/* ─── PAGE HEADER ─── */
.gallery-page-header {
    padding: 120px 52px 60px;
    background: var(--dark);
    position: relative;
    overflow: hidden;
    min-height: 45vh;
    display: flex;
    align-items: center;
}

.gallery-page-header-bg {
    position: absolute;
    inset: 0;
    background: url('../img/uploads/hero-image.jpg') center 40% / cover no-repeat;
    opacity: 0.15;
    pointer-events: none;
}

.gallery-page-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 30%, rgba(75, 59, 158, 0.3), transparent 70%);
    pointer-events: none;
}

.gallery-page-header .page-header-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.gallery-page-header .page-header-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .10em;
    text-transform: uppercase;
    color: var(--yellow);
    margin-bottom: 20px;
}

.gallery-page-header .page-header-eyebrow::before {
    content: '';
    width: 24px;
    height: 1.5px;
    background: var(--yellow);
}

.gallery-page-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(36px, 5vw, 60px);
    font-weight: 700;
    line-height: 1.06;
    color: #fff;
    letter-spacing: -.02em;
    margin-bottom: 16px;
}

.gallery-page-header h1 em {
    font-style: italic;
    color: var(--yellow);
}

.gallery-page-header .page-header-desc {
    font-size: 16px;
    line-height: 1.75;
    color: #f3f3f3;
    font-weight: 300;
    max-width: 540px;
}

/* ─── GALLERY SECTION ─── */
.gallery-section {
    padding: 60px 52px 80px;
    background: var(--white);
}

.gallery-group {
    margin-bottom: 48px;
}

.gallery-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0 12px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.gallery-group-title {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.gallery-group-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.gallery-group-title a:hover {
    color: var(--purple);
}

.gallery-group-count {
    font-size: 13px;
    color: var(--muted);
    background: var(--light);
    padding: 3px 14px;
    border-radius: 20px;
    font-weight: 500;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.gallery-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--white);
    transition: box-shadow 0.3s, transform 0.3s;
    cursor: pointer;
}

.gallery-card:hover {
    box-shadow: 0 8px 30px rgba(28, 24, 37, 0.12);
    transform: translateY(-4px);
}

.gallery-card-img {
    height: 220px;
    overflow: hidden;
    background: var(--light);
    position: relative;
}

.gallery-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.gallery-card:hover .gallery-card-img img {
    transform: scale(1.05);
}

.gallery-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(75, 59, 158, 0.85);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    letter-spacing: 0.04em;
}

.gallery-card-badge.featured {
    background: var(--yellow);
    color: var(--dark);
}

.gallery-card-info {
    padding: 14px 16px;
}

.gallery-card-caption {
    font-size: 13px;
    color: var(--mid);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── LIGHTBOX / MODAL ─── */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(28, 24, 37, 0.92);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-content {
    max-width: 900px;
    max-height: 85vh;
    position: relative;
    animation: lightboxIn 0.3s ease-out;
}

@keyframes lightboxIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-content img {
    width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -44px;
    right: 0;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lightbox-caption {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 16px 0 0;
    font-size: 14px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav.prev {
    left: -60px;
}

.lightbox-nav.next {
    right: -60px;
}

/* ─── EMPTY STATE ─── */
.empty-gallery {
    text-align: center;
    padding: 80px 20px;
}

.empty-gallery .icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-gallery h2 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    color: var(--dark);
    margin-bottom: 8px;
}

.empty-gallery p {
    color: var(--mid);
    margin-bottom: 24px;
}

.empty-gallery .btn-primary {
    display: inline-block;
    background: var(--purple);
    color: #fff;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.empty-gallery .btn-primary:hover {
    background: var(--purple-dk);
}

/* ─── FADE UP ANIMATION ─── */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1100px) {
    .gallery-page-header {
        padding: 100px 28px 40px;
        min-height: 35vh;
    }
    .gallery-section {
        padding: 40px 28px 60px;
    }
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .gallery-page-header {
        padding: 80px 16px 30px;
        min-height: 30vh;
    }
    .gallery-section {
        padding: 30px 16px 40px;
    }
    .gallery-group-title {
        font-size: 20px;
    }
    .gallery-card-img {
        height: 160px;
    }
    .lightbox-overlay {
        padding: 16px;
    }
    .lightbox-nav.prev {
        left: -8px;
    }
    .lightbox-nav.next {
        right: -8px;
    }
    .lightbox-nav {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .gallery-card-img {
        height: 200px;
    }
}