/* ============================================
   GALLERY PAGE (Firestore) - The LookBook
   ============================================ */

:root {
    --black: #000000;
    --dark: #0a0a0a;
    --dark-gray: #1a1a1a;
    --mid-gray: #2a2a2a;
    --light-gray: #888888;
    --white: #ffffff;
    --gold: #c9a962;
}

/* Gallery Header */
.gallery-header {
    padding: 120px 40px 50px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.gallery-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 300;
    letter-spacing: 0.5rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.gallery-subtitle {
    font-size: 0.9rem;
    letter-spacing: 0.15rem;
    color: var(--gold);
    text-transform: uppercase;
}

/* Filter Section */
.filter-section {
    padding: 0 20px 40px;
    display: flex;
    justify-content: center;
}

.filter-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 22px;
    background: transparent;
    border: 1px solid var(--mid-gray);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tab-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.15rem;
    text-transform: uppercase;
    color: var(--light-gray);
    transition: color 0.3s ease;
}

.filter-tab-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 0.7rem;
    letter-spacing: 0.02rem;
    color: var(--mid-gray);
    transition: color 0.3s ease;
}

.filter-tab:hover,
.filter-tab.active {
    border-color: var(--gold);
}

.filter-tab:hover .filter-tab-title,
.filter-tab.active .filter-tab-title {
    color: var(--gold);
}

.filter-tab:hover .filter-tab-subtitle,
.filter-tab.active .filter-tab-subtitle {
    color: var(--light-gray);
}

/* Gallery Section - full-bleed, edge to edge like a Beyonce.com photo page */
.gallery-section {
    padding: 0 4px 4px;
    width: 100%;
}

/* Full-width masonry grid - photos keep their real proportions, nothing
   is ever cropped. Pure-CSS column layout: items flow down each column
   and wrap, like Pinterest. */
.gallery-grid {
    columns: 3 340px;
    column-gap: 4px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: var(--dark-gray);
    display: inline-block;
    width: 100%;
    margin-bottom: 4px;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
}

.gallery-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease, filter 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.03);
    filter: brightness(0.75);
}

/* Gallery Overlay - caption sits in a gradient at the bottom of each
   card, always visible (works the same on touch swipe and mouse hover) */
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    text-align: center;
    padding: 40px 20px 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-caption {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.15rem;
    color: var(--white);
    margin-bottom: 10px;
}

.gallery-date {
    font-size: 0.75rem;
    letter-spacing: 0.1rem;
    color: var(--gold);
    text-transform: uppercase;
}

/* Image Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.image-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--mid-gray);
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2001;
}

.modal-close:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.modal-image-container {
    max-width: 90vw;
    max-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.modal-image-container img,
.modal-image-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-info {
    text-align: center;
    color: var(--white);
}

.modal-info h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 0.2rem;
    margin-bottom: 10px;
    color: var(--gold);
}

.modal-info p {
    font-size: 0.9rem;
    color: var(--light-gray);
}

/* Empty State */
.empty-state {
    width: 100%;
    padding: 60px 20px;
    text-align: center;
    color: var(--light-gray);
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 10px;
}

.loading {
    width: 100%;
    text-align: center;
    padding: 60px 20px;
    color: var(--light-gray);
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-header {
        padding: 100px 20px 30px;
    }

    .gallery-title {
        font-size: 2.5rem;
        letter-spacing: 0.3rem;
    }

    .gallery-subtitle {
        font-size: 0.8rem;
    }

    .filter-tabs {
        gap: 8px;
        padding: 0 20px;
    }

    .filter-tab {
        padding: 8px 14px;
    }

    .filter-tab-title {
        font-size: 0.58rem;
    }

    .filter-tab-subtitle {
        font-size: 0.62rem;
    }

    /* Full-bleed single column, edge to edge, no cropping */
    .gallery-section {
        padding: 0 2px 2px;
    }

    .gallery-grid {
        columns: 1;
        column-gap: 2px;
    }

    .gallery-item {
        margin-bottom: 2px;
    }

    .gallery-overlay {
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .gallery-title {
        font-size: 2rem;
    }

    .modal-image-container {
        max-width: 95vw;
        max-height: 60vh;
        margin-bottom: 20px;
    }

    .modal-info h3 {
        font-size: 1.2rem;
    }
}
