/* =========================================================
   ENDE HOLIDAYS — GALLERY DETAIL
   Premium Photo Gallery
   ISOLATED CSS
========================================================= */


/* =========================================================
   VARIABLES
========================================================= */

.gallery-detail-page {
    --gd-gold: #E99F24;
    --gd-gold-light: #F0B84D;
    --gd-gold-dark: #CB981F;

    --gd-dark: #241A10;
    --gd-brown: #3A2818;
    --gd-cream: #FBF7F0;
    --gd-beige: #F5EAD7;

    --gd-text: #30251B;
    --gd-muted: #75685A;

    --gd-radius: 20px;

    background: var(--gd-cream);
    color: var(--gd-text);

    overflow: visible;
}


/* =========================================================
   HERO
========================================================= */

.gallery-detail-hero {
    position: relative;

    min-height: 480px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background: var(--gd-dark);
}


.gallery-detail-hero-image {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    object-position: center;
}


.gallery-detail-hero-overlay {
    position: absolute;

    inset: 0;

    z-index: 1;

    background:
        linear-gradient(
            180deg,
            rgba(36, 26, 16, .18) 0%,
            rgba(36, 26, 16, .38) 45%,
            rgba(36, 26, 16, .82) 100%
        );
}


.gallery-detail-hero-content {
    position: relative;

    z-index: 2;

    width: min(850px, calc(100% - 40px));

    padding: 90px 0 85px;

    text-align: center;

    color: #fff;
}


.gallery-detail-eyebrow {
    display: inline-block;

    margin-bottom: 18px;

    color: var(--gd-gold-light);

    font-size: 11px;
    font-weight: 700;

    letter-spacing: .25em;
    text-transform: uppercase;
}


.gallery-detail-hero h1 {
    margin: 0;

    color: #fff;

    font-size: clamp(42px, 6vw, 72px);

    line-height: 1.05;

    font-weight: 700;

    letter-spacing: -.035em;
}


.gallery-detail-line {
    width: 58px;
    height: 3px;

    margin: 25px auto 22px;

    background: var(--gd-gold);

    border-radius: 50px;
}


.gallery-detail-hero-content p {
    margin: 0;

    color: rgba(255,255,255,.88);

    font-size: 16px;

    line-height: 1.75;
}


/* =========================================================
   CONTENT
========================================================= */

.gallery-detail-content {
    position: relative;

    padding: 78px 0 110px;

    background: var(--gd-cream);
}


.gallery-detail-container {
    width: min(1180px, calc(100% - 40px));

    margin: 0 auto;
}


/* =========================================================
   BREADCRUMB
========================================================= */

.gallery-detail-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 0;

    min-height: 54px;

    margin: 0 0 68px;

    padding: 0 0 0 2px;

    border-bottom: 1px solid rgba(58,40,24,.10);

    color: var(--gd-muted);

    font-family: var(--font-body);

    font-size: 12px;
    line-height: 1.5;
}


.gallery-detail-breadcrumb a {
    display: inline-flex;
    align-items: center;

    color: var(--gd-muted);

    text-decoration: none;

    font-size: 12px;
    font-weight: 500;

    transition:
        color .25s ease;
}


.gallery-detail-breadcrumb a:hover {
    color: var(--gd-gold-dark);
}


.gallery-detail-breadcrumb span {
    display: inline-flex;
    align-items: center;

    color: rgba(58,40,24,.35);

    font-size: 12px;
}


.gallery-detail-breadcrumb a + span {
    margin: 0 10px;
}


.gallery-detail-breadcrumb span[aria-current="page"] {
    color: var(--gd-gold-dark);

    font-weight: 600;
}


/* =========================================================
   HEADING
========================================================= */

.gallery-detail-heading {
    max-width: 760px;

    margin: 0 auto 48px;

    text-align: center;
}

.gallery-detail-label {
    display: inline-block;

    margin-bottom: 12px;

    color: var(--gd-gold-dark);

    font-size: 11px;
    font-weight: 700;

    letter-spacing: .22em;
    text-transform: uppercase;
    
}

.gallery-detail-heading h2 {
    margin: 0;

    color: var(--gd-dark);

    font-size: clamp(30px, 4vw, 46px);

    line-height: 1.15;

    letter-spacing: -.03em;
}

