body.page--gallery {
    overflow-x: hidden;
    overflow-y: auto;
}

body.page--gallery .site-shell {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
    align-items: start;
}

body.page--gallery .site-main {
    box-sizing: border-box;
    min-height: 0;
    overflow: visible;
    padding: 20px;
}

body.page--gallery .site-footer {
    min-height: auto;
    height: auto;
}

@media (min-width: 1081px) {
    body.page--gallery .site-sidebar {
        position: sticky;
        top: 0;
        align-self: start;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        overflow-y: auto;
        z-index: 1100;
    }

    body.page--gallery .site-sidebar > .sidebar {
        min-height: 100%;
    }
}

.gallery-modal {
    display: none;
}

body.page--gallery.is-gallery-modal-open {
    overflow: hidden;
}

body.page--gallery .gallery-page {
    display: grid;
    gap: 20px;
    width: min(1280px, 100%);
    margin: 0 auto;
}

body.page--gallery .gallery-page__intro,
body.page--gallery .gallery-year {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(212, 166, 58, 0.22);
    border-radius: 26px;
    background:
        linear-gradient(140deg, rgba(255, 247, 232, 0.07), rgba(255, 247, 232, 0.015) 34%, transparent 62%),
        radial-gradient(circle at top right, rgba(212, 166, 58, 0.12), transparent 28%),
        linear-gradient(135deg, rgba(39, 50, 34, 0.86), rgba(69, 80, 50, 0.78)),
        linear-gradient(180deg, rgba(18, 23, 16, 0.94), rgba(10, 13, 8, 0.95)),
        url("/assets/images/container2.png") center / cover no-repeat;
    box-shadow:
        inset 0 1px 0 rgba(255, 247, 232, 0.07),
        0 18px 34px rgba(0, 0, 0, 0.22);
}

body.page--gallery .gallery-page__intro {
    padding: clamp(24px, 3vw, 34px);
}

body.page--gallery .gallery-year {
    display: grid;
    gap: clamp(18px, 2.2vw, 24px);
    min-width: 0;
    padding: clamp(22px, 2.8vw, 34px);
}

body.page--gallery .gallery-year::before,
body.page--gallery .gallery-page__intro::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(140deg, rgba(255, 247, 232, 0.06), rgba(255, 247, 232, 0.012) 38%, transparent 64%),
        radial-gradient(circle at top right, rgba(212, 166, 58, 0.11), transparent 30%);
    pointer-events: none;
}

body.page--gallery .gallery-page__eyebrow,
body.page--gallery .gallery-year__eyebrow,
body.page--gallery .gallery-carousel__eyebrow {
    margin: 0 0 9px;
    color: rgba(212, 166, 58, 0.88);
    font-family: "Inter", Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

body.page--gallery .gallery-page__title,
body.page--gallery .gallery-year__title,
body.page--gallery .gallery-carousel__title {
    margin: 0;
    color: #fff7e8;
    font-family: "Cormorant Garamond", Georgia, serif;
    line-height: 0.96;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.38);
}

body.page--gallery .gallery-page__title {
    font-size: clamp(2.3rem, 4vw, 3.9rem);
}

body.page--gallery .gallery-year__title {
    font-size: clamp(2.2rem, 4.2vw, 4rem);
}

body.page--gallery .gallery-carousel__title {
    font-size: clamp(1.75rem, 2.35vw, 2.45rem);
}

body.page--gallery .gallery-page__summary,
body.page--gallery .gallery-year__summary {
    max-width: 780px;
    margin: 14px 0 0;
    color: rgba(244, 240, 228, 0.9);
    font-family: "Inter", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.62;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.36);
}

body.page--gallery .gallery-page__lower-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

body.page--gallery .gallery-year__header,
body.page--gallery .gallery-category-panels,
body.page--gallery .gallery-category-panel,
body.page--gallery .gallery-carousel,
body.page--gallery .gallery-carousel__stage {
    position: relative;
    z-index: 1;
    min-width: 0;
}

body.page--gallery .gallery-year__header {
    display: grid;
    gap: 18px;
}

body.page--gallery .gallery-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

body.page--gallery .gallery-category-tabs__button {
    min-height: 46px;
    padding: 10px 18px;
    border: 1px solid rgba(212, 166, 58, 0.28);
    border-radius: 999px;
    background: rgba(10, 13, 8, 0.38);
    color: rgba(244, 240, 228, 0.92);
    cursor: pointer;
    font-family: "Inter", Arial, sans-serif;
    font-size: 0.86rem;
    font-weight: 850;
    letter-spacing: 0.02em;
    box-shadow: inset 0 1px 0 rgba(255, 247, 232, 0.05);
    transition:
        background 220ms ease,
        border-color 220ms ease,
        color 220ms ease,
        transform 220ms ease;
}

body.page--gallery .gallery-category-tabs__button:hover,
body.page--gallery .gallery-category-tabs__button:focus-visible {
    border-color: rgba(212, 166, 58, 0.5);
    background: rgba(39, 50, 34, 0.76);
    color: #fff7e8;
    transform: translateY(-1px);
}

