.gallery-page {
    background:
        radial-gradient(circle at top center, rgba(176, 139, 87, 0.18) 0%, rgba(176, 139, 87, 0) 24%),
        linear-gradient(180deg, #070707 0%, #101010 38%, #090909 100%);
}

.gallery-hero {
    position: relative;
    padding: 228px 0 152px;
    isolation: isolate;
    overflow: hidden;
    background: #090909;
}

.gallery-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.5) 48%, rgba(0, 0, 0, 0.6) 100%),
        radial-gradient(circle at center top, rgba(176, 139, 87, 0.16) 0%, rgba(176, 139, 87, 0) 44%);
}

.gallery-hero::after {
    content: "";
    position: absolute;
    inset: -24px;
    z-index: 0;
    background: var(--gallery-hero-bg) center center / cover no-repeat;
    filter: blur(5px) brightness(0.42);
    transform: scale(1.06);
}

.gallery-hero__inner {
    position: relative;
    z-index: 2;
    max-width: 860px;
}

.gallery-hero__eyebrow,
.gallery-jump__eyebrow,
.gallery-story__eyebrow,
.gallery-promo__eyebrow,
.gallery-final__eyebrow {
    margin: 0 0 18px;
    color: var(--bronze-light);
    font-size: 12px;
    letter-spacing: 2.6px;
    text-transform: uppercase;
}

.gallery-hero__title {
    margin: 0;
    max-width: 900px;
    font-size: clamp(54px, 8vw, 108px);
    line-height: 0.92;
}

.gallery-hero__subtitle {
    margin: 22px 0 0;
    max-width: 760px;
    color: var(--text-main);
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.65;
}

.gallery-hero__lead {
    margin: 18px 0 0;
    max-width: 720px;
    color: var(--text-muted);
    font-size: 17px;
    line-height: 1.85;
}

.gallery-hero__actions,
.gallery-promo__actions,
.gallery-final__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 34px;
}

.gallery-hero__actions > a,
.gallery-story__actions > a,
.gallery-promo__actions > a,
.gallery-final__actions > a,
.gallery-empty__actions > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
}

.gallery-hero__actions .secondary-btn,
.gallery-story__actions .secondary-btn,
.gallery-promo__actions .secondary-btn,
.gallery-final__actions .secondary-btn,
.gallery-empty__actions .secondary-btn {
    padding: 0 34px;
    border: 1px solid rgba(226, 209, 163, 0.3);
    background: rgba(9, 9, 9, 0.24);
    backdrop-filter: blur(6px);
}

.gallery-hero__actions .secondary-btn:hover,
.gallery-hero__actions .secondary-btn:focus-visible,
.gallery-story__actions .secondary-btn:hover,
.gallery-story__actions .secondary-btn:focus-visible,
.gallery-promo__actions .secondary-btn:hover,
.gallery-promo__actions .secondary-btn:focus-visible,
.gallery-final__actions .secondary-btn:hover,
.gallery-final__actions .secondary-btn:focus-visible,
.gallery-empty__actions .secondary-btn:hover,
.gallery-empty__actions .secondary-btn:focus-visible {
    border-color: rgba(226, 209, 163, 0.62);
    background: rgba(9, 9, 9, 0.36);
}

.gallery-hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.gallery-hero__tags a {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    color: rgba(245, 245, 245, 0.84);
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 1.7px;
    text-transform: uppercase;
    border: 1px solid rgba(226, 209, 163, 0.18);
    background: rgba(9, 9, 9, 0.34);
    backdrop-filter: blur(6px);
    transition: border-color 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

.gallery-hero__tags a:hover,
.gallery-hero__tags a:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(226, 209, 163, 0.4);
    background: rgba(9, 9, 9, 0.48);
}

.gallery-jump {
    padding-top: 0;
}

.gallery-jump__panel,
.gallery-final__panel,
.gallery-empty__panel {
    padding: 34px;
    background: linear-gradient(180deg, rgba(18, 18, 18, 0.96) 0%, rgba(10, 10, 10, 0.98) 100%);
    border: 1px solid rgba(226, 209, 163, 0.16);
    box-shadow: 0 28px 52px rgba(0, 0, 0, 0.28);
}

