.gallery-page {
    --gallery-header-offset: 82px;
    --gallery-inner-top-offset: 70px;
    width: 100%;
    min-height: calc(100vh - 82px);
    background: var(--site-light-2);
    color: var(--site-dark-1);
    overflow: visible;
}

.gallery-page__inner {
    max-width: 1200px;
    min-height: calc(100vh - 82px);
    margin: 0 auto;
    padding: 30px 24px;
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 54px;
    align-items: start;
}

.gallery-timeline {
    position: sticky;
    top: calc(var(--gallery-header-offset, 82px) + var(--gallery-inner-top-offset, 70px));
    align-self: start;
    height: calc(100vh - var(--gallery-header-offset, 82px) - var(--gallery-inner-top-offset, 70px) - 20px);
    max-height: 820px;
    min-height: 520px;
    padding-left: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    border-left: 1px solid rgba(17, 17, 17, 0.22);
    overflow: hidden;
}

.gallery-timeline__list {
    min-height: 0;
    flex: 1 1 auto;
    padding: 4px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.gallery-timeline__list::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.gallery-timeline__year-btn {
    position: relative;
    z-index: 2;
    width: max-content;
    max-width: 150px;
    min-height: 42px;
    padding: 11px 16px;
    border: 0;
    border-radius: 999px;
    background: var(--site-accent);
    color: var(--site-light-1);
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(255, 51, 102, 0.22);
    transition: background .2s ease, color .2s ease, transform .2s ease, opacity .2s ease, box-shadow .2s ease;
}

.gallery-timeline__year-btn:hover:not(:disabled) {
    background: var(--site-accent);
    color: var(--site-light-1);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(255, 51, 102, 0.34);
}

.gallery-timeline__year-btn:disabled,
.gallery-timeline__year-btn.is-disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.gallery-timeline__item {
    position: relative;
    min-height: 56px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    color: var(--site-dark-2);
    opacity: 0.45;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    line-height: 1;
    transition: opacity 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.gallery-timeline__item::before {
    content: '';
    position: absolute;
    left: -34px;
    top: 50%;
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 12px solid var(--site-dark-2);
    background: transparent;
    transform: translateY(-50%);
    transition: 0.25s ease;
}

.gallery-timeline__date {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.gallery-timeline__day-month {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.12;
    white-space: nowrap;
}

.gallery-timeline__item:hover,
.gallery-timeline__item.is-active {
    color: var(--site-accent);
    opacity: 1;
}

.gallery-timeline__item.is-active {
    min-height: 72px;
    transform: translateX(2px);
}

.gallery-timeline__item.is-active .gallery-timeline__date {
    font-size: 34px;
    font-weight: 900;
}

.gallery-timeline__item.is-active .gallery-timeline__day-month {
    font-size: 24px;
    font-weight: 900;
}

.gallery-timeline__item.is-active::before {
    left: -40px;
    border-top-width: 11px;
    border-bottom-width: 11px;
    border-left-width: 18px;
    border-left-color: var(--site-accent);
}

.gallery-content {
    min-width: 0;
    height: auto;
    overflow: visible;
    padding-right: 0;
    scroll-behavior: smooth;
}

.gallery-events-stage {
    position: relative;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 72px;
    padding: 0 0 70px;
}

.gallery-date {
    position: relative;
    width: 100%;
    padding: 0 0 72px;
    border-bottom: 1px solid rgba(17, 17, 17, 0.12);
    opacity: 1;
    transform: none;
    overflow: visible;
}

.gallery-date:last-child {
    border-bottom: 0;
}

.gallery-date__text-block {
    width: 100%;
    max-width: 100%;
    text-align: left;
}

.gallery-date__label {
    margin: 0 0 14px;
    color: var(--site-accent);
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.05em;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
}

.gallery-date__title {
    margin: 0;
    color: var(--site-dark-1);
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(34px, 4.2vw, 58px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.05em;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.gallery-date__subtitle {
    margin: 22px 0 0;
    color: var(--site-dark-1);
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(22px, 2.4vw, 32px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.05em;
}

.gallery-date__text {
    margin-top: 24px;
    color: var(--site-dark-2);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.75;
}

.gallery-date__text-accordion {
    margin-top: 24px;
}

.gallery-date__text-accordion .gallery-date__text {
    margin-top: 0;
}

.gallery-date__text-accordion.is-collapsible:not(.is-expanded) .gallery-date__text {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-date__text-toggle {
    display: none;
    margin-top: 14px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--site-accent);
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

.gallery-date__text-accordion.is-collapsible .gallery-date__text-toggle {
    display: inline-flex;
}

.gallery-date__text-toggle:hover,
.gallery-date__text-toggle:focus {
    color: var(--site-dark-1);
}

.gallery-photo-grid {
    width: 100%;
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.gallery-photo-row {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(var(--gallery-row-cols, 3), minmax(0, 1fr));
    gap: 18px;
}

.gallery-photo-grid__item {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: 0;
    overflow: hidden;
    cursor: pointer;
    background: var(--site-light-1);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.gallery-photo-grid__item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition: transform 0.35s ease, filter 0.35s ease;
}

.gallery-photo-grid__item:hover img {
    transform: scale(1.08);
    filter: brightness(0.88);
}

.gallery-gallery__empty {
    min-height: 240px;
    margin-top: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--site-light-1);
    color: var(--site-dark-2);
    font-weight: 700;
    text-align: center;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
}

.gallery-load-more-wrap {
    width: 100%;
    margin-top: 34px;
    display: flex;
    justify-content: center;
}

.gallery-load-more:disabled {
    opacity: 0.65;
    cursor: wait;
}

html.gallery-lightbox-open,
body.gallery-lightbox-open {
    width: 100%;
    height: 100%;
    overflow: hidden !important;
    overscroll-behavior: contain;
}

body.gallery-lightbox-open {
    touch-action: none;
}

.gallery-lightbox {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    inset: 0 !important;
    z-index: 2147483647;
    width: 100vw;
    min-width: 100vw;
    height: 100vh;
    min-height: 100vh;
    height: 100dvh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.88);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.gallery-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.gallery-lightbox.is-native-fullscreen,
.gallery-lightbox.is-native-fullscreen.is-open {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    inset: 0 !important;
    z-index: 2147483647 !important;
    width: 100vw !important;
    min-width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0, 0, 0, 0.88) !important;
}

.gallery-lightbox:fullscreen {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    inset: 0 !important;
    z-index: 2147483647 !important;
    width: 100vw !important;
    min-width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0, 0, 0, 0.88) !important;
}

.gallery-lightbox:-webkit-full-screen {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    inset: 0 !important;
    z-index: 2147483647 !important;
    width: 100vw !important;
    min-width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0, 0, 0, 0.88) !important;
}

.gallery-lightbox::backdrop {
    background: rgba(0, 0, 0, 0.88);
}

.gallery-lightbox.is-native-fullscreen .gallery-lightbox__overlay {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    inset: 0 !important;
    width: 100vw !important;
    min-width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    background: rgba(0, 0, 0, 0.88) !important;
}

.gallery-lightbox:fullscreen .gallery-lightbox__overlay {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    inset: 0 !important;
    width: 100vw !important;
    min-width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    background: rgba(0, 0, 0, 0.88) !important;
}

.gallery-lightbox:-webkit-full-screen .gallery-lightbox__overlay {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    inset: 0 !important;
    width: 100vw !important;
    min-width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    background: rgba(0, 0, 0, 0.88) !important;
}

.gallery-lightbox__overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    width: 100vw;
    min-width: 100vw;
    height: 100vh;
    min-height: 100vh;
    height: 100dvh;
    min-height: 100dvh;
    background: rgba(0, 0, 0, 0.88);
}

.gallery-lightbox__content {
    position: relative;
    z-index: 1;
    width: min(98vw, 1880px);
    height: min(94vh, 1240px);
    height: min(94dvh, 1240px);
    padding: 48px 92px 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--site-light-1);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.gallery-lightbox.is-native-fullscreen .gallery-lightbox__content {
    width: min(98vw, 1880px);
    height: min(94vh, 1240px);
    height: min(94dvh, 1240px);
    padding: 48px 92px 84px;
}

.gallery-lightbox:fullscreen .gallery-lightbox__content {
    width: min(98vw, 1880px);
    height: min(94vh, 1240px);
    height: min(94dvh, 1240px);
    padding: 48px 92px 84px;
}

.gallery-lightbox:-webkit-full-screen .gallery-lightbox__content {
    width: min(98vw, 1880px);
    height: min(94vh, 1240px);
    height: min(94dvh, 1240px);
    padding: 48px 92px 84px;
}

.gallery-lightbox__stage {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--site-dark-1);
    cursor: zoom-in;
}

.gallery-lightbox__stage.is-zoomed {
    cursor: zoom-out;
}

.gallery-lightbox__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform-origin: center center;
    transition: opacity 0.2s ease, transform 0.16s ease;
    user-select: none;
    -webkit-user-drag: none;
    will-change: transform;
}

.gallery-lightbox__close {
    position: absolute;
    top: 12px;
    right: 18px;
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    color: var(--site-dark-1);
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
}

.gallery-lightbox__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--site-accent);
    color: var(--site-light-1);
    font-family: 'Montserrat', sans-serif;
    font-size: 36px;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(255, 51, 102, 0.32);
}