.gallery-detail-heading p {
    max-width: 650px;

    margin: 20px auto 0;

    color: var(--gd-muted);

    font-size: 15px;

    line-height: 1.8;
}


/* =========================================================
   BREADCRUMB
   POSISI: SETELAH HEADING
========================================================= */

.gallery-detail-breadcrumb {
    display: flex;

    align-items: center;

    justify-content: center;

    flex-wrap: wrap;

    gap: 0;

    margin: 0 auto 48px;

    padding: 0 0 18px;

    border-bottom: 1px solid rgba(58,40,24,.10);

    color: var(--gd-muted);

    font-family: var(--font-body);

    font-size: 12px;

    line-height: 1.5;
}

.gallery-detail-breadcrumb a {
    color: var(--gd-muted);

    text-decoration: none;

    font-size: 12px;

    font-weight: 500;

    transition: color .25s ease;
}

.gallery-detail-breadcrumb a:hover {
    color: var(--gd-gold-dark);
}

.gallery-detail-breadcrumb > span {
    color: rgba(58,40,24,.35);

    font-size: 12px;
}

.gallery-detail-breadcrumb a + span {
    margin: 0 10px;
}

.gallery-detail-breadcrumb
span[aria-current="page"] {
    color: var(--gd-gold-dark);

    font-weight: 600;
}


/* =========================================================
   PHOTO GRID
========================================================= */

/* =========================================================
   PHOTO GRID
========================================================= */

.gallery-detail-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 24px;
}


/* =========================================================
   PHOTO CARD
========================================================= */

.gallery-detail-card {
    display: block;

    position: relative;

    min-width: 0;

    overflow: hidden;

    border-radius: 20px;

    background: var(--gallery-dark);

    box-shadow:
        0 10px 30px rgba(36, 26, 16, .10);

    text-decoration: none;

    transition:
        transform .35s ease,
        box-shadow .35s ease;
}


/* =========================================================
   IMAGE FRAME
========================================================= */

.gallery-detail-image {
    position: relative;

    width: 100%;

    aspect-ratio: 16 / 10;

    overflow: hidden;

    background: var(--gallery-dark);
}


/* =========================================================
   IMAGE
========================================================= */

.gallery-detail-image img {
    display: block;

    width: 100%;
    height: 100%;

    max-width: none;

    object-fit: cover;
    object-position: center center;

    margin: 0;
    padding: 0;

    transform: scale(1.001);

    transition:
        transform .65s cubic-bezier(.2, .7, .2, 1),
        filter .4s ease;
}


/* =========================================================
   OVERLAY
========================================================= */

.gallery-detail-image-overlay {
    position: absolute;

    inset: 0;

    display: flex;

    align-items: flex-end;

    justify-content: flex-start;

    padding: 24px;

    background:
        linear-gradient(
            180deg,
            rgba(36, 26, 16, 0) 45%,
            rgba(36, 26, 16, .72) 100%
        );

    opacity: 0;

    transition:
        opacity .35s ease;
}

.gallery-detail-image-overlay span {
    color: #fff;

    font-size: 12px;
    font-weight: 600;

    letter-spacing: .04em;
}

.gallery-detail-card:hover {
    transform: translateY(-6px);

    box-shadow:
        0 20px 45px rgba(36, 26, 16, .17),
        0 0 0 1px rgba(233, 159, 36, .45);
}

.gallery-detail-card:hover
.gallery-detail-image img {
    transform: scale(1.06);

    filter: saturate(1.05);
}

.gallery-detail-card:hover
.gallery-detail-image-overlay {
    opacity: 1;
}

.gallery-detail-image-overlay span {
    display: inline-flex;

    align-items: center;

    padding: 8px 13px;

    border: 1px solid rgba(255,255,255,.28);

    border-radius: 999px;

    background: rgba(36,26,16,.55);

    backdrop-filter: blur(8px);

    color: #fff;

    font-size: 11px;

    font-weight: 600;

    letter-spacing: .04em;

    line-height: 1.4;
}


/* =========================================================
   EMPTY
========================================================= */

.gallery-detail-empty {
    padding: 70px 30px;

    text-align: center;

    border: 1px solid rgba(58,40,24,.10);

    border-radius: var(--gd-radius);

    background: #fff;
}