.gallery-jump__panel {
    margin-top: -78px;
    position: relative;
    z-index: 3;
}

.gallery-jump__links {
    display: flex;
    flex-wrap: wrap;
    column-gap: 28px;
    row-gap: 14px;
}

.gallery-stories {
    display: grid;
    gap: 118px;
    padding: 24px 0 0;
}

.gallery-story {
    position: relative;
}

.gallery-story__shell {
    display: grid;
    grid-template-columns: minmax(320px, 0.42fr) minmax(0, 0.58fr);
    gap: 44px;
    align-items: start;
}

.gallery-story--reverse .gallery-story__content {
    order: 2;
}

.gallery-story--reverse .gallery-story__visual {
    order: 1;
}

.gallery-story__content {
    display: grid;
    gap: 18px;
    align-content: start;
    padding-top: 12px;
}

.gallery-story__title,
.gallery-promo__title,
.gallery-final__title,
.gallery-empty__title {
    margin: 0;
    font-size: clamp(36px, 4vw, 62px);
    line-height: 0.98;
}

.gallery-story__text,
.gallery-promo__text,
.gallery-final__text,
.gallery-empty__text {
    margin: 0;
    color: var(--text-muted);
    font-size: 17px;
    line-height: 1.85;
}

.gallery-story__note {
    margin: 4px 0 0;
    padding-left: 16px;
    color: rgba(245, 245, 245, 0.72);
    border-left: 1px solid rgba(226, 209, 163, 0.24);
    line-height: 1.8;
}

.gallery-story__actions {
    margin-top: 8px;
}

.gallery-story__visual {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 18px;
    align-items: stretch;
}

.gallery-story--double .gallery-story__visual {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery-story--single .gallery-story__visual {
    grid-template-columns: 1fr;
}

.gallery-story__card,
.gallery-story__rail {
    display: grid;
    gap: 18px;
}

.gallery-story__card--featured {
    min-height: 620px;
}

.gallery-story__rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
}

.gallery-story--double .gallery-story__rail,
.gallery-story--single .gallery-story__rail {
    grid-template-columns: 1fr;
}

.gallery-story__link {
    position: relative;
    display: block;
    height: 100%;
    overflow: hidden;
    background: #0a0a0a;
    text-decoration: none;
    color: var(--text-main);
}

.gallery-story__image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
    transform: scale(1.001);
    transition: transform 0.55s ease;
}

.gallery-story__card--featured .gallery-story__image {
    min-height: 620px;
}

.gallery-story--section-jidlo .gallery-story__card--featured,
.gallery-story--section-jidlo .gallery-story__card--featured .gallery-story__image {
    min-height: 0;
}

.gallery-story--section-jidlo .gallery-story__link {
    aspect-ratio: 4 / 3;
}

.gallery-story--section-jidlo .gallery-story__image {
    min-height: 0;
}

@media (hover: hover) and (pointer: fine) {
    .gallery-story__link:hover .gallery-story__image,
    .gallery-story__link:focus-visible .gallery-story__image {
        transform: scale(1.04);
    }
}

.gallery-promo,
.gallery-final,
.gallery-empty {
    position: relative;
}

.gallery-promo__inner {
    padding: 36px 40px;
    background:
        radial-gradient(circle at right center, rgba(176, 139, 87, 0.16) 0%, rgba(176, 139, 87, 0) 36%),
        linear-gradient(180deg, rgba(16, 16, 16, 0.98) 0%, rgba(8, 8, 8, 0.98) 100%);
    border: 1px solid rgba(226, 209, 163, 0.16);
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(6px);
}

.gallery-lightbox[hidden] {
    display: none !important;
}

