.gallery-page {
    --gallery-accent: #88c900;
    --gallery-accent-dark: #4b8200;
    --gallery-ink: #5d5b59;
    --gallery-ink-strong: #3f3f3e;
    --gallery-muted: #77726c;
    --gallery-ivory: #faf8f4;
    --gallery-background: #b7aa9d;
    overflow-x: hidden;
}

.gallery-page *,
.gallery-page *::before,
.gallery-page *::after {
    box-sizing: border-box;
}

.gallery-page .sirka_listy-menu {
    position: relative;
    isolation: isolate;
    min-height: 590px;
    overflow: hidden;
    padding: 20px 0 68px;
    background-position: center 42%;
}

.gallery-page .sirka_listy-menu::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, rgba(30, 27, 24, 0.08), rgba(30, 27, 24, 0.42));
    pointer-events: none;
}

.gallery-page .sirka_listy-menu #centrovany_top {
    width: min(1200px, 100%);
    margin-inline: auto;
    padding-inline: 0;
}

.gallery-page .sirka_listy-menu #nadpis {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    color: #f8f5ef;
    font-size: clamp(38px, 5vw, 62px);
    line-height: 1.08;
    text-align: center;
    text-wrap: balance;
    overflow-wrap: anywhere;
}

.gallery-page .sirka_listy-menu #nadpis2 {
    width: 100%;
    max-width: 1140px;
    margin: 18px auto 0;
    color: rgba(248, 245, 239, 0.95);
    font-size: clamp(18px, 2vw, 25px);
    line-height: 1.45;
    text-align: center;
    text-wrap: balance;
}

.gallery-main {
    min-height: 650px;
    padding: clamp(54px, 6vw, 82px) 20px clamp(76px, 8vw, 112px);
    color: var(--gallery-ink);
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.15), transparent 30%),
        var(--gallery-background);
}

.gallery-guide {
    width: min(1220px, 100%);
    margin-inline: auto;
}

.gallery-guide__header {
    max-width: 720px;
    margin: 0 auto 27px;
    text-align: center;
}

.gallery-guide__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 11px;
    color: var(--gallery-ink);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.13em;
    line-height: 1.35;
}

.gallery-guide__eyebrow::before {
    width: 22px;
    height: 2px;
    background: var(--gallery-accent);
    content: "";
}

.gallery-guide__header h2 {
    margin: 0;
    color: var(--gallery-ink-strong);
    font-family: 'Baloo Tammudu', Arial, sans-serif;
    font-size: clamp(31px, 4vw, 45px);
    font-weight: 700;
    line-height: 1.12;
    text-wrap: balance;
}

.gallery-guide__header p {
    margin: 10px auto 0;
    color: var(--gallery-muted);
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.55;
}

.gallery-location-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(540px, 100%);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(93, 91, 89, 0.13);
    border-radius: 12px;
    background: var(--gallery-ivory);
    box-shadow: 0 10px 22px rgba(58, 50, 43, 0.17);
}

.gallery-location-switch button {
    min-height: 58px;
    padding: 13px 18px;
    border: 0;
    border-radius: 0;
    color: var(--gallery-ink);
    background: transparent;
    font: inherit;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
    transition: color 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
}

.gallery-location-switch button[aria-pressed="true"] {
    color: #172000;
    background: linear-gradient(135deg, #94db00, #7fbd00);
    box-shadow: inset 0 0 0 1px rgba(105, 155, 0, 0.13);
}

.gallery-location-switch button:focus-visible {
    position: relative;
    z-index: 1;
    outline: 3px solid rgba(70, 105, 0, 0.55);
    outline-offset: -3px;
}

.gallery-location-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 25px;
    margin: 16px auto 36px;
    color: var(--gallery-ink);
    font-size: 14px;
    line-height: 1.4;
}

.gallery-location-status > span {
    display: inline-grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 50%;
    color: #426f00;
    background: rgba(136, 201, 0, 0.18);
    font-size: 13px;
    font-weight: 900;
}

.gallery-location-status strong {
    color: var(--gallery-ink-strong);
    font-weight: 800;
}

.gallery-panels {
    position: relative;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(18px, 2.3vw, 28px);
}

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

.gallery-item {
    position: relative;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    background: var(--gallery-ivory);
    box-shadow: 0 16px 34px rgba(58, 50, 43, 0.18);
    opacity: 1;
    transform: translateY(0) scale(1);
    transition:
        opacity 270ms ease,
        transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
        border-color 260ms ease,
        box-shadow 300ms ease;
}

.gallery-item a {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    color: #fff;
    text-decoration: none;
}

.gallery-item a::after {
    position: absolute;
    right: 17px;
    bottom: 17px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 50%;
    color: #fff;
    background: rgba(36, 34, 31, 0.38);
    box-shadow: 0 6px 15px rgba(20, 18, 16, 0.14);
    content: "+";
    font-family: Arial, sans-serif;
    font-size: 22px;
    font-weight: 300;
    line-height: 1;
    backdrop-filter: blur(7px);
    transition: background-color 260ms ease, transform 300ms ease;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.001);
    transition: transform 750ms cubic-bezier(0.22, 1, 0.36, 1), filter 320ms ease;
}

