/* ==========================================
   GALLERY PAGE
========================================== */

.gallery-hero {
    position: relative;
    min-height: 430px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 120px 0 80px;
    background: var(--color-bg);
}

.gallery-hero .container {
    position: relative;
    z-index: 2;
}

.gallery-hero-content {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.gallery-hero-bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 100%;
    text-align: center;

    font-size: clamp(5rem, 15vw, 12rem);
    font-weight: 800;
    letter-spacing: .08em;

    color: rgba(212, 175, 55, .035);

    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}

.gallery-hero .section-tag {
    display: inline-block;
    margin-bottom: 20px;

    color: var(--color-primary);
    font-size: .85rem;
    font-weight: var(--fw-semibold);
    letter-spacing: .2em;
    text-transform: uppercase;
}

.gallery-hero h1 {
    margin: 0 0 24px;

    color: var(--color-text);
    font-size: clamp(2.8rem, 6vw, 5rem);
    line-height: 1.05;
    font-weight: var(--fw-bold);
}

.gallery-hero h1 span {
    color: var(--color-primary);
}

.gallery-hero p {
    max-width: 680px;
    margin: 0 auto;

    color: var(--color-text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
}

.gallery-hero-divider {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.gallery-hero-divider span {
    width: 70px;
    height: 2px;

    background: var(--color-primary);
}


/* ==========================================
   GALLERY GRID
========================================== */

.gallery-grid {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;

    columns: 3;
    column-gap: 18px;

    padding: 20px 0 60px;
}

/* ==========================================
   GALLERY ITEM
========================================== */

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid rgba(212, 175, 55, 0.25);
    background: #151515;
    margin-bottom: 14px;
}

/* ==========================================
   IMAGE
========================================== */

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;

    transition:
        transform 0.6s cubic-bezier(.2,.7,.2,1),
        filter 0.6s ease;
}

/* ==========================================
   HOVER OVERLAY
========================================== */

.gallery-item::after {
    content: "";
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.45);

    opacity: 0;

    transition:
        opacity 0.4s ease;
}

/* ==========================================
   VIEW ICON
========================================== */

.gallery-item::before {
    content: "↗";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -40%) scale(.7);
    border: 1px solid rgba(212, 175, 55, 0.8);
    border-radius: 50%;
    color: #d4af37;
    background: rgba(0, 0, 0, 0.65);
    font-size: 1.4rem;
    font-weight: 500;
    opacity: 0;
    z-index: 2;
    transition:
        opacity 0.4s ease,
        transform 0.4s ease;
}

/* ==========================================
   HOVER
========================================== */

.gallery-item:hover img {
    transform: scale(1.045);
    filter: brightness(0.72);
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-item:hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.gallery-item:hover {
    border-color: rgba(212, 175, 55, 0.65);
}

/* ==========================================
   TABLET
========================================== */

@media (max-width: 1000px) {

    .gallery-grid {
        columns: 2;
        column-gap: 16px;
    }

    .gallery-item {
        margin-bottom: 16px;
    }
}


/* ==========================================
   MOBILE
========================================== */

@media (max-width: 600px) {

    .gallery-grid {
        columns: 1;
        padding: 15px 0 40px;
    }

    .gallery-item {
        margin-bottom: 14px;
    }
}

/* ==========================================
   GALLERY LIGHTBOX
========================================== */

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 40px;

    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.35s ease,
        visibility 0.35s ease;
}

.gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}


/* ==========================================
   LIGHTBOX IMAGE
========================================== */

.lightbox-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    height: fit-content;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-content img {
    display: block;
    height: 88vh;
    width: auto;
    max-width: 88vw;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.45);
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.75);
}

.gallery-lightbox.active .lightbox-content img {
    transform: scale(1);
}


/* ==========================================
   CLOSE BUTTON
========================================== */

.lightbox-close {
    position: absolute;

    top: 25px;
    right: 30px;

    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 50%;

    color: var(--color-primary);
    background: rgba(0, 0, 0, 0.6);

    font-size: 1.2rem;

    cursor: pointer;

    z-index: 2;

    transition:
        transform 0.3s ease,
        background 0.3s ease,
        border-color 0.3s ease;
}

.lightbox-close:hover {
    transform: rotate(90deg);
    background: rgba(212, 175, 55, 0.12);
    border-color: var(--color-primary);
}


/* ==========================================
   NAVIGATION
========================================== */

.lightbox-prev,
.lightbox-next {
    position: absolute;

    top: 50%;
    transform: translateY(-50%);

    width: 52px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 50%;

    color: var(--color-primary);
    background: rgba(0, 0, 0, 0.65);

    font-size: 1.1rem;

    cursor: pointer;

    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        transform 0.3s ease;
}

.lightbox-prev {
    left: 25px;
}

.lightbox-next {
    right: 25px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(212, 175, 55, 0.12);
    border-color: var(--color-primary);
}

.lightbox-prev:hover {
    transform: translateY(-50%) translateX(-3px);
}

.lightbox-next:hover {
    transform: translateY(-50%) translateX(3px);
}


/* ==========================================
   MOBILE
========================================== */

@media (max-width: 768px) {

    .gallery-lightbox {
        padding: 20px;
    }

    .lightbox-content,
    .lightbox-content img {
        max-width: 92vw;
        max-height: 80vh;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 42px;
        height: 42px;
    }

    .lightbox-prev {
        left: 12px;
    }

    .lightbox-next {
        right: 12px;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
    }
}