
.gallery-section-heading {
    max-width: 720px;
    margin: 0 auto 28px;
    text-align: center;
}

.gallery-kicker {
    margin: 0 0 4px;
    color: #9a5c49;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.gallery-section-heading h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    line-height: 1.2;
}

.gallery-section-heading p:not(.gallery-kicker) {
    margin: 8px 0 0;
    opacity: 0.8;
}


.gallery-showcase {
    padding: 48px 20px 56px;
}

.slideshow {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}

.slideshow-viewport {
    position: relative;
    aspect-ratio: 16 / 10;
    max-height: 78vh;
    width: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: #20302b;
    box-shadow: 0 24px 60px rgba(32, 48, 43, 0.22);
    touch-action: pan-y;
}

.slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0s linear 0.8s;
}

.slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s ease, visibility 0s;
}

.slide-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(28px) brightness(0.8) saturate(1.1);
    transform: scale(1.15);
}

.slide-photo {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-showcase .slideshow button.slideshow-arrow {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    margin-top: -24px;
    padding: 0 0 4px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    color: #18352f;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    transition: background 0.2s ease, transform 0.2s ease;
}

.gallery-showcase .slideshow button.slideshow-arrow:hover,
.gallery-showcase .slideshow button.slideshow-arrow:focus-visible {
    background: #fff;
    color: #18352f;
    transform: scale(1.06);
}

.slideshow-prev {
    left: 16px;
}

.slideshow-next {
    right: 16px;
}

.gallery-showcase .slideshow button.slideshow-toggle {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(16, 39, 34, 0.55);
    color: #fff;
    cursor: pointer;
}

.gallery-showcase .slideshow button.slideshow-toggle:hover,
.gallery-showcase .slideshow button.slideshow-toggle:focus-visible {
    background: rgba(16, 39, 34, 0.8);
}

.slideshow-toggle-icon {
    display: block;
    width: 12px;
    height: 14px;
    margin: 0 auto;
    border-left: 4px solid #fff;
    border-right: 4px solid #fff;
}

.slideshow.is-paused .slideshow-toggle-icon {
    width: 0;
    height: 0;
    margin-left: 14px;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 13px solid #fff;
    border-right: 0;
}

.slideshow-dots {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.gallery-showcase .slideshow button.slideshow-dot {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.slideshow-dot::before {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    margin: 0 auto;
    border-radius: 50%;
    background: #d8d8cb;
    transition: background 0.2s ease, transform 0.2s ease;
}

.slideshow-dot:hover::before {
    background: #b99b5d;
}

.slideshow-dot[aria-current="true"]::before {
    background: #18352f;
    transform: scale(1.3);
}

.gallery-showcase .slideshow button.slideshow-dot:hover,
.gallery-showcase .slideshow button.slideshow-dot:focus-visible {
    background: transparent;
}

.slideshow-status {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}


.gallery {
    padding: 56px 20px;
    background: linear-gradient(180deg, #fffaf6 0%, #fff 100%);
    color: #4a2f24;
}

.gallery-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    align-items: start;
}

.gallery-grid-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gallery-grid figure {
    margin: 0;
    background: #fffefb;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 10px 30px rgba(74, 47, 36, 0.06);
    transition: transform 0.26s cubic-bezier(.2, .9, .2, 1), box-shadow 0.26s ease;
    position: relative;
    overflow: visible;
}

.gallery-grid figure:nth-child(3n+1) {
    transform: rotate(-1.6deg);
}

.gallery-grid figure:nth-child(3n+2) {
    transform: rotate(1.2deg);
}

.gallery-grid figure:nth-child(3n) {
    transform: rotate(-0.8deg);
}

.gallery-grid figure:hover {
    transform: scale(1.03) rotate(0deg);
    box-shadow: 0 24px 56px rgba(74, 47, 36, 0.14);
    z-index: 5;
}

.gallery-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    cursor: zoom-in;
    transition: filter 0.28s ease;
}

.gallery-grid-portrait img {
    aspect-ratio: 4 / 5;
}

.gallery-grid img.focus-top {
    object-position: center 30%;
}

.gallery-grid img:hover {
    filter: saturate(1.08);
}

.gallery-grid img:focus-visible {
    outline: 3px solid rgba(185, 155, 93, 0.8);
    outline-offset: 3px;
}


.lightbox {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 12, 8, 0.86);
    z-index: 9999;
    cursor: zoom-out;
    padding: 20px;
}

.lightbox img {
    max-width: 96%;
    max-height: 92%;
    border-radius: 12px;
    box-shadow: 0 28px 80px rgba(10, 6, 4, 0.6);
}


@media (max-width: 920px) {
    .gallery-grid,
    .gallery-grid-four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (max-width: 640px) {
    .gallery-showcase {
        padding: 32px 12px 40px;
    }

    .slideshow-dots {
        gap: 2px;
    }

    .gallery-showcase .slideshow button.slideshow-dot {
        width: 34px;
        height: 34px;
    }

    .slideshow-viewport {
        aspect-ratio: 4 / 5;
        border-radius: 14px;
    }

    .gallery-showcase .slideshow button.slideshow-arrow {
        width: 40px;
        height: 40px;
        margin-top: -20px;
        font-size: 1.7rem;
    }

    .slideshow-prev {
        left: 8px;
    }

    .slideshow-next {
        right: 8px;
    }

    .gallery {
        padding: 36px 12px;
    }

    .gallery-grid {
        gap: 12px;
    }

    .gallery-grid figure {
        padding: 6px;
    }

    .gallery-grid figure:nth-child(3n+1),
    .gallery-grid figure:nth-child(3n+2),
    .gallery-grid figure:nth-child(3n) {
        transform: rotate(0deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .slide,
    .slide.is-active,
    .gallery-grid figure {
        transition: none;
    }
}
