:root {
    --container-width: 1940px;
    --space-side: clamp(12px, 1.8vw, 34px);
    --bg-main: #6257a2;
    --bg-main-dark: #4d458d;
    --accent: #f7a51e;
    --accent-soft: #ffd58b;
    --surface-strong: rgba(255, 255, 255, 0.94);
    --surface-soft: rgba(255, 255, 255, 0.78);
    --surface-border: rgba(98, 87, 162, 0.14);
    --text-dark: #20263f;
    --text-muted: #616888;
    --text-subtle: #7d83a6;
    --shadow-soft: 0 16px 34px rgba(61, 57, 111, 0.12);
    --shadow-panel: 0 24px 60px rgba(57, 49, 117, 0.16);
}

body.site-body {
    color: var(--text-dark);
    background:
        radial-gradient(circle at 10% 8%, rgba(247, 165, 30, 0.2) 0%, transparent 24%),
        radial-gradient(circle at 84% 10%, rgba(98, 87, 162, 0.2) 0%, transparent 28%),
        radial-gradient(circle at 52% 84%, rgba(255, 255, 255, 0.9) 0%, transparent 34%),
        linear-gradient(180deg, #faf9ff 0%, #f0eeff 52%, #f8f6ff 100%);
}

body.site-body::before,
body.site-body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(18px);
    opacity: 0.7;
    z-index: 0;
}

body.site-body::before {
    width: 32vw;
    height: 32vw;
    min-width: 260px;
    min-height: 260px;
    top: 8vh;
    left: -10vw;
    background: radial-gradient(circle, rgba(247, 165, 30, 0.22) 0%, rgba(247, 165, 30, 0) 70%);
}

body.site-body::after {
    width: 36vw;
    height: 36vw;
    min-width: 300px;
    min-height: 300px;
    right: -12vw;
    top: 12vh;
    background: radial-gradient(circle, rgba(98, 87, 162, 0.18) 0%, rgba(98, 87, 162, 0) 72%);
}

.site-header,
.site-main,
.site-footer {
    position: relative;
    z-index: 1;
}

.site-header {
    top: 14px;
    z-index: 80;
    padding: 0 var(--space-side);
    background: transparent;
    border-bottom: 0;
}

.site-main,
.site-footer {
    z-index: 1;
}

.site-header-inner {
    width: min(var(--container-width), 100%);
    min-height: 84px;
    padding-left: clamp(16px, 1.8vw, 28px);
    padding-right: clamp(16px, 1.8vw, 28px);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.74);
    box-shadow: var(--shadow-panel);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
    backdrop-filter: blur(18px) saturate(1.15);
}

.site-logo {
    min-width: 52px;
    min-height: 52px;
    padding: 6px 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 10px 24px rgba(78, 70, 144, 0.12);
}

.site-logo:hover {
    transform: translateY(-1px);
}

.site-nav {
    gap: 10px;
}

.site-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 18px;
    border-radius: 999px;
    color: var(--text-dark);
    font-size: clamp(20px, 1.45vw, 32px);
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: color 0.34s cubic-bezier(0.22, 1, 0.36, 1), transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-nav-link::after {
    left: 16px;
    right: 16px;
    bottom: 4px;
    border-radius: 999px;
    background: #f7a51e;
    opacity: 0;
    transform-origin: center;
    transition: opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1), transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-nav-link:hover,
.site-nav-link.is-active,
.site-nav-link:focus-visible {
    color: var(--bg-main-dark);
    background: transparent;
    box-shadow: none;
    transform: translateY(-1px);
}

.site-nav-link:hover::after,
.site-nav-link.is-active::after,
.site-nav-link:focus-visible::after {
    opacity: 1;
    transform: scaleX(1);
}

.site-city-wrap {
    justify-self: stretch;
    z-index: 90;
}

.city-toggle {
    width: 100%;
    justify-content: center;
    padding: 11px 16px;
    background: linear-gradient(135deg, rgba(247, 165, 30, 0.18) 0%, rgba(247, 165, 30, 0.28) 100%);
    color: #5d3c08;
    box-shadow: inset 0 0 0 1px rgba(247, 165, 30, 0.18);
}