.gallery-item__caption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 58px 64px 18px 20px;
    color: #fff;
    background: linear-gradient(180deg, transparent, rgba(24, 22, 20, 0.75));
    font-size: clamp(15px, 1.5vw, 18px);
    font-weight: 700;
    line-height: 1.3;
    opacity: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
    transform: translateY(8px);
    transition: opacity 280ms ease, transform 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-item a:focus-visible {
    outline: 4px solid rgba(112, 165, 0, 0.85);
    outline-offset: -4px;
}

@media (hover: hover) and (pointer: fine) {
    .gallery-item:hover {
        border-color: rgba(136, 201, 0, 0.9);
        box-shadow: 0 22px 46px rgba(58, 50, 43, 0.24);
        transform: translateY(-5px);
    }

    .gallery-item:hover img {
        filter: saturate(1.04) contrast(1.02);
        transform: scale(1.045);
    }

    .gallery-item:hover a::after {
        background: rgba(125, 184, 0, 0.9);
        transform: rotate(90deg);
    }

    .gallery-item:hover .gallery-item__caption,
    .gallery-item a:focus-visible .gallery-item__caption {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (hover: none), (pointer: coarse) {
    .gallery-item__caption {
        display: none;
    }
}

@media (min-width: 901px) {
    .gallery-main {
        padding-top: 44px;
    }
}

.gallery-guide.is-switching .gallery-item {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px) scale(0.988);
    transition-delay: 0ms !important;
}

.gallery-guide.is-switching .gallery-location-switch {
    pointer-events: none;
}

.gallery-guide.is-entering .gallery-item:nth-child(2),
.gallery-guide.is-entering .gallery-item:nth-child(5),
.gallery-guide.is-entering .gallery-item:nth-child(8) {
    transition-delay: 55ms;
}

.gallery-guide.is-entering .gallery-item:nth-child(3),
.gallery-guide.is-entering .gallery-item:nth-child(6),
.gallery-guide.is-entering .gallery-item:nth-child(9) {
    transition-delay: 110ms;
}

.gallery-guide__hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 31px auto 0;
    color: var(--gallery-ink);
    font-size: 14px;
    line-height: 1.45;
}

.gallery-guide__hint span {
    color: var(--gallery-accent-dark);
    font-size: 19px;
    line-height: 1;
}

.gallery-motion .gallery-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 620ms ease, transform 720ms cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-motion .gallery-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-motion .gallery-location-switch.gallery-reveal {
    transition-delay: 55ms;
}

.gallery-motion .gallery-location-status.gallery-reveal {
    transition-delay: 100ms;
}

.gallery-motion .gallery-panels.gallery-reveal {
    transition-delay: 145ms;
}

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

    .gallery-guide.is-entering .gallery-item:nth-child(n) {
        transition-delay: 0ms;
    }

    .gallery-guide.is-entering .gallery-item:nth-child(even) {
        transition-delay: 55ms;
    }
}

@media (max-width: 600px) {
    .gallery-page .sirka_listy-menu {
        min-height: 430px;
        padding-bottom: 46px;
        background-position: center center;
    }

    .gallery-page .sirka_listy-menu #centrovany_top {
        padding-inline: 16px;
    }

    .gallery-page .sirka_listy-menu #nadpis {
        max-width: 340px;
        font-size: clamp(30px, 9vw, 39px);
        line-height: 1.08;
    }

    .gallery-page .sirka_listy-menu #nadpis2 {
        max-width: 355px;
        margin-top: 13px;
        font-size: 17px;
        line-height: 1.42;
    }

    .gallery-main {
        padding: 42px 14px 75px;
    }

    .gallery-guide__header {
        margin-bottom: 22px;
    }

    .gallery-guide__eyebrow {
        margin-bottom: 8px;
        font-size: 10px;
    }

    .gallery-guide__header h2 {
        font-size: clamp(29px, 9vw, 36px);
    }

    .gallery-guide__header p {
        max-width: 310px;
        margin-top: 7px;
        font-size: 15px;
    }

    .gallery-location-switch {
        width: min(360px, 100%);
        border-radius: 11px;
    }

    .gallery-location-switch button {
        min-height: 52px;
        padding: 11px 12px;
        font-size: 15px;
    }

    .gallery-location-status {
        margin: 13px auto 28px;
        font-size: 13px;
    }

    .gallery-location-status > span {
        width: 18px;
        height: 18px;
        font-size: 12px;
    }

    .gallery-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .gallery-item {
        border-radius: 14px;
    }

    .gallery-item__caption {
        padding: 52px 58px 15px 17px;
        font-size: 16px;
    }

    .gallery-item a::after {
        right: 14px;
        bottom: 14px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    .gallery-guide__hint {
        margin-top: 25px;
        font-size: 13px;
    }

    .gallery-guide.is-entering .gallery-item:nth-child(n) {
        transition-delay: 0ms;
    }
}

@media (max-width: 350px) {
    .gallery-main {
        padding-inline: 10px;
    }

    .gallery-page .sirka_listy-menu #nadpis {
        font-size: 29px;
    }

    .gallery-page .sirka_listy-menu #nadpis2 {
        font-size: 16px;
    }

    .gallery-location-switch button {
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-motion .gallery-reveal,
    .gallery-item,
    .gallery-item img,
    .gallery-item a::after,
    .gallery-location-switch button {
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }

    .gallery-item:hover {
        transform: none;
    }

    .gallery-item:hover img {
        transform: none;
    }
}