.gallery-detail-empty h3 {
    margin: 0 0 10px;

    color: var(--gd-dark);

    font-size: 24px;
}


.gallery-detail-empty p {
    margin: 0;

    color: var(--gd-muted);

    font-size: 14px;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .gallery-detail-hero {
        min-height: 440px;
    }

    .gallery-detail-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 20px;
    }

    .gallery-detail-breadcrumb {
        margin-bottom: 55px;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 640px) {

    .gallery-detail-container {
        width: calc(100% - 28px);
    }

    .gallery-detail-heading {
        margin-bottom: 24px;
    }

    .gallery-detail-heading h2 {
        font-size: 30px;
    }

    .gallery-detail-heading p {
        font-size: 14px;
    }

    .gallery-detail-breadcrumb {
        justify-content: center;

        margin-bottom: 32px;

        padding-bottom: 15px;

        font-size: 11px;
    }

    .gallery-detail-breadcrumb a,
    .gallery-detail-breadcrumb > span {
        font-size: 11px;
    }

    .gallery-detail-breadcrumb a + span {
        margin-left: 7px;
        margin-right: 7px;
    }

    .gallery-detail-grid {
        grid-template-columns: 1fr;

        gap: 18px;
    }

    .gallery-detail-image img {
        width: 100%;
        height: auto;
    }
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .gallery-detail-card,
    .gallery-detail-image img,
    .gallery-detail-image-overlay,
    .gallery-detail-breadcrumb a {
        transition: none;
    }
}

/* =========================================================
   HERO BREADCRUMB
========================================================= */

.gallery-detail-hero-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    margin-top: 22px;

    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;

    line-height: 1.5;

    color: rgba(255, 255, 255, .72);
}

.gallery-detail-hero-breadcrumb a {
    color: rgba(255, 255, 255, .78);

    text-decoration: none;

    transition:
        color .25s ease;
}

.gallery-detail-hero-breadcrumb a:hover {
    color: var(--gallery-gold-light);
}

.gallery-detail-hero-breadcrumb > span {
    margin: 0 9px;

    color: rgba(255, 255, 255, .35);
}

.gallery-detail-hero-breadcrumb
span[aria-current="page"] {
    margin: 0;

    color: var(--gallery-gold-light);

    font-weight: 600;
}

@media (max-width: 900px) {

    .gallery-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 640px) {

    .gallery-detail-content {
        padding: 60px 0 80px;
    }

    .gallery-detail-grid {
        grid-template-columns: 1fr;

        gap: 18px;
    }

    .gallery-detail-image {
        aspect-ratio: 16 / 10;
    }

    .gallery-detail-hero-breadcrumb {
        margin-top: 18px;

        font-size: 11px;
    }

}

/* =========================================================
   PREMIUM GALLERY LIGHTBOX
========================================================= */

.gallery-lightbox {
    position: fixed;

    inset: 0;

    z-index: 99999;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 40px;

    visibility: hidden;
    opacity: 0;

    pointer-events: none;

    transition:
        opacity .35s ease,
        visibility .35s ease;
}


/* =========================================================
   OPEN
========================================================= */

.gallery-lightbox.is-open {
    visibility: visible;

    opacity: 1;

    pointer-events: auto;
}


/* =========================================================
   BACKDROP
========================================================= */

.gallery-lightbox-backdrop {
    position: absolute;

    inset: 0;

    background:
        rgba(20, 14, 9, .94);

    backdrop-filter:
        blur(8px);

    -webkit-backdrop-filter:
        blur(8px);
}


/* =========================================================
   INNER
========================================================= */

.gallery-lightbox-inner {
    position: relative;

    z-index: 2;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    width: min(1200px, 88vw);

    max-height: 90vh;
}


/* =========================================================
   IMAGE WRAP
========================================================= */

.gallery-lightbox-image-wrap {
    position: relative;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;

    max-height: 82vh;

    overflow: hidden;

    touch-action: pan-y;
}


/* =========================================================
   IMAGE
========================================================= */

.gallery-lightbox-image {
    display: block;

    width: auto;

    max-width: 100%;

    height: auto;

    max-height: 78vh;

    object-fit: contain;

    border-radius: 8px;

    box-shadow:
        0 30px 90px rgba(0, 0, 0, .45);

    user-select: none;

    -webkit-user-drag: none;

    transform:
        scale(.96)
        translateX(0);

    opacity: 0;

    transition:
        opacity .35s ease,
        transform .45s cubic-bezier(.2, .7, .2, 1);
}