.city-toggle:hover {
    background: linear-gradient(135deg, rgba(247, 165, 30, 0.24) 0%, rgba(247, 165, 30, 0.34) 100%);
}

.city-toggle-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.city-pin {
    filter: drop-shadow(0 8px 18px rgba(247, 165, 30, 0.2));
}

.city-menu {
    width: 280px;
    z-index: 95;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-panel);
    -webkit-backdrop-filter: blur(18px) saturate(1.08);
    backdrop-filter: blur(18px) saturate(1.08);
}

.city-menu-link,
.city-menu-empty {
    font-size: 14px;
    color: var(--text-dark);
}

.city-menu-link:hover,
.city-menu-link.is-active {
    background: rgba(98, 87, 162, 0.08);
}

.site-nav-toggle {
    border-color: rgba(98, 87, 162, 0.14);
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 10px 24px rgba(78, 70, 144, 0.12);
}

.site-nav-toggle span {
    background: var(--bg-main-dark);
}

.site-main {
    padding-top: 16px;
    padding-bottom: 10px;
    min-height: calc(100dvh - 124px);
}

.page-breadcrumbs {
    gap: 8px;
    margin-bottom: 18px;
    font-size: 12px;
    color: var(--text-subtle);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-breadcrumb-link,
.page-breadcrumb-current,
.page-breadcrumb-city {
    border-radius: 999px;
}

.page-breadcrumb-link:hover {
    color: var(--bg-main-dark);
}

.page-breadcrumb-current,
.page-breadcrumb-city {
    color: var(--bg-main-dark);
    font-weight: 800;
}

.page-back-link {
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--surface-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--text-dark);
    box-shadow: var(--shadow-soft);
}

.page-back-link:hover {
    color: var(--bg-main-dark);
    transform: translateX(-1px);
}

.home-page,
.category-page,
.card-page-wrap {
    gap: 24px;
}

.home-page {
    align-items: stretch;
    justify-content: flex-start;
    padding-top: 6px;
    padding-bottom: 6px;
    min-height: calc(100dvh - 150px);
    height: calc(100dvh - 150px);
}

.category-hero,
.simple-pagination {
    border: 1px solid rgba(255, 255, 255, 0.88);
    background: linear-gradient(145deg, var(--surface-strong) 0%, var(--surface-soft) 100%);
    box-shadow: var(--shadow-panel);
    -webkit-backdrop-filter: blur(18px) saturate(1.08);
    backdrop-filter: blur(18px) saturate(1.08);
}

.home-categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
    min-height: 0;
    height: 100%;
    flex: 1;
    align-content: stretch;
}

.home-category-card {
    min-height: 0;
    height: 100%;
    border-radius: 30px;
    box-shadow: var(--shadow-panel);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-category-card::before,
.category-card-tile::before {
    border-color: rgba(255, 255, 255, 0.28);
}

.home-category-overlay {
    background: linear-gradient(180deg, rgba(22, 26, 43, 0.04) 0%, rgba(20, 18, 34, 0.72) 100%);
    transition: background 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-category-card img,
.home-category-fallback {
    transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1), filter 0.45s ease;
}

.home-category-card:hover,
.category-card-tile:hover {
    transform: translateY(-6px);
}

.home-category-shell,
.category-card-shell {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    z-index: 3;
    display: grid;
    gap: 10px;
}

.home-category-title,
.category-card-title {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    font-family: var(--font-display);
    font-size: clamp(26px, 2.6vw, 46px);
    line-height: 1;
    letter-spacing: -0.03em;
    color: #ffffff;
    text-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
}

.category-page {
    display: grid;
    gap: 22px;
    padding-top: 18px;
}

.category-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    padding: clamp(22px, 3vw, 30px);
    border-radius: 30px;
}

.category-hero-simple {
    grid-template-columns: 1fr;
}

.category-hero-copy {
    display: grid;
    gap: 10px;
}

.category-page-title {
    color: var(--text-dark);
    font-size: clamp(36px, 4vw, 64px);
    line-height: 0.98;
    letter-spacing: -0.035em;
}

