/* =========================================================
   FINBOG STUDIOS — GALLERY
   ========================================================= */


/* =========================================================
   HERO
   ========================================================= */

.gallery-hero {
    min-height: 65vh;

    display: flex;
    align-items: center;

    position: relative;
    overflow: hidden;

    background:
        radial-gradient(
            circle at 80% 40%,
            rgba(212, 175, 55, 0.12),
            transparent 30%
        ),
        #050505;
}

.gallery-hero-content {
    width: min(1200px, calc(100% - 80px));

    margin: 0 auto;

    padding-top: 100px;

    position: relative;
    z-index: 2;
}

.gallery-eyebrow {
    margin: 0 0 20px;

    color: #d4af37;

    font-size: 0.7rem;
    font-weight: 700;

    letter-spacing: 0.3em;
}

.gallery-hero h1 {
    margin: 0;

    color: #ffffff;

    font-size: clamp(4rem, 10vw, 9rem);
    line-height: 0.85;

    font-weight: 800;

    letter-spacing: -0.06em;
}

.gallery-hero h1 span {
    color: #d4af37;
}

.gallery-hero-text {
    max-width: 550px;

    margin: 35px 0 0;

    color: rgba(255, 255, 255, 0.55);

    font-size: 1rem;
    line-height: 1.8;
}


/* =========================================================
   GALLERY SECTION
   ========================================================= */

.gallery-section {
    padding: 100px 0 140px;

    background: #050505;
}

.gallery-container {
    width: min(1400px, calc(100% - 80px));

    margin: 0 auto;
}


/* =========================================================
   FILTERS
   ========================================================= */

.gallery-filters {
    display: flex;
    flex-wrap: wrap;

    gap: 10px;

    margin-bottom: 35px;

    padding-bottom: 20px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gallery-filter {
    padding: 11px 20px;

    border: 1px solid rgba(255, 255, 255, 0.15);

    background: transparent;

    color: rgba(255, 255, 255, 0.5);

    font-family: inherit;
    font-size: 0.65rem;
    font-weight: 700;

    letter-spacing: 0.18em;

    cursor: pointer;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
}

.gallery-filter:hover {
    border-color: #d4af37;

    color: #ffffff;
}

.gallery-filter.active {
    background: #d4af37;

    border-color: #d4af37;

    color: #050505;
}


/* =========================================================
   GRID
   ========================================================= */

.gallery-grid {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    grid-auto-rows: 280px;

    gap: 14px;
}


/* =========================================================
   GALLERY ITEMS
   ========================================================= */

.gallery-item {
    position: relative;

    width: 100%;
    height: 100%;

    padding: 0;

    overflow: hidden;

    border: none;

    background: #111111;

    cursor: pointer;

    text-align: left;
}

.gallery-item-large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item-wide {
    grid-column: span 2;
}


/* =========================================================
   IMAGES
   ========================================================= */

.gallery-item img {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    filter: brightness(0.72);

    transform: scale(1.01);

    transition:
        transform 0.7s ease,
        filter 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.07);

    filter: brightness(0.95);
}


/* =========================================================
   OVERLAY
   ========================================================= */

.gallery-overlay {
    position: absolute;

    inset: 0;

    z-index: 2;

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    padding: 25px;

    background:
        linear-gradient(
            to top,
            rgba(0, 0, 0, 0.9),
            rgba(0, 0, 0, 0.05) 70%
        );
}

.gallery-category {
    display: block;

    margin-bottom: 7px;

    color: #d4af37;

    font-size: 0.6rem;
    font-weight: 700;

    letter-spacing: 0.2em;
}

.gallery-overlay h2 {
    margin: 0;

    color: #ffffff;

    font-size: 1rem;
    font-weight: 700;
}

.gallery-arrow {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255, 255, 255, 0.3);

    color: #ffffff;

    font-size: 1.1rem;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
}

.gallery-item:hover .gallery-arrow {
    background: #d4af37;

    border-color: #d4af37;

    color: #050505;
}


/* =========================================================
   FILTER HIDDEN
   ========================================================= */

.gallery-item.is-hidden {
    display: none;
}


/* =========================================================
   LIGHTBOX
   ========================================================= */

.lightbox {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 40px;

    background: rgba(0, 0, 0, 0.96);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;
}