/* IMAGE READY */

.gallery-lightbox.is-open
.gallery-lightbox-image {
    opacity: 1;

    transform:
        scale(1)
        translateX(0);
}


/* =========================================================
   COUNTER
========================================================= */

.gallery-lightbox-counter {
    position: absolute;

    top: -38px;

    left: 50%;

    transform: translateX(-50%);

    display: flex;

    align-items: center;

    gap: 7px;

    padding: 6px 13px;

    border: 1px solid rgba(255,255,255,.12);

    border-radius: 999px;

    background:
        rgba(255,255,255,.08);

    color: rgba(255,255,255,.92);

    font-size: 12px;

    font-weight: 600;

    letter-spacing: .04em;

    backdrop-filter:
        blur(8px);

    -webkit-backdrop-filter:
        blur(8px);
}


.gallery-lightbox-counter-separator {
    color: rgba(255,255,255,.35);
}


/* =========================================================
   CLOSE
========================================================= */

.gallery-lightbox-close {
    position: absolute;

    top: 22px;
    right: 28px;

    z-index: 5;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;

    padding: 0;

    border: 1px solid rgba(255,255,255,.15);

    border-radius: 50%;

    background:
        rgba(255,255,255,.08);

    color: #fff;

    font-family: Arial, sans-serif;

    font-size: 30px;

    line-height: 1;

    cursor: pointer;

    transition:
        background .25s ease,
        color .25s ease,
        transform .3s ease;
}


.gallery-lightbox-close:hover {
    background: var(--gallery-gold);

    color: var(--gallery-dark);

    transform: rotate(90deg);
}


/* =========================================================
   PREV / NEXT
========================================================= */

.gallery-lightbox-prev,
.gallery-lightbox-next {
    position: absolute;

    top: 50%;

    z-index: 5;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 52px;
    height: 52px;

    padding: 0;

    border: 1px solid rgba(255,255,255,.14);

    border-radius: 50%;

    background:
        rgba(255,255,255,.08);

    color: #fff;

    font-size: 21px;

    line-height: 1;

    cursor: pointer;

    transform: translateY(-50%);

    backdrop-filter:
        blur(8px);

    -webkit-backdrop-filter:
        blur(8px);

    transition:
        background .25s ease,
        color .25s ease,
        transform .25s ease;
}


.gallery-lightbox-prev {
    left: 25px;
}

.gallery-lightbox-next {
    right: 25px;
}


.gallery-lightbox-prev:hover,
.gallery-lightbox-next:hover {
    background: var(--gallery-gold);

    color: var(--gallery-dark);
}


.gallery-lightbox-prev:hover {
    transform:
        translate(-3px, -50%);
}


.gallery-lightbox-next:hover {
    transform:
        translate(3px, -50%);
}


/* =========================================================
   CAPTION
========================================================= */

.gallery-lightbox-caption {
    position: relative;

    z-index: 2;

    max-width: 800px;

    margin-top: 15px;

    text-align: center;

    color: rgba(255,255,255,.82);

    font-size: 13px;

    line-height: 1.6;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 640px) {

    .gallery-lightbox {
        padding: 20px 14px;
    }


    .gallery-lightbox-inner {
        width: 100%;

        max-height: 88vh;
    }


    .gallery-lightbox-image-wrap {
        max-height: 76vh;
    }


    .gallery-lightbox-image {
        max-width: 100%;

        max-height: 72vh;

        border-radius: 5px;
    }


    .gallery-lightbox-counter {
        top: -35px;

        font-size: 11px;
    }


    .gallery-lightbox-close {
        top: 14px;

        right: 14px;

        width: 42px;
        height: 42px;

        font-size: 27px;
    }


    .gallery-lightbox-prev,
    .gallery-lightbox-next {
        width: 40px;
        height: 40px;

        font-size: 17px;
    }


    .gallery-lightbox-prev {
        left: 8px;
    }


    .gallery-lightbox-next {
        right: 8px;
    }


    .gallery-lightbox-caption {
        max-width: 90%;

        margin-top: 11px;

        font-size: 12px;
    }

}