body.page--gallery .gallery-category-tabs__button.is-active {
    border-color: rgba(212, 166, 58, 0.72);
    background: rgba(212, 166, 58, 0.18);
    color: #ffffff;
}

body.page--gallery .gallery-category-panel.is-active {
    animation: galleryCategoryFade 300ms ease both;
}

body.page--gallery .gallery-carousel {
    display: grid;
    gap: 16px;
}

body.page--gallery .gallery-carousel__header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    justify-content: space-between;
    padding-top: 2px;
}

body.page--gallery .gallery-carousel__count {
    flex: 0 0 auto;
    margin: 4px 0 0;
    padding: 7px 12px;
    border: 1px solid rgba(212, 166, 58, 0.22);
    border-radius: 999px;
    background: rgba(10, 13, 8, 0.38);
    color: rgba(244, 240, 228, 0.92);
    font-family: "Inter", Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
}

body.page--gallery .gallery-carousel__viewport {
    overflow: hidden;
    border: 1px solid rgba(212, 166, 58, 0.18);
    border-radius: 18px;
    background: rgba(10, 13, 8, 0.58);
    box-shadow:
        inset 0 1px 0 rgba(255, 247, 232, 0.05),
        0 16px 28px rgba(0, 0, 0, 0.18);
}

body.page--gallery .gallery-carousel__track {
    display: flex;
    align-items: stretch;
    transform: translate3d(0, 0, 0);
    transition: transform 420ms cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
}

body.page--gallery .gallery-carousel__slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    height: clamp(320px, 44vw, 560px);
    padding: 0;
    border: 0;
    background: rgba(10, 13, 8, 0.48);
    cursor: zoom-in;
    overflow: hidden;
}

body.page--gallery .gallery-page__lower-grid .gallery-carousel__slide {
    height: clamp(300px, 32vw, 430px);
}

body.page--gallery .gallery-carousel__slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: rgba(10, 13, 8, 0.76);
    transform: none;
    transition: filter 220ms ease;
}

body.page--gallery .gallery-carousel__slide:hover img {
    filter: saturate(1.05);
}

body.page--gallery .gallery-carousel__slide-shade {
    display: none;
}

body.page--gallery .gallery-carousel__slide-label {
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 8px 12px;
    border: 1px solid rgba(212, 166, 58, 0.24);
    border-radius: 999px;
    background: rgba(24, 17, 13, 0.74);
    color: #f8efdc;
    font-family: "Inter", Arial, sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    pointer-events: none;
    backdrop-filter: blur(10px);
}

body.page--gallery .gallery-carousel__arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(212, 166, 58, 0.24);
    border-radius: 999px;
    background: rgba(24, 17, 13, 0.82);
    color: #f8efdc;
    cursor: pointer;
    font-size: 1.6rem;
    line-height: 1;
    transform: translateY(-50%);
    transition:
        background 180ms ease,
        border-color 180ms ease,
        transform 180ms ease;
    backdrop-filter: blur(10px);
}

body.page--gallery .gallery-carousel__arrow:hover,
body.page--gallery .gallery-carousel__arrow:focus-visible {
    border-color: rgba(212, 166, 58, 0.38);
    background: rgba(34, 24, 18, 0.92);
    transform: translateY(-50%) scale(1.04);
}

body.page--gallery .gallery-carousel__arrow--prev {
    left: 12px;
}

body.page--gallery .gallery-carousel__arrow--next {
    right: 12px;
}

body.page--gallery .gallery-carousel__dots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

body.page--gallery .gallery-carousel__dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 1px solid rgba(212, 166, 58, 0.32);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
    opacity: 0.72;
    transition:
        width 180ms ease,
        background 180ms ease,
        opacity 180ms ease;
}

body.page--gallery .gallery-carousel__dot:hover,
body.page--gallery .gallery-carousel__dot.is-active {
    width: 28px;
    background: rgba(212, 166, 58, 0.84);
    opacity: 1;
}

body.page--gallery .gallery-carousel__empty {
    padding: 28px;
    border: 1px dashed rgba(212, 166, 58, 0.24);
    border-radius: 18px;
    color: rgba(244, 240, 228, 0.9);
    font-family: "Inter", Arial, sans-serif;
    font-size: 0.98rem;
    line-height: 1.65;
    background: rgba(10, 13, 8, 0.38);
}

body.page--gallery .gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(14px, 2vw, 28px);
}

body.page--gallery .gallery-modal.is-open {
    display: flex;
}

body.page--gallery .gallery-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 6, 5, 0.88);
    backdrop-filter: blur(8px);
}

body.page--gallery .gallery-modal__dialog {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 12px;
    width: min(96vw, 1280px);
    height: min(92vh, 880px);
    padding: 14px;
    border: 1px solid rgba(212, 166, 58, 0.22);
    border-radius: 24px;
    background: rgba(18, 23, 16, 0.96);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
}