.gallery-lightbox__dialog {
    position: relative;
    width: min(1320px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
}

.gallery-lightbox__figure {
    position: relative;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.gallery-lightbox__image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: calc(100vh - 210px);
    height: auto;
    object-fit: contain;
    background: #0b0b0b;
}

.gallery-lightbox__meta {
    width: min(880px, 100%);
    display: grid;
    gap: 8px;
    text-align: center;
}

.gallery-lightbox__title {
    margin: 0;
    color: var(--text-main);
    font-size: clamp(28px, 3vw, 42px);
    line-height: 0.98;
}

.gallery-lightbox__caption {
    margin: 0;
    color: #d9c8a0;
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
    letter-spacing: 0.04em;
}

.gallery-lightbox__nav {
    width: 52px;
    height: 52px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(217, 200, 160, 0.75);
    border-radius: 999px;
    background: rgba(14, 14, 14, 0.82);
    color: #d9c8a0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.gallery-lightbox__nav:hover,
.gallery-lightbox__nav:focus-visible {
    background: rgba(24, 24, 24, 0.94);
    border-color: rgba(217, 200, 160, 0.95);
    transform: translateY(-1px);
}

.gallery-lightbox__nav[hidden] {
    display: none !important;
}

.gallery-lightbox__close {
    position: absolute;
    top: 16px;
    right: 18px;
    z-index: 2;
    width: 42px;
    height: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(217, 200, 160, 0.75);
    border-radius: 999px;
    background: rgba(14, 14, 14, 0.82);
    color: #d9c8a0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__close:focus-visible {
    background: rgba(24, 24, 24, 0.94);
    border-color: rgba(217, 200, 160, 0.95);
}

.gallery-lightbox__icon {
    display: block;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gallery-lightbox__icon--arrow {
    width: 14px;
    height: 24px;
}

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

@media (min-width: 1025px) {
    .gallery-hero__title {
        font-size: 60px;
    }
}

@media (max-width: 1240px) {
    .gallery-story__shell {
        grid-template-columns: 1fr;
    }

    .gallery-story--reverse .gallery-story__content,
    .gallery-story--reverse .gallery-story__visual {
        order: initial;
    }

    .gallery-story__content {
        max-width: 760px;
    }
}

@media (max-width: 1024px) {
    .gallery-hero {
        padding: 206px 0 138px;
    }

    .gallery-jump__panel {
        margin-top: -62px;
    }

    .gallery-stories {
        gap: 92px;
    }

    .gallery-story__visual,
    .gallery-story--double .gallery-story__visual {
        grid-template-columns: 1fr;
    }

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

    .gallery-story__card--featured,
    .gallery-story__card--featured .gallery-story__image {
        min-height: 520px;
    }
}

@media (max-width: 767px) {
    .gallery-hero {
        padding: 178px 0 118px;
    }

    .gallery-hero__subtitle,
    .gallery-hero__lead,
    .gallery-story__text,
    .gallery-story__note,
    .gallery-promo__text,
    .gallery-final__text,
    .gallery-empty__text {
        font-size: 16px;
    }

    .gallery-jump__panel,
    .gallery-promo__inner,
    .gallery-final__panel,
    .gallery-empty__panel {
        padding: 28px 22px;
    }

    .gallery-story__rail {
        grid-template-columns: 1fr;
    }

    .gallery-story__card--featured,
    .gallery-story__card--featured .gallery-story__image {
        min-height: 420px;
    }

    .gallery-story__image {
        min-height: 260px;
    }

    .gallery-lightbox {
        padding: 16px;
    }

    .gallery-lightbox__dialog {
        width: min(100%, calc(100vw - 32px));
        max-height: calc(100vh - 32px);
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .gallery-lightbox__figure {
        width: min(100%, calc(100vw - 32px));
        max-height: calc(100vh - 32px);
    }

    .gallery-lightbox__image {
        max-height: calc(100vh - 210px);
    }

    .gallery-lightbox__close {
        top: 12px;
        right: 12px;
    }

    .gallery-lightbox__nav {
        width: 46px;
        height: 46px;
        font-size: 32px;
    }
}

@media (max-width: 560px) {
    .gallery-hero__actions,
    .gallery-promo__actions,
    .gallery-final__actions {
        flex-direction: column;
    }

    .gallery-hero__actions .bronze-btn,
    .gallery-hero__actions .secondary-btn,
    .gallery-promo__actions .bronze-btn,
    .gallery-promo__actions .secondary-btn,
    .gallery-final__actions .bronze-btn,
    .gallery-final__actions .secondary-btn {
        width: 100%;
        justify-content: center;
    }

    .gallery-hero__tags,
    .gallery-jump__links {
        gap: 10px;
    }
}