.category-page-description {
    margin: 0;
    max-width: 62ch;
    font-size: clamp(16px, 1.15vw, 20px);
    line-height: 1.65;
    color: var(--text-muted);
}

.category-grid {
    grid-template-columns: repeat(auto-fit, minmax(374px, 1fr));
    justify-content: stretch;
    gap: clamp(18px, 1.8vw, 30px);
}

.category-card-tile {
    aspect-ratio: 9 / 16;
    min-height: clamp(560px, 53vw, 825px);
    height: auto;
    border-radius: 28px;
    box-shadow: 0 10px 20px rgba(46, 43, 88, 0.18);
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.category-card-overlay {
    background: linear-gradient(180deg, rgba(17, 22, 36, 0.06) 0%, rgba(17, 18, 31, 0.76) 100%);
    transition: background 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.category-card-tile img,
.category-card-fallback {
    transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1), filter 0.45s ease;
}

.simple-pagination {
    width: fit-content;
    max-width: 100%;
    margin: 8px auto 0;
    padding: 12px 18px;
    border-radius: 999px;
    color: var(--text-dark);
    gap: 16px;
}

.simple-pagination a {
    color: var(--bg-main-dark);
}

.simple-pagination a:hover {
    color: var(--accent);
}

.card-page-wrap {
    width: min(1420px, 100%);
    display: grid;
    gap: 22px;
    padding-top: 18px;
}

.card-page-canvas {
    border-radius: 34px;
    padding: clamp(24px, 3vw, 34px);
    display: grid;
    gap: 24px;
}

.card-page-title {
    color: var(--text-dark);
    font-size: clamp(28px, 3.6vw, 56px);
    line-height: 1;
    letter-spacing: -0.045em;
}

.card-hero-media {
    min-height: 320px;
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(98, 87, 162, 0.16) 0%, rgba(247, 165, 30, 0.2) 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.card-hero-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.card-media-section {
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.card-gallery-grid,
.card-kuula-list,
.card-video-block {
    margin-top: 0;
}

.card-gallery-item,
.card-kuula-item,
.card-video-block {
    box-shadow: 0 16px 30px rgba(57, 49, 117, 0.14);
}

.card-gallery-item {
    background: #ffffff;
    border-radius: 22px;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.card-gallery-item img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.card-gallery-item::after,
.card-video-block::before,
.card-kuula-item::after {
    border-color: rgba(117, 123, 170, 0.42);
    background: rgba(255, 255, 255, 0.86);
    color: var(--text-dark);
}

.card-kuula-item {
    border: 1px solid rgba(98, 87, 162, 0.12);
    background: #f9f8ff;
}

.card-kuula-title {
    color: var(--text-dark);
    border-bottom-color: rgba(98, 87, 162, 0.12);
}

.card-video-block {
    border-radius: 22px;
}

.site-footer {
    padding: 6px var(--space-side) 12px;
    border-top: 0;
    background: transparent;
}

.site-footer-inner {
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(77, 69, 141, 0.98) 0%, rgba(98, 87, 162, 0.98) 100%);
    box-shadow: 0 24px 56px rgba(57, 49, 117, 0.24);
    padding: 14px clamp(18px, 2vw, 28px);
    color: #ffffff;
}

.site-footer-title,
.site-footer-contacts-title,
.site-footer-contact-item strong,
.site-footer-contact-item a {
    color: #ffffff;
}

.site-footer-subtitle,
.site-footer-contact-note,
.site-footer-contact-item span {
    color: rgba(255, 255, 255, 0.72);
}

.site-footer-contact-item {
    background: rgba(255, 255, 255, 0.08);
}

.city-modal-dialog {
    border: 1px solid rgba(255, 255, 255, 0.86);
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.84) 100%);
    box-shadow: var(--shadow-panel);
    -webkit-backdrop-filter: blur(18px) saturate(1.08);
    backdrop-filter: blur(18px) saturate(1.08);
}

.city-modal-grid a {
    box-shadow: 0 14px 22px rgba(57, 49, 117, 0.08);
}

@media (max-width: 1180px) {
    .category-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .site-main,
    .home-page,
    .home-categories-grid {
        min-height: 0;
        height: auto;
    }

    .site-header {
        top: 10px;
        padding: 0 14px;
    }

    .site-nav-drawer {
        background:
            radial-gradient(circle at 24% 0%, rgba(247, 165, 30, 0.18) 0%, transparent 34%),
            linear-gradient(180deg, #6257a2 0%, #4d458d 100%);
    }

    .site-nav-drawer .site-nav-link {
        justify-content: flex-start;
        padding: 0;
        min-height: 0;
        border-radius: 0;
        background: transparent;
        color: #ffffff;
        box-shadow: none;
        font-size: clamp(28px, 8vw, 46px);
        line-height: 1.02;
    }

    .site-nav-drawer .site-nav-link::after {
        left: 0;
        right: auto;
        width: 64px;
        bottom: -10px;
    }

    .site-nav-drawer .site-nav-link:hover,
    .site-nav-drawer .site-nav-link.is-active,
    .site-nav-drawer .site-nav-link:focus-visible {
        background: transparent;
        color: #ffe2ad;
        box-shadow: none;
    }

    .site-nav-close {
        background: rgba(255, 255, 255, 0.16);
        color: #ffffff;
    }

    .city-drawer {
        background:
            radial-gradient(circle at 84% 0%, rgba(247, 165, 30, 0.16) 0%, transparent 34%),
            linear-gradient(180deg, #6257a2 0%, #4d458d 100%);
    }

    .site-header-inner {
        min-height: 74px;
        border-radius: 22px;
    }

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

    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: stretch;
        gap: 16px;
    }

    .home-category-card:first-child {
        grid-column: span 1;
    }
}

@media (max-width: 760px) {
    .site-main {
        padding-top: 30px;
    }

    .site-header-inner {
        grid-template-columns: auto 1fr auto;
        gap: 10px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .site-logo {
        padding: 4px 8px;
    }

    .city-toggle {
        justify-content: flex-start;
    }

    .category-hero,
    .card-media-section,
    .site-footer-inner,
    .city-modal-dialog {
        border-radius: 24px;
    }

    .category-page-title,
    .card-page-title {
        font-size: clamp(32px, 10vw, 52px);
    }

    .site-footer-contacts-grid,
    .home-categories-grid,
    .card-gallery-grid,
    .city-modal-grid {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: minmax(0, 1fr);
        justify-content: stretch;
        gap: 12px;
    }

    .home-category-card {
        height: 380px;
        min-height: 380px;
    }

    .category-card-tile {
        aspect-ratio: 9 / 16;
        width: min(100%, 452px);
        max-width: 452px;
        margin-left: auto;
        margin-right: auto;
        min-height: 0;
        height: auto;
    }

    .home-category-shell,
    .category-card-shell {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }

    .home-category-title,
    .category-card-title {
        font-size: clamp(24px, 9vw, 34px);
    }

    .simple-pagination {
        width: 100%;
        border-radius: 24px;
        display: grid;
        grid-template-columns: minmax(44px, auto) minmax(0, 1fr) minmax(44px, auto);
        align-items: center;
        gap: 8px;
        padding: 8px 10px;
    }

    .simple-pagination > a,
    .simple-pagination > .is-disabled {
        width: 44px;
        min-width: 44px;
        height: 44px;
        border-radius: 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0;
        line-height: 1;
    }

    .simple-pagination > a {
        border: 1px solid var(--surface-border);
        background: rgba(255, 255, 255, 0.72);
        color: var(--bg-main-dark);
    }

    .simple-pagination > .is-disabled {
        border: 1px solid rgba(117, 123, 170, 0.22);
        background: rgba(255, 255, 255, 0.4);
    }

    .simple-pagination > :first-child::before {
        content: '←';
        font-size: 24px;
    }

    .simple-pagination > :last-child::before {
        content: '→';
        font-size: 24px;
    }

    .simple-pagination > span:not(.is-disabled) {
        text-align: center;
        font-size: 12px;
        line-height: 1.2;
    }
}
