
/* =========================================
   LOCATION — SURROUNDINGS GALLERY
========================================= */

.location-gallery {
    width: 100%;
    padding: clamp(75px, 6vw, 115px) 0;

    background: #f3f0e9;
    color: #1f2925;

    scroll-margin-top: var(--header-height, 90px);
}

.location-gallery__container {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;

    padding-inline: clamp(24px, 5.5vw, 100px);
}

/* =========================================
   SECTION HEADING
========================================= */

.location-gallery__heading {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
    align-items: end;

    gap: clamp(30px, 5vw, 90px);
    margin-bottom: 64px;
}

.location-gallery__eyebrow {
    display: block;

    color: #a97b42;
    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 28px;
}

.location-gallery__title {
    margin: 0;
    font-size: 45px;
    font-weight: 100;
    line-height: 1.2;
    letter-spacing: -0.03em;
    font-family: "Cormorant Garamond", Georgia, serif;
}

.location-gallery__description {
    max-width: 540px;
    margin: 0 0 10px;
    color: #56615a;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.65;
    margin-left: auto;
}

/* =========================================
   GALLERY GRID — 4 COLUMNS
========================================= */

.location-gallery__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));

    column-gap: clamp(18px, 1.8vw, 32px);
    row-gap: clamp(42px, 4vw, 70px);

    width: 100%;
}

.location-gallery__item {
    min-width: 0;
    margin: 0;
}

/* IMAGE LINK */

.location-gallery__image-link {
    position: relative;

    display: block;
    width: 100%;
    aspect-ratio: 1.48 / 1;

    overflow: hidden;
    background: #dedbd4;

    cursor: zoom-in;
}

/* IMAGE */

.location-gallery__image {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    transition: transform 0.45s ease;
}

.location-gallery__image-link:hover .location-gallery__image {
    transform: scale(1.055);
}

/* =========================================
   ZOOM ICON
========================================= */

.location-gallery__zoom {
    position: absolute;
    right: 12px;
    bottom: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    border-radius: 50%;

    background: #f7f4ee;
    color: #1f2925;

    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.1);

    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}

.location-gallery__zoom svg {
    width: 19px;
    height: 19px;
}

.location-gallery__image-link:hover .location-gallery__zoom {
    background: #1d2724;
    color: #ffffff;
    transform: scale(1.08);
}

/* =========================================
   IMAGE CAPTION
========================================= */

.location-gallery__caption {
    display: flex;
    align-items: baseline;
    gap: 22px;

    margin-top: 18px;
}

.location-gallery__number {
    flex-shrink: 0;

    color: #a97b42;
    font-family: "Inter", sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
}

.location-gallery__name {
    color: #1f2925;
    font-family: "Inter", sans-serif;
    font-size: clamp(14px, 1vw, 17px);
    font-weight: 400;
    line-height: 1.5;
}

/* =========================================
   LIGHTBOX
========================================= */

body.has-location-gallery-open {
    overflow: hidden;
}

.location-gallery__dialog {
    width: min(1400px, calc(100vw - 40px));
    max-width: none;
    max-height: calc(100dvh - 40px);

    padding: 0;
    border: none;

    background: #f7f4ee;
    color: #1f2925;

    overflow: auto;
}

.location-gallery__dialog::backdrop {
    background: rgba(10, 15, 13, 0.9);
    backdrop-filter: blur(5px);
}

.location-gallery__dialog-inner {
    padding: 10px 20px;
}

/* MODAL HEADER */

.location-gallery__dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;
    margin-bottom: 18px;
}

.location-gallery__dialog-title {
    margin: 0;

    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 22px;
    font-weight: 400;
    line-height: 1.15;
}

/* CLOSE BUTTON */

.location-gallery__dialog-close {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;
    flex-shrink: 0;

    padding: 0;
    border: 1px solid #dedbd4;

    background: transparent;
    color: #1f2925;

    font-size: 32px;
    font-weight: 300;
    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.location-gallery__dialog-close:hover {
    background: #1d2724;
    color: #ffffff;
}

/* LARGE IMAGE */

.location-gallery__dialog-media {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 0;
    background: #ffffff;
}

.location-gallery__dialog-image {
    display: block;

    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(100dvh - 205px);

    object-fit: contain;
}

/* =========================================
   MODAL NAVIGATION
========================================= */

.location-gallery__dialog-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;

    padding-top: 20px;
}

.location-gallery__dialog-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 52px;
    height: 42px;

    padding: 0;
    border: 1px solid #d8d4cb;

    background: transparent;
    color: #1f2925;

    cursor: pointer;

    transition:
        background-color 0.25s ease,
        color 0.25s ease;
}

.location-gallery__dialog-arrow svg {
    width: 24px;
    height: 18px;
}

.location-gallery__dialog-arrow:hover {
    background: #1d2724;
    color: #ffffff;
}

.location-gallery__dialog-counter {
    color: #56615a;
    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.12em;
}

/* ACCESSIBILITY */

.location-gallery a:focus-visible,
.location-gallery button:focus-visible {
    outline: 2px solid #a97b42;
    outline-offset: 4px;
}

/* =========================================
   TABLET — MAX 1024px
========================================= */

@media (max-width: 1024px) {

    .location-gallery__heading {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-bottom: 44px;
    }

    .location-gallery__description {
        max-width: 650px;
        margin: 0;
    }

    .location-gallery__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 24px;
        row-gap: 40px;
    }

    .location-gallery__name {
        font-size: 15px;
    }
}

/* =========================================
   MOBILE — MAX 740px
========================================= */

@media (max-width: 740px) {

    .location-gallery {
        padding: 64px 0;
    }

    .location-gallery__container {
        padding-inline: 20px;
    }

    /* HEADING */

    .location-gallery__eyebrow {
        font-size: 11px;
    }

    .location-gallery__title {
        margin-top: 22px;
        font-size: clamp(42px, 9vw, 60px);
    }

    .location-gallery__description {
        font-size: 16px;
    }

    /* GRID */

    .location-gallery__grid {
        gap: 32px 16px;
    }

    .location-gallery__image-link {
        aspect-ratio: 4 / 3;
    }

    .location-gallery__zoom {
        right: 10px;
        bottom: 10px;
        width: 34px;
        height: 34px;
    }

    .location-gallery__caption {
        gap: 12px;
        margin-top: 13px;
    }

    .location-gallery__number {
        font-size: 10px;
    }

    .location-gallery__name {
        font-size: 14px;
    }

    /* MODAL */

    .location-gallery__dialog {
        width: calc(100vw - 20px);
        max-height: calc(100dvh - 20px);
    }

    .location-gallery__dialog-inner {
        padding: 14px;
    }

    .location-gallery__dialog-title {
        font-size: 27px;
    }

    .location-gallery__dialog-close {
        width: 40px;
        height: 40px;
    }

    .location-gallery__dialog-image {
        max-height: calc(100dvh - 185px);
    }
}

/* =========================================
   SMALL MOBILE — MAX 560px
========================================= */

@media (max-width: 560px) {

    .location-gallery__grid {
        grid-template-columns: 1fr;
        row-gap: 32px;
    }

    .location-gallery__image-link {
        aspect-ratio: 1.5 / 1;
    }

    .location-gallery__name {
        font-size: 15px;
    }
}

/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {

    .location-gallery__image,
    .location-gallery__zoom,
    .location-gallery__dialog-arrow,
    .location-gallery__dialog-close {
        transition: none;
    }
}
