/* ── Gallery feature ─────────────────────────────────────────
   Figma: Dining 1366:71227 (mobile 1366:71578), Private Dining
   1366:70342 (mobile 1366:70121).
   ─────────────────────────────────────────────────────────── */

.gallery-feature {
    padding: 32px var(--pad-x);
}

.gallery-feature--side {
    padding-top: var(--section-y);
}

.gallery-feature__inner {
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: var(--site-max-w);
    margin: 0 auto;
}

.gallery-feature--side .gallery-feature__inner {
    gap: 48px;
}

.gallery-feature__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.gallery-feature__heading {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gallery-feature__eyebrow {
    color: var(--color-walnut);
}

.gallery-feature--candle {
    background: var(--color-candle-wax);
}

/* Figma Desktop/H2 */
.gallery-feature__title {
    font-size: 64px;
    line-height: 0.9;
    letter-spacing: -0.96px;
}

.gallery-feature__frame {
    position: relative;
}

.gallery-feature__list {
    display: grid;
    gap: 16px;
}

.gallery-feature__list:focus-visible {
    outline: 2px solid var(--color-copper);
    outline-offset: 4px;
}

.gallery-feature__item {
    min-width: 0;
    background: var(--color-candle-wax);
}

/* The picture is a button that opens the lightbox, filling its place.
   Relative, so its screen-reader words stay inside the swipe row: without
   it they escaped the row's clipping and widened the page on phones. */
.gallery-feature__open {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
}

.gallery-feature__open:focus-visible {
    outline: 2px solid var(--color-copper);
    outline-offset: 2px;
}

.gallery-feature__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* The arrows' fade (gallery-feature.js): the old picture shows behind the
   new one as it fades in */
.gallery-feature__item {
    background-position: center;
    background-size: cover;
}

/* Below: the big one across, three under it */
.gallery-feature--below .gallery-feature__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: 500px 280px;
}

.gallery-feature--below .gallery-feature__item:first-child {
    grid-column: 1 / -1;
}

.gallery-feature--below .gallery-feature__item:nth-child(n + 5) {
    display: none;
}

/* Side: the big one, two stacked beside it */
/* The big picture's share, the height and the gap are the page's own:
   Private Dining 864 / 424, 600 high, 24 apart (the default). */
.gallery-feature--side .gallery-feature__list {
    grid-template-columns: minmax(0, var(--gallery-big, 864fr)) minmax(0, var(--gallery-side, 424fr));
    grid-template-rows: repeat(2, calc((var(--gallery-h, 600px) - var(--gallery-gap, 24px)) / 2));
    gap: var(--gallery-gap, 24px);
}

.gallery-feature--side .gallery-feature__item:first-child {
    grid-row: 1 / -1;
}

.gallery-feature--side .gallery-feature__item:nth-child(n + 4) {
    display: none;
}

/* The arrows, over the middle of the big picture */
.gallery-feature__arrows {
    position: absolute;
    top: 250px;
    left: 36px;
    right: 36px;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
}

.gallery-feature__arrows .button {
    pointer-events: auto;
}

.gallery-feature--side .gallery-feature__arrows {
    top: 50%;
    left: 40px;
    right: calc(var(--gallery-side-w, 424 / 1312 * 100%) + var(--gallery-gap, 24px) + 40px);
}

/* Wedding Dining: the words and stats beside the heading, a line and two
   buttons under the pictures (Figma 1366:73697) */
.gallery-feature--intro .gallery-feature__header {
    align-items: flex-start;
    gap: 64px;
}

.gallery-feature--intro .gallery-feature__heading {
    flex: 0 1 703px;
    gap: 12px;
}

.gallery-feature--intro .gallery-feature__eyebrow {
    color: var(--color-umber);
}

.gallery-feature--intro .gallery-feature__title {
    font-size: 68px;
    line-height: 0.94;
    letter-spacing: -1.02px;
}

.gallery-feature__intro {
    display: flex;
    flex: 0 1 565px;
    flex-direction: column;
    gap: 12px;
}

.gallery-feature__text {
    font-size: 16px;
    line-height: 1.65;
    letter-spacing: 0.08px;
    color: var(--color-umber);
}

.gallery-feature__stats .stats__list {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.gallery-feature__stats .stats__label {
    font-size: 14px;
    letter-spacing: 4.48px;
    color: var(--color-walnut);
}

.gallery-feature__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.gallery-feature__note {
    font-family: var(--font-heading);
    font-size: 18px;
    font-style: italic;
    font-weight: 300;
}

.gallery-feature__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 32px;
}

.gallery-feature__primary.button--primary {
    width: 353px;
    height: 42px;
    justify-content: center;
}


/* Tablet and mobile — 1024px and below: one at a time, swiped */
@media (max-width: 1024px) {
    .gallery-feature,
    .gallery-feature--side {
        padding: 24px var(--pad-x);
    }

    .gallery-feature--side {
        padding-top: var(--pad-y);
    }

    .gallery-feature__inner,
    .gallery-feature--side .gallery-feature__inner {
        gap: 20px;
    }

    .gallery-feature__title,
    .gallery-feature--intro .gallery-feature__title {
        font-size: 32px;
        line-height: 1.06;
        letter-spacing: -0.32px;
    }

    .gallery-feature--intro .gallery-feature__header,
    .gallery-feature__foot {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .gallery-feature--intro .gallery-feature__heading,
    .gallery-feature__intro {
        flex: none;
    }

    .gallery-feature__actions {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 12px;
    }

    .gallery-feature__primary.button--primary {
        width: 100%;
    }

    .gallery-feature__secondary {
        align-self: center;
    }

    .gallery-feature--below .gallery-feature__list,
    .gallery-feature--side .gallery-feature__list {
        grid-template-columns: none;
        grid-template-rows: none;
        grid-auto-flow: column;
        grid-auto-columns: min(345px, calc(100% - 8px));
        gap: 13px;
        margin-right: calc(-1 * var(--pad-x));
        padding-right: var(--pad-x);
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .gallery-feature__list::-webkit-scrollbar {
        display: none;
    }

    .gallery-feature--below .gallery-feature__item,
    .gallery-feature--side .gallery-feature__item {
        display: block;
        grid-column: auto;
        grid-row: auto;
        height: 259px;
        scroll-snap-align: start;
    }

    .gallery-feature__arrows {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .gallery-feature--below .gallery-feature__item,
    .gallery-feature--side .gallery-feature__item {
        height: 360px;
    }

    .gallery-feature--below .gallery-feature__list,
    .gallery-feature--side .gallery-feature__list {
        grid-auto-columns: calc((100% - 13px) / 1.6);
    }
}