.lightbox-content {
    position: relative;

    width: min(1200px, 90vw);
    height: min(80vh, 850px);

    display: flex;
    align-items: center;
    justify-content: center;
}

#lightboxImage {
    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    display: block;

    object-fit: contain;

    box-shadow:
        0 30px 100px rgba(0, 0, 0, 0.7);
}


/* =========================================================
   LIGHTBOX BUTTONS
   ========================================================= */

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: fixed;

    z-index: 10000;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 50px;
    height: 50px;

    border: 1px solid rgba(255, 255, 255, 0.2);

    background: rgba(0, 0, 0, 0.6);

    color: #ffffff;

    font-family: inherit;

    cursor: pointer;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: #d4af37;

    border-color: #d4af37;

    color: #050505;
}

.lightbox-close {
    top: 25px;
    right: 25px;

    font-size: 1.5rem;
}

.lightbox-prev {
    top: 50%;
    left: 25px;

    transform: translateY(-50%);

    font-size: 1.2rem;
}

.lightbox-next {
    top: 50%;
    right: 25px;

    transform: translateY(-50%);

    font-size: 1.2rem;
}


/* =========================================================
   LIGHTBOX INFO
   ========================================================= */

.lightbox-info {
    position: fixed;

    left: 50%;
    bottom: 30px;

    transform: translateX(-50%);

    text-align: center;

    pointer-events: none;
}

.lightbox-category {
    display: block;

    margin-bottom: 5px;

    color: #d4af37;

    font-size: 0.6rem;
    font-weight: 700;

    letter-spacing: 0.2em;
}

.lightbox-title {
    margin: 0;

    color: #ffffff;

    font-size: 1.1rem;
}


/* =========================================================
   BODY LOCK
   ========================================================= */

body.lightbox-open {
    overflow: hidden;
}


/* =========================================================
   FOCUS
   ========================================================= */

.gallery-filter:focus-visible,
.gallery-item:focus-visible,
.lightbox-close:focus-visible,
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible {
    outline: 2px solid #d4af37;

    outline-offset: 3px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1000px) {

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);

        grid-auto-rows: 260px;
    }

    .gallery-item-large {
        grid-column: span 2;
        grid-row: span 2;
    }

    .gallery-item-wide {
        grid-column: span 2;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 650px) {

    .gallery-hero {
        min-height: 60vh;
    }

    .gallery-hero-content {
        width: calc(100% - 36px);

        padding-top: 90px;
    }

    .gallery-hero h1 {
        font-size: clamp(3.2rem, 17vw, 5.5rem);
    }

    .gallery-hero-text {
        margin-top: 25px;

        font-size: 0.9rem;
    }

    .gallery-section {
        padding: 75px 0 100px;
    }

    .gallery-container {
        width: calc(100% - 36px);
    }

    .gallery-grid {
        grid-template-columns: 1fr;

        grid-auto-rows: 260px;

        gap: 10px;
    }

    .gallery-item-large,
    .gallery-item-wide {
        grid-column: span 1;
        grid-row: span 1;
    }

    .gallery-overlay {
        padding: 18px;
    }

    .gallery-overlay h2 {
        font-size: 0.9rem;
    }

    .gallery-arrow {
        width: 38px;
        height: 38px;
    }

    .lightbox {
        padding: 15px;
    }

    .lightbox-content {
        width: 100%;
        height: 75vh;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;

        width: 44px;
        height: 44px;
    }

    .lightbox-prev,
    .lightbox-next {
        top: auto;
        bottom: 20px;

        width: 44px;
        height: 44px;

        transform: none;
    }

    .lightbox-prev {
        left: 20px;
    }

    .lightbox-next {
        right: 20px;
    }

    .lightbox-info {
        bottom: 27px;

        padding: 0 70px;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 400px) {

    .gallery-hero-content,
    .gallery-container {
        width: calc(100% - 28px);
    }

    .gallery-grid {
        grid-auto-rows: 220px;
    }

    .gallery-overlay h2 {
        font-size: 0.85rem;
    }

    .gallery-arrow {
        width: 34px;
        height: 34px;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .gallery-item img,
    .gallery-filter,
    .lightbox {
        transition: none;
    }
}