.gallery-lightbox__arrow-symbol {
    display: block;
    line-height: 1;
    transform: translateY(-1px);
}

.gallery-lightbox__arrow--prev {
    left: 30px;
}

.gallery-lightbox__arrow--next {
    right: 30px;
}

.gallery-lightbox__dots {
    position: absolute;
    left: 50%;
    bottom: 48px;
    transform: translateX(-50%);
    width: min(74vw, 1060px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow-x: auto;
    padding: 7px 4px;
}

.gallery-lightbox__dot {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(17, 17, 17, 0.25);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.gallery-lightbox__dot.is-active {
    background: var(--site-accent);
    transform: scale(1.35);
}

.gallery-lightbox__loader {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 56px;
    height: 56px;
    margin: -28px 0 0 -28px;
    border: 4px solid rgba(255, 255, 255, 0.36);
    border-top-color: var(--site-accent);
    border-radius: 50%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    animation: gallery-lightbox-loader 0.8s linear infinite;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.gallery-lightbox.is-loading .gallery-lightbox__loader {
    opacity: 1;
    visibility: visible;
}

.gallery-lightbox.is-loading .gallery-lightbox__image {
    opacity: 0.38;
}

@keyframes gallery-lightbox-loader {
    to {
        transform: rotate(360deg);
    }
}

.gallery-lightbox__dots[hidden] {
    display: none;
}

@media (max-width: 1100px) {
    .gallery-page__inner {
        grid-template-columns: 150px minmax(0, 1fr);
        gap: 34px;
    }

    .gallery-timeline {
        min-height: 500px;
    }

    .gallery-timeline__item.is-active .gallery-timeline__date {
        font-size: 30px;
    }

    .gallery-timeline__item.is-active .gallery-timeline__day-month {
        font-size: 21px;
    }

    .gallery-photo-grid,
    .gallery-photo-row {
        gap: 14px;
    }
}

@media (max-width: 900px) {
    .gallery-page {
        min-height: 0;
        overflow: visible;
    }

    .gallery-page__inner {
        height: auto;
        min-height: 0;
        grid-template-columns: 1fr;
        gap: 0;
        padding: 64px 20px;
    }

    .gallery-timeline {
        display: none;
    }

    .gallery-content {
        height: auto;
        overflow: visible;
        padding-right: 0;
    }

    .gallery-events-stage {
        min-height: 0;
        gap: 0;
        padding: 0;
    }

    .gallery-date {
        padding: 34px 0 64px;
        border-bottom: 1px solid rgba(17, 17, 17, 0.1);
    }

    .gallery-date:first-child {
        padding-top: 0;
    }

    .gallery-date:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .gallery-date__label {
        font-size: 30px;
    }

    .gallery-date__title {
        font-size: 36px;
    }

    .gallery-date__subtitle {
        font-size: 22px;
    }

    .gallery-date__text {
        font-size: 16px;
        line-height: 1.7;
    }

    .gallery-photo-row {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .gallery-lightbox__content {
        width: 98vw;
        height: 90vh;
        height: 90dvh;
        padding: 48px 54px 82px;
    }

    .gallery-lightbox__arrow {
        width: 42px;
        height: 42px;
        font-size: 28px;
    }

    .gallery-lightbox__arrow--prev {
        left: 8px;
    }

    .gallery-lightbox__arrow--next {
        right: 8px;
    }

    .gallery-lightbox__dots {
        bottom: 38px;
        width: min(72vw, 620px);
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .gallery-page__inner {
        padding: 54px 18px;
    }

    .gallery-date {
        padding: 30px 0 54px;
    }

    .gallery-date__label {
        font-size: 28px;
        text-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
    }

    .gallery-date__title {
        font-size: 31px;
        line-height: 1.12;
    }

    .gallery-date__subtitle {
        margin-top: 18px;
        font-size: 20px;
    }

    .gallery-date__text {
        margin-top: 22px;
        font-size: 15px;
    }

    .gallery-date__text-accordion {
        margin-top: 22px;
    }

    .gallery-photo-grid,
    .gallery-photo-row {
        gap: 12px;
    }

    .gallery-lightbox__content {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        padding: 48px 48px 82px;
    }

    .gallery-lightbox__dots {
        bottom: 34px;
    }
}

@media (max-width: 420px) {
    .gallery-date__title {
        font-size: 28px;
    }

    .gallery-photo-row {
        grid-template-columns: 1fr !important;
    }

    .gallery-lightbox__content {
        padding-right: 46px;
        padding-left: 46px;
    }
}
