/* ==================== GALLERY PAGE ==================== */

/* Override base.css navy gradient — gallery uses black like the rest of the site */
body {
    background: #0a0a0a !important;
    background-image: none !important;
}

/* ── Header scroll for gallery page ── */
header#mainHeader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 90px;
    padding: 0 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    z-index: 1000;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

header#mainHeader.scrolled {
    background: #0a0a0a !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

#headerGoldLine {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 204, 0, 0.15) 15%,
            rgba(255, 204, 0, 0.4) 35%, rgba(255, 204, 0, 0.5) 50%,
            rgba(255, 204, 0, 0.4) 65%, rgba(255, 204, 0, 0.15) 85%, transparent 100%);
    box-shadow: 0 0 6px rgba(255, 204, 0, 0.3), 0 1px 4px rgba(255, 204, 0, 0.15);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

header#mainHeader.scrolled #headerGoldLine {
    opacity: 1;
}

/* ── Hero banner ── */
.gallery-hero {
    padding: 160px 2rem 80px;
    text-align: center;
    background: transparent;
    position: relative;
}

.gallery-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 204, 0, 0.3), transparent);
}

.gallery-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #FFD700;
    margin-bottom: 1rem;
}

.gallery-hero h1 {
    font-family: 'Lobster', cursive;
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 400;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.gallery-hero p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 1.8rem;
}

.ig-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #FFD700;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: opacity 0.2s;
}

.ig-link:hover {
    opacity: 0.75;
}

/* ── Filter tabs ── */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 2.5rem 2rem 2rem;
}

.filter-btn {
    padding: 0.55rem 1.4rem;
    border-radius: 6px;
    border: 1.5px solid rgba(255, 204, 0, 0.35);
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.filter-btn:hover {
    border-color: #FFD700;
    color: #FFD700;
}

.filter-btn.active {
    background: #FFD700;
    border-color: #FFD700;
    color: #0a0a0a;
    box-shadow: 0 0 16px rgba(255, 204, 0, 0.4);
}

/* ── Masonry grid ── */
.gallery-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem 80px;
}

.masonry-grid {
    columns: 4;
    column-gap: 10px;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    display: block;
    background: #1a1a1a;
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.masonry-item:hover img {
    transform: scale(1.04);
}

.masonry-item .item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.masonry-item:hover .item-overlay {
    background: rgba(0, 0, 0, 0.45);
}

.item-overlay svg {
    color: #FFD700;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.masonry-item:hover .item-overlay svg {
    opacity: 1;
    transform: scale(1);
}

.masonry-item.hidden {
    display: none;
}

/* ── Loading / empty states ── */
.gallery-status {
    text-align: center;
    padding: 4rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1rem;
    width: 100%;
}

.gallery-loading-spinner {
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 204, 0, 0.2);
    border-top-color: #FFD700;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Lightbox ── */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.93);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.open {
    opacity: 1;
    pointer-events: all;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
    object-fit: contain;
    transition: opacity 0.15s ease;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    z-index: 10000;
}

.lightbox-close:hover {
    color: #FFD700;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 204, 0, 0.3);
    color: #FFD700;
    font-size: 2rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    z-index: 10000;
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 204, 0, 0.15);
    border-color: #FFD700;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
    .masonry-grid {
        columns: 3;
    }
}

@media (max-width: 768px) {
    .gallery-hero {
        padding: 120px 1.5rem 60px;
    }

    .gallery-main {
        padding: 0 1rem 60px;
    }

    .masonry-grid {
        columns: 2;
    }

    .filter-bar {
        padding: 2rem 1rem 1.5rem;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }

    .lightbox-prev {
        left: 1rem;
    }

    .lightbox-next {
        right: 1rem;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
    }

    header#mainHeader {
        padding: 0 1.5rem;
    }
}

@media (max-width: 420px) {
    .masonry-grid {
        columns: 1;
    }

    .filter-btn {
        font-size: 0.8rem;
        padding: 0.5rem 1.2rem;
    }
}