body.page--gallery .gallery-modal__bar {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

body.page--gallery .gallery-modal__title {
    min-width: 0;
    margin: 0;
    color: #f8efdc;
    font-family: "Inter", Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page--gallery .gallery-modal__close {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(212, 166, 58, 0.3);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.26);
    color: #f8efdc;
    cursor: pointer;
    font-size: 1.45rem;
    line-height: 1;
}

body.page--gallery .gallery-modal__image-wrap {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(10, 13, 8, 0.92);
    overflow: hidden;
}

body.page--gallery .gallery-modal__image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: zoom-out;
}

@keyframes galleryCategoryFade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1080px) {
    body.page--gallery .gallery-page__lower-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    body.page--gallery .site-main {
        padding: 14px;
    }

    body.page--gallery .gallery-page__intro,
    body.page--gallery .gallery-year {
        border-radius: 24px;
        padding: 22px;
    }

    body.page--gallery .gallery-category-tabs {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    body.page--gallery .gallery-category-tabs__button {
        width: 100%;
    }

    body.page--gallery .gallery-carousel__header {
        display: grid;
    }

    body.page--gallery .gallery-carousel__count {
        justify-self: start;
    }

    body.page--gallery .gallery-carousel__slide,
    body.page--gallery .gallery-page__lower-grid .gallery-carousel__slide {
        height: clamp(280px, 62vw, 430px);
    }

    body.page--gallery .gallery-carousel__arrow {
        width: 40px;
        height: 40px;
        font-size: 1.35rem;
    }

    body.page--gallery .gallery-carousel__arrow--prev {
        left: 8px;
    }

    body.page--gallery .gallery-carousel__arrow--next {
        right: 8px;
    }

    body.page--gallery .gallery-carousel__slide-label {
        right: 12px;
        bottom: 12px;
        font-size: 0.75rem;
    }

    body.page--gallery .gallery-modal__dialog {
        width: 100%;
        height: 88vh;
        border-radius: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.page--gallery .gallery-carousel__track,
    body.page--gallery .gallery-carousel__slide img,
    body.page--gallery .gallery-carousel__arrow,
    body.page--gallery .gallery-category-panel {
        transition: none;
        animation: none;
    }
}

/* Gallery year panels: approved container image set. */
body.page--gallery .gallery-page__intro {
    background:
        linear-gradient(135deg, rgba(13, 18, 12, 0.74), rgba(42, 52, 31, 0.70)),
        url("/assets/images/container2.png") center / cover no-repeat !important;
}

body.page--gallery .gallery-year {
    background:
        linear-gradient(135deg, rgba(12, 17, 11, 0.68), rgba(27, 35, 20, 0.44)),
        var(--gallery-year-container-bg, url("/assets/images/container1.png")) center / cover no-repeat !important;
    border: 1px solid rgba(244, 236, 215, 0.18);
    box-shadow:
        inset 0 1px 0 rgba(255, 247, 232, 0.08),
        0 18px 34px rgba(0, 0, 0, 0.22);
}

body.page--gallery .gallery-year[data-gallery-year="2026"] {
    --gallery-year-container-bg: url("/assets/images/container1.png");
}

body.page--gallery .gallery-year[data-gallery-year="2025"] {
    --gallery-year-container-bg: url("/assets/images/container2.png");
}

body.page--gallery .gallery-year[data-gallery-year="2024"] {
    --gallery-year-container-bg: url("/assets/images/container4.png");
}


/* Gallery modal cleanup: no filename/title bar, contained image, visible close button. */
body.page--gallery .gallery-modal__dialog {
    display: block;
    width: min(96vw, 1280px);
    height: min(92vh, 900px);
    height: min(92dvh, 900px);
    padding: clamp(10px, 2vw, 18px);
    overflow: visible;
}

body.page--gallery .gallery-modal__bar,
body.page--gallery .gallery-modal__title {
    display: none !important;
}

body.page--gallery .gallery-modal__close {
    position: absolute;
    top: -14px;
    right: -14px;
    z-index: 3;
    width: 44px;
    height: 44px;
    border-color: rgba(212, 166, 58, 0.48);
    background: rgba(10, 13, 8, 0.96);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.34);
}

body.page--gallery .gallery-modal__image-wrap {
    width: 100%;
    height: 100%;
}

body.page--gallery .gallery-modal__image {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    object-position: center;
}

@media (max-width: 640px) {
    body.page--gallery .gallery-modal {
        padding: 12px;
    }

    body.page--gallery .gallery-modal__dialog {
        width: 100%;
        height: 86vh;
        height: 86dvh;
        padding: 10px;
    }

    body.page--gallery .gallery-modal__close {
        top: -10px;
        right: -10px;
        width: 42px;
        height: 42px;
    }
}

/* Page flow/footer correction */

body.page--gallery {
    overflow-x: hidden;
    overflow-y: auto;
}

body.page--gallery .site-shell {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
    align-items: start;
}

body.page--gallery .site-main {
    min-height: 0;
    overflow: visible;
}

body.page--gallery .site-footer {
    min-height: auto;
    height: auto;
}
