:root {
    --turquoise-50: #f0fbfc;
    --turquoise-100: #daf4f7;
    --turquoise-200: #b4e9ef;
    --turquoise-300: #84dbe5;
    --turquoise-400: #41c9d7;
    --turquoise-500: #15afbd;
    --turquoise-600: #0f919c;
    --turquoise-700: #0a747d;
    --turquoise-800: #05585f;
    --turquoise-900: #033d43;
    --turquoise-950: #012528;
    --brand: var(--turquoise-500);
    --brand-bright: var(--turquoise-400);
    --brand-soft: var(--turquoise-100);
    --brand-mist: var(--turquoise-50);
    --brand-deep: var(--turquoise-800);
    --ink: #102a31;
    --ink-soft: #3f545c;
    --ink-faint: #60747d;
    --paper: #f7f9fa;
    --paper-deep: #e9eef1;
    --white: #fff;
    --brand-rgb: 21 175 189;
    --ink-rgb: 16 42 49;
    --paper-rgb: 247 249 250;
    --line: rgb(var(--ink-rgb) / .14);
    --line-light: rgb(255 255 255 / .18);
    --shadow-sm: 0 12px 36px rgb(var(--ink-rgb) / .08);
    --shadow: 0 24px 70px rgb(var(--ink-rgb) / .12);
    --radius-sm: 14px;
    --radius-md: 24px;
    --radius-lg: 38px;
    --container: 1180px;
    --header-height: 84px;
    --ease: cubic-bezier(.2, .75, .2, 1);
}

@supports (color: oklch(50% .1 205)) {
    :root {
        --turquoise-50: oklch(98% .012 205);
        --turquoise-100: oklch(95% .028 205);
        --turquoise-200: oklch(90% .055 205);
        --turquoise-300: oklch(84% .085 205);
        --turquoise-400: oklch(77% .115 205);
        --turquoise-500: oklch(69% .115 205);
        --turquoise-600: oklch(60% .1 205);
        --turquoise-700: oklch(51% .085 205);
        --turquoise-800: oklch(42% .07 205);
        --turquoise-900: oklch(33% .055 205);
        --turquoise-950: oklch(24% .04 205);
    }
}

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

html {
    min-width: 320px;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
    min-width: 320px;
    height: auto;
    overflow-x: clip;
    background: var(--paper);
    color: var(--ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.menu-open {
    position: fixed;
    right: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
}

#page {
    min-height: 100vh;
    overflow: clip;
}

img,
svg {
    display: block;
}

img {
    max-width: 100%;
}

::selection {
    background: var(--brand);
    color: var(--ink);
}

:focus-visible {
    outline: 3px solid var(--brand-bright) !important;
    outline-offset: 4px;
}

a,
a:visited {
    color: inherit;
}

a:hover,
a:focus {
    color: var(--brand-deep);
}

.container {
    width: min(calc(100% - 48px), var(--container));
    max-width: var(--container);
    margin-right: auto;
    margin-left: auto;
    padding-right: 0;
    padding-left: 0;
}

.row {
    margin-right: -9px;
    margin-left: -9px;
}

.row > [class*="col-"] {
    padding-right: 9px;
    padding-left: 9px;
}

.offspace-15 {
    margin-top: 24px;
}

.offspace-30 {
    margin-top: 38px;
}

.offspace-45 {
    margin-top: 56px;
}

.offspace-70 {
    margin-top: 84px;
}

/* Shared controls */

.button,
.btn.btn-default,
.submit-btn,
.read-more-btn,
.g-recaptcha-invisible {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 13px 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--brand);
    color: var(--white);
    box-shadow: none;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .01em;
    line-height: 1;
    text-decoration: none;
    text-shadow: none;
    text-transform: none;
    transition: color .25s ease, background .25s ease, border-color .25s ease,
        transform .25s var(--ease), box-shadow .25s ease;
}

.button:hover,
.button:focus,
.btn.btn-default:hover,
.btn.btn-default:focus,
.submit-btn:hover,
.submit-btn:focus,
.read-more-btn:hover,
.read-more-btn:focus,
.g-recaptcha-invisible:hover,
.g-recaptcha-invisible:focus {
    border-color: transparent;
    background: var(--brand-bright);
    color: var(--white);
    box-shadow: 0 16px 44px rgb(var(--brand-rgb) / .22);
    text-decoration: none;
    transform: translateY(-2px);
}

.button--dark {
    background: var(--ink);
    color: var(--white);
}

.button--dark:hover,
.button--dark:focus {
    background: var(--brand-deep);
    color: var(--white);
}

.button--white {
    background: var(--white);
    color: var(--ink);
}

.button--white:hover,
.button--white:focus {
    background: var(--brand-soft);
    color: var(--ink);
}

.icon-button {
    width: 48px;
    height: 48px;
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, transform .2s var(--ease);
}

.icon-button:hover,
.icon-button:focus {
    border-color: var(--brand-deep);
    background: var(--brand-soft);
    transform: translateY(-2px);
}

.icon-button svg,
.back-to-top svg {
    width: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

/* Header and navigation */

.site-header {
    position: sticky;
    z-index: 1000;
    top: 0;
    border-bottom: 1px solid transparent;
    background: rgb(var(--paper-rgb) / .9);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: border-color .25s ease, box-shadow .25s ease;
}

.site-header.is-scrolled {
    border-color: var(--line);
    box-shadow: 0 10px 34px rgb(var(--ink-rgb) / .06);
}

.site-header__inner {
    min-height: var(--header-height);
    display: grid;
    grid-template-columns: 188px minmax(0, 1fr);
    align-items: center;
    gap: 32px;
}

.site-header__inner::before,
.site-header__inner::after,
.site-footer__grid::before,
.site-footer__grid::after,
.site-footer__bottom::before,
.site-footer__bottom::after,
.gallery-front .row.offspace-30::before,
.gallery-front .row.offspace-30::after,
.person > .row::before,
.person > .row::after {
    display: none;
    content: none;
}

.brand {
    width: 164px;
    display: block;
}

.brand img {
    width: 100%;
    height: auto;
}

.desktop-nav {
    min-width: 0;
}

/* Hide the retired CTA in pages still held in the MODX cache. */
.header-contact {
    display: none;
}

.site-nav-list,
.mobile-nav-list,
.footer-nav-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(16px, 2vw, 32px);
}

.site-nav-list > li {
    padding: 0;
}

.site-nav-list a {
    position: relative;
    display: block;
    padding: 12px 0;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0;
    text-decoration: none;
    text-transform: none;
    white-space: nowrap;
}

.site-nav-list a::after {
    position: absolute;
    right: 0;
    bottom: 5px;
    left: 0;
    height: 2px;
    background: var(--brand);
    content: "";
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .25s var(--ease);
}

.site-nav-list a:hover::after,
.site-nav-list a:focus::after,
.site-nav-list a.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.site-nav-list a.active {
    color: var(--ink);
}

.site-nav-list a span {
    display: inline;
    padding: 0;
    background: transparent;
    transform: none;
}

.menu-toggle {
    width: 48px;
    height: 48px;
    display: none;
    place-items: center;
    padding: 13px 11px;
    border: 0;
    border-radius: 50%;
    background: var(--ink);
    color: var(--white);
    cursor: pointer;
}

.menu-toggle span {
    width: 21px;
    height: 1.5px;
    display: block;
    background: currentColor;
}

.menu-toggle span + span {
    margin-top: 5px;
}

.mobile-menu {
    position: fixed;
    z-index: 1300;
    inset: 0;
    display: grid;
    grid-template-columns: 1fr min(440px, 90vw);
    overflow: hidden;
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
    transition: visibility .35s, opacity .35s ease;
}

.mobile-menu.is-open {
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
}

.mobile-menu__backdrop {
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgb(var(--ink-rgb) / .58);
    cursor: pointer;
}

.mobile-menu__panel {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 28px clamp(24px, 5vw, 44px) 34px;
    background: var(--paper);
    transform: translateX(100%);
    transition: transform .4s var(--ease);
}

.mobile-menu.is-open .mobile-menu__panel {
    transform: translateX(0);
}

.mobile-menu__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 34px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.mobile-nav-list li {
    padding: 0;
}

.mobile-nav-list a {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-size: clamp(20px, 5vw, 27px);
    font-weight: 650;
    letter-spacing: -.025em;
    text-decoration: none;
}

.mobile-nav-list a::after {
    color: var(--brand-deep);
    content: "↗";
    font-size: 18px;
}

.mobile-nav-list a span {
    color: inherit;
    font: inherit;
}

.mobile-menu__contact {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
    padding-top: 28px;
}

.mobile-menu__contact > a {
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

/* Bootstrap hero carousel */

#banner-carousel {
    width: min(calc(100% - 48px), var(--container));
    margin: 34px auto 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--turquoise-900);
    box-shadow: var(--shadow);
}

#banner-carousel .carousel-inner,
#banner-carousel .item {
    min-height: clamp(420px, 53vw, 610px);
}

#banner-carousel .carousel-inner > .next,
#banner-carousel .carousel-inner > .prev {
    position: absolute;
    top: 0;
    width: 100%;
}

#banner-carousel .item::after {
    position: absolute;
    z-index: 1;
    inset: 0;
    background: linear-gradient(90deg, rgb(var(--ink-rgb) / .74), rgb(var(--ink-rgb) / .16) 70%),
        linear-gradient(0deg, rgb(var(--ink-rgb) / .48), transparent 58%);
    content: "";
    pointer-events: none;
}

#banner-carousel .item > img {
    width: 100%;
    height: clamp(420px, 53vw, 610px) !important;
    object-fit: cover;
    object-position: center;
    transform: scale(1.01);
    transition: transform 7s linear;
}

#banner-carousel .item.active > img {
    transform: scale(1.07);
}

#banner-carousel .carousel-caption {
    z-index: 2;
    top: 50%;
    bottom: auto;
    left: clamp(34px, 7vw, 92px);
    width: min(760px, calc(100% - 140px));
    max-width: 760px;
    padding: 0;
    color: var(--white);
    text-align: left;
    text-shadow: none;
    transform: translateY(-50%);
}

#banner-carousel .carousel-caption h1,
#banner-carousel .carousel-caption h2 {
    margin: 0;
    color: var(--white) !important;
    filter: none !important;
    font-family: inherit;
    font-size: clamp(44px, 6.5vw, 84px);
    font-weight: 670;
    letter-spacing: -.055em;
    line-height: .98;
    text-shadow: none !important;
    text-transform: none;
}

#banner-carousel .carousel-caption p {
    max-width: 620px;
    margin-top: 24px;
    padding-right: 0 !important;
    padding-left: 0 !important;
    color: rgb(255 255 255 / .78) !important;
    filter: none !important;
    font-size: clamp(16px, 1.6vw, 20px);
    line-height: 1.55;
    text-shadow: none !important;
}

#banner-carousel .carousel-control {
    top: 50%;
    bottom: auto;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border: 1px solid rgb(255 255 255 / .45);
    border-radius: 50%;
    background: rgb(255 255 255 / .12);
    color: var(--white);
    opacity: 1;
    text-shadow: none;
    transform: translateY(-50%);
    transition: background .2s ease, transform .2s var(--ease);
}

#banner-carousel .carousel-control:hover,
#banner-carousel .carousel-control:focus {
    background: rgb(255 255 255 / .25);
    transform: translateY(-50%) scale(1.04);
}

#banner-carousel .carousel-control.left {
    left: 22px;
}

#banner-carousel .carousel-control.right {
    right: 22px;
}

#banner-carousel .carousel-control img {
    width: 20px;
    height: auto;
}

#banner-carousel .carousel-control svg {
    width: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

#banner-carousel .carousel-indicators {
    z-index: 3;
    bottom: 22px;
}

#banner-carousel .carousel-indicators li {
    width: 10px;
    height: 10px;
    margin: 0 4px;
    border: 0;
    background: rgb(255 255 255 / .42);
    transition: width .25s var(--ease), background .25s ease;
}

#banner-carousel .carousel-indicators li.active {
    width: 34px;
    height: 10px;
    margin: 0 4px;
    border-radius: 999px;
    background: var(--brand-bright);
}

/* Page titles and rich content */

#content {
    padding-bottom: clamp(40px, 6vw, 84px);
}

.image-head-wrapper {
    width: min(calc(100% - 48px), var(--container));
    height: clamp(290px, 39vw, 450px);
    margin: 34px auto 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background-image: var(--page-title-image, url("/assets/img/inner-banner.png"));
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    box-shadow: var(--shadow-sm);
}

.image-head-wrapper::before {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgb(var(--ink-rgb) / .78), rgb(var(--ink-rgb) / .12) 78%),
        linear-gradient(0deg, rgb(var(--ink-rgb) / .35), transparent);
    content: "";
}

.inner-wrapper {
    z-index: 1;
    top: 50%;
    left: clamp(32px, 7vw, 86px);
    width: min(780px, calc(100% - 80px));
    color: var(--white);
    text-align: left;
    text-transform: none;
    transform: translateY(-50%);
}

.inner-wrapper h1 {
    margin: 0;
    color: var(--white);
    font-family: inherit;
    font-size: clamp(42px, 6vw, 78px);
    font-weight: 670;
    letter-spacing: -.055em;
    line-height: .98;
}

#content > .container > h1 {
    max-width: 980px;
    margin: clamp(58px, 8vw, 100px) 0 0;
    font-size: clamp(44px, 6vw, 76px);
    font-weight: 670;
    letter-spacing: -.055em;
    line-height: 1;
}

#content h2,
.content-block h2,
.gallery-block h2,
.news-block h2 {
    margin: 0 0 34px;
    color: var(--ink);
    font-size: clamp(36px, 4.7vw, 60px);
    font-weight: 650;
    letter-spacing: -.045em;
    line-height: 1.05;
}

#content h3 {
    margin: 38px 0 20px;
    color: var(--ink);
    font-size: clamp(27px, 3vw, 38px);
    font-weight: 650;
    letter-spacing: -.035em;
    line-height: 1.15;
}

#content h4 {
    color: var(--ink);
    font-size: 22px;
    line-height: 1.2;
}

#content p,
#content li {
    color: var(--ink-soft);
    font-size: 16px;
    line-height: 1.7;
}

#content p + p {
    margin-top: 1em;
}

#content .lead {
    max-width: 860px;
    color: var(--ink-soft);
    font-size: clamp(19px, 2vw, 24px);
    font-weight: 430;
    line-height: 1.6;
}

#content ul:not(.pagination),
#content ol:not(.carousel-indicators) {
    margin: 20px 0;
    padding-left: 1.35em;
}

#content li + li {
    margin-top: 8px;
}

#content blockquote {
    margin: 32px 0;
    padding: 8px 0 8px 28px;
    border: 0;
    border-left: 3px solid var(--brand);
    color: var(--ink);
    font-size: clamp(20px, 2.4vw, 28px);
    line-height: 1.45;
}

#content table {
    width: 100%;
    margin: 30px 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--radius-sm);
    background: var(--white);
}

#content th,
#content td {
    padding: 14px 16px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

#content tr:last-child > * {
    border-bottom: 0;
}

#content tr > *:last-child {
    border-right: 0;
}

#content iframe[src*="dzen.ru/embed/"] {
    width: min(100%, 480px);
    height: auto;
    aspect-ratio: 16 / 9;
    border: 0;
}

.content-block,
.service-block,
.gallery-block,
.resort-overview-block,
.news-block,
.news-block-slider,
.about-block {
    padding: clamp(74px, 9vw, 120px) 0 0;
}

/* Palette bridge for legacy blocks that can still be stored in MODX Resources. */

.contacts-btn,
.offer-details .btn.btn-default {
    background: var(--brand);
}

#content .offer-details > h4 {
    color: rgb(255 255 255 / .82);
}

.overlay p a:hover,
.overlay p a:focus,
.user-info > a {
    color: var(--brand-deep);
}

.product-desc-side h3::before {
    background: var(--brand);
}

.links > a:hover,
.links > a:focus {
    border-color: var(--brand);
    background: var(--brand);
    color: var(--white);
}

.about-right li::before,
.list-with-arrows li::before {
    color: var(--brand-deep);
}

.contact-block > h3 > span,
.feedback-form > h3 > span {
    color: var(--brand-deep);
}

.blog-list h4,
.blog-list1 h4 {
    border-bottom-color: var(--brand);
}

.main-page-counter .counter {
    color: var(--brand-deep);
}

/* News, project and exhibit cards */

.view-set-block {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(280px, .92fr) minmax(0, 1.08fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: 0 1px 0 rgb(255 255 255 / .65);
    transition: border-color .3s ease, box-shadow .3s ease, transform .3s var(--ease);
}

.view-set-block:hover {
    border-color: rgb(var(--brand-rgb) / .45);
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

/* The structural branch also covers detail templates still held in the MODX cache. */
.view-set-block:where(.view-set-block--detail, :has(> .side-in-image)) {
    grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
    align-items: start;
    gap: clamp(18px, 3vw, 28px);
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.view-set-block:where(.view-set-block--detail, :has(> .side-in-image)):hover {
    border-color: transparent;
    box-shadow: none;
    transform: none;
}

.view-set-block::before,
.view-set-block::after {
    display: none;
}

.view-set-block > [class*="col-"] {
    width: auto;
    min-width: 0;
    float: none;
    padding: 0;
}

.news-image {
    height: 100%;
    min-height: 330px;
    margin: 0;
    overflow: hidden;
    background: var(--paper-deep);
}

.news-image img {
    width: 100%;
    height: 100%;
    min-height: 330px;
    object-fit: cover;
    transition: transform .55s var(--ease);
}

.view-set-block:hover .news-image img {
    transform: scale(1.035);
}

.view-set-block:where(.view-set-block--detail, :has(> .side-in-image)) .news-image {
    min-height: 0;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.view-set-block:where(.view-set-block--detail, :has(> .side-in-image)) .news-image img {
    height: 100%;
    min-height: 0;
    object-fit: contain;
}

.view-set-block:where(.view-set-block--detail, :has(> .side-in-image)):hover .news-image img {
    transform: none;
}

.news-details {
    min-height: 330px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(30px, 5vw, 58px);
}

.view-set-block:where(.view-set-block--detail, :has(> .side-in-image)) .news-details {
    width: 100%;
    min-height: 0;
    justify-content: flex-start;
    padding: clamp(28px, 4vw, 48px);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--white);
}

#content .view-set-block:where(.view-set-block--detail, :has(> .side-in-image)) .news-details h2 {
    margin: clamp(24px, 3vw, 36px) 0 16px;
    font-size: clamp(28px, 3vw, 38px);
    letter-spacing: -.03em;
    line-height: 1.12;
}

#content .view-set-block:where(.view-set-block--detail, :has(> .side-in-image)) .news-details p {
    font-size: 17px;
    line-height: 1.65;
}

.news-details > h4 {
    margin: 0 0 14px;
    color: var(--ink);
    font-size: clamp(25px, 3vw, 38px);
    font-weight: 650;
    letter-spacing: -.035em;
    line-height: 1.1;
}

.news-details > h4 a {
    color: inherit;
    text-decoration: none;
}

.news-details > h4 a:hover,
.news-details > h4 a:focus {
    color: var(--brand-deep);
}

.news-details > h5 {
    order: -1;
    margin: 0 0 20px;
    color: var(--brand-deep);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .12em;
    line-height: 1.3;
    text-transform: uppercase;
}

.news-details > p {
    margin: 0 0 20px;
    color: var(--ink-soft);
    font-size: 16px;
    letter-spacing: 0;
    line-height: 1.65;
}

.news-details > br {
    display: none;
}

.news-details .btn {
    margin-top: auto;
}

.news-details a.btn.btn-default {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--brand);
    color: var(--white);
}

.news-details a.btn.btn-default:hover,
.news-details a.btn.btn-default:focus {
    border-color: transparent;
    background: var(--brand-bright);
    color: var(--white);
}

/* Document cards on the main page */

.gallery-front .row.offspace-30 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-right: 0;
    margin-left: 0;
}

.gallery-front .row.offspace-30 > [class*="col-"] {
    width: auto;
    float: none;
    padding: 0;
}

.gallery-front .gallery-image {
    max-width: none;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: 0 1px 0 rgb(255 255 255 / .65);
    transition: box-shadow .3s ease, transform .3s var(--ease);
}

.gallery-front .gallery-image:hover {
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

.gallery-front .gallery-image > img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.gallery-front .gallery-image .overlay {
    border-radius: inherit;
    background: rgb(var(--ink-rgb) / .68);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.gallery-front .text-under-gallery-image {
    min-height: 82px;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 18px 20px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
}

.gallery-front .overlay p {
    right: 20px;
    bottom: 28px;
    left: 20px;
    font-size: 13px;
    letter-spacing: 0;
    text-transform: none;
}

/* Masonry and lightbox galleries */

.gal-grid {
    margin: -8px;
    background: transparent;
}

.gal-grid-sizer,
.gal-grid-item {
    width: 33.3333%;
}

.gal-grid-item.percent25 {
    width: 25%;
}

.gal-grid-item {
    padding: 8px;
}

.gal-grid-item > a {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 18px;
    background: var(--paper-deep);
}

.gal-grid-item img {
    width: 100%;
    transition: opacity .3s ease, transform .5s var(--ease);
}

.hover-effect .gal-grid-item:hover img {
    animation: none;
    opacity: .86;
    transform: scale(1.025);
}

.gallery-block:not(.gallery-front) {
    padding-bottom: 20px;
}

/* Feedback carousel */

#feedback-carousel {
    margin-top: 18px;
    padding-bottom: 58px;
}

#feedback-carousel .carousel-inner {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}

.feedback-box {
    min-height: 260px;
    display: grid;
    place-items: center;
    padding: clamp(40px, 7vw, 82px);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    background: var(--turquoise-900);
    color: var(--white);
}

.feedback-box > p {
    max-width: 900px;
    margin: 0;
    padding: 0;
    color: var(--white);
    font-size: clamp(22px, 3vw, 36px);
    font-style: normal;
    font-weight: 520;
    letter-spacing: -.02em;
    line-height: 1.4;
    text-align: left;
}

.feedback-box p::before,
.feedback-box p::after {
    display: none;
}

.feedback-view-box {
    margin-top: 0;
    padding: 20px clamp(28px, 7vw, 82px);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    background: var(--brand);
    color: var(--ink);
}

.feedback-view-box .media {
    display: flex;
    align-items: center;
}

.feedback-view-box .media-left {
    flex: 0 0 auto;
    padding-right: 16px;
}

.feedback-view-box .media-body {
    min-width: 0;
}

.feedback-view-box .media-object {
    width: 58px;
    height: 58px;
    min-width: 58px;
    max-width: none;
    flex: 0 0 58px;
    border-radius: 50%;
    object-fit: cover;
}

.feedback-view-box .feedback-title {
    margin: 0;
    color: var(--ink);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0;
}

#feedback-carousel .carousel-indicators {
    bottom: 9px;
}

#feedback-carousel .carousel-indicators li,
#feedback-carousel .carousel-indicators li.active {
    width: 42px;
    height: 8px;
    margin: 0 4px;
    border: 0;
    border-radius: 999px;
}

#feedback-carousel .carousel-indicators li {
    background: var(--line);
}

#feedback-carousel .carousel-indicators li.active {
    background: var(--brand-deep);
}

/* Contacts, people and forms */

#contacts.contact-block,
#map.contact-block,
.feedback-form {
    padding: clamp(28px, 5vw, 54px);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: 0 1px 0 rgb(255 255 255 / .65);
}

#contacts.contact-block > h3,
#map.contact-block > h3,
.feedback-form > h3 {
    margin: 0 0 30px;
    color: var(--ink);
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 650;
    letter-spacing: -.04em;
    line-height: 1.1;
}

#contacts.contact-block > h3 > span,
#map.contact-block > h3 > span,
.feedback-form > h3 > span {
    color: var(--brand-deep);
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    font-weight: 400;
}

#map.contact-block > p {
    margin-bottom: 12px;
    color: var(--ink-soft);
    font-size: 16px;
    letter-spacing: 0;
    line-height: 1.55;
}

#map.contact-block > p i {
    width: 30px;
    color: var(--brand-deep);
}

.person {
    margin-bottom: 18px;
}

.person > .row {
    min-height: 230px;
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    align-items: center;
    margin: 0;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--paper);
}

.person > .row > [class*="col-"] {
    width: auto;
    float: none;
    padding: 0;
}

.person img.person-photo {
    width: 112px;
    height: 112px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    object-fit: cover;
}

.person .contact-block p {
    margin: 0 0 7px;
    color: var(--ink-soft);
    font-size: 14px;
    letter-spacing: 0;
    line-height: 1.45;
}

.person .contact-block p.name {
    color: var(--ink);
    font-size: 17px;
    font-weight: 800;
}

.person .contact-block i {
    width: 22px;
    color: var(--brand-deep);
}

.feedback-form form,
.donate-form form {
    margin-top: 0;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 750;
}

.form-control {
    min-height: 54px;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--paper);
    color: var(--ink);
    box-shadow: none;
    font-size: 15px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.form-control:focus {
    border-color: var(--brand-deep);
    background: var(--white);
    box-shadow: 0 0 0 4px rgb(var(--brand-rgb) / .15);
}

.feedback-form form textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.feedback-form .text-muted {
    color: var(--ink-faint);
    font-size: 11px;
    line-height: 1.45;
}

.form-error-message,
.error,
.required {
    color: #a6423a;
}

.input-with-error {
    border-color: #a6423a;
}

.alert {
    margin-top: 18px;
    border: 0;
    border-radius: var(--radius-sm);
}

#ya-map-main,
#ya-map-museum {
    overflow: hidden;
    margin-top: 28px;
    border-radius: 18px;
    filter: saturate(.8);
}

/* Pagination */

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 46px 0 0;
}

#content .pagination > li {
    margin-top: 0;
    padding: 0;
}

.pagination > li > a,
.pagination > li > span,
.pagination > li:first-child > a,
.pagination > li:first-child > span,
.pagination > li:last-child > a,
.pagination > li:last-child > span {
    min-width: 44px;
    min-height: 44px;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    font-weight: 750;
}

.pagination > li > a:hover,
.pagination > li > a:focus {
    border-color: var(--brand-deep);
    background: var(--brand-soft);
    color: var(--ink);
}

.pagination > li.active > a,
.pagination > li.active > a:focus,
.pagination > li.active > a:hover,
.pagination > li.active > span,
.pagination > li.active > span:focus,
.pagination > li.active > span:hover {
    border-color: var(--brand);
    background: var(--brand);
    color: var(--white);
}

/* Footer */

.site-footer {
    margin-top: 0;
    padding: 70px 0 26px;
    background: var(--turquoise-950);
    color: var(--white);
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.25fr .7fr .7fr;
    gap: clamp(44px, 9vw, 120px);
}

.site-footer__brand img {
    width: 190px;
    height: auto;
}

.site-footer__brand > p {
    max-width: 410px;
    margin: 24px 0 0;
    color: rgb(255 255 255 / .52);
    font-size: 13px;
    letter-spacing: 0;
    line-height: 1.65;
}

.site-footer__brand > .site-footer__requisites {
    margin-top: 12px;
    color: rgb(255 255 255 / .34);
    font-size: 11px;
}

.site-footer__nav,
.site-footer__contacts {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.site-footer__nav > p,
.site-footer__contacts > p {
    margin: 0 0 12px;
    color: rgb(255 255 255 / .4);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.footer-nav-list li {
    padding: 0;
}

.footer-nav-list li + li {
    margin-top: 10px;
}

.site-footer__nav a,
.site-footer__contacts > a {
    min-height: 30px;
    color: rgb(255 255 255 / .78);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.45;
    text-decoration: none;
}

.site-footer__nav a:hover,
.site-footer__nav a:focus,
.site-footer__contacts > a:hover,
.site-footer__contacts > a:focus {
    color: var(--brand-bright);
}

.social-links {
    display: flex;
    gap: 9px;
    margin-top: 14px;
}

.social-links a {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-light);
    border-radius: 50%;
    color: inherit;
    font-size: 11px;
    font-weight: 900;
    text-decoration: none;
    transition: border-color .2s ease, background .2s ease, transform .2s var(--ease);
}

.social-links a:hover,
.social-links a:focus {
    border-color: var(--brand);
    background: rgb(var(--brand-rgb) / .12);
    color: inherit;
    transform: translateY(-2px);
}

.site-footer__bottom {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-top: 64px;
    padding-top: 22px;
    border-top: 1px solid var(--line-light);
    color: rgb(255 255 255 / .35);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
}

.back-to-top {
    position: fixed;
    z-index: 900;
    right: 22px;
    bottom: 22px;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--brand);
    color: var(--ink);
    box-shadow: 0 12px 30px rgb(var(--ink-rgb) / .2);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity .25s ease, visibility .25s, transform .25s var(--ease),
        background .2s ease;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus {
    background: var(--brand-bright);
    transform: translateY(-3px);
}

/* Progressive reveal: content stays visible if JS or IntersectionObserver is unavailable. */

.redesign-animations [data-redesign-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .65s ease, transform .65s var(--ease);
}

.redesign-animations [data-redesign-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1120px) {
    .site-header__inner {
        grid-template-columns: 166px minmax(0, 1fr);
        gap: 20px;
    }

    .site-nav-list {
        gap: 16px;
    }

    .site-nav-list a {
        font-size: 12px;
    }

    .gallery-front .row.offspace-30 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1239px) {
    .site-header__inner {
        grid-template-columns: 1fr auto;
    }

    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }
}

@media (max-width: 960px) {
    :root {
        --header-height: 76px;
    }

    .site-header__inner {
        grid-template-columns: 1fr auto;
    }

    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .view-set-block {
        grid-template-columns: minmax(260px, .82fr) minmax(0, 1.18fr);
    }

    .gallery-front .row.offspace-30 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gal-grid-sizer,
    .gal-grid-item,
    .gal-grid-item.percent25 {
        width: 50%;
    }
}

@media (max-width: 767px) {
    .container {
        width: min(calc(100% - 32px), var(--container));
    }

    .site-header__inner {
        grid-template-columns: 1fr auto;
    }

    .brand {
        width: 142px;
    }

    .mobile-menu {
        grid-template-columns: 1fr;
    }

    .mobile-menu__backdrop {
        display: none;
    }

    .mobile-menu__panel {
        width: 100%;
    }

    #banner-carousel {
        width: min(calc(100% - 32px), var(--container));
        margin-top: 22px;
        border-radius: 26px;
    }

    #banner-carousel .carousel-inner,
    #banner-carousel .item,
    #banner-carousel .item > img {
        min-height: 430px;
        height: 430px !important;
    }

    #banner-carousel .carousel-caption {
        left: 28px;
        width: calc(100% - 56px);
    }

    #banner-carousel .carousel-caption h1,
    #banner-carousel .carousel-caption h2 {
        font-size: clamp(38px, 11vw, 60px);
    }

    #banner-carousel .carousel-control {
        top: auto;
        bottom: 20px;
        width: 46px;
        height: 46px;
        transform: none;
    }

    #banner-carousel .carousel-control:hover,
    #banner-carousel .carousel-control:focus {
        transform: scale(1.04);
    }

    #banner-carousel .carousel-control.left {
        left: 18px;
    }

    #banner-carousel .carousel-control.right {
        right: 18px;
    }

    .image-head-wrapper {
        width: min(calc(100% - 32px), var(--container));
        height: 300px;
        margin-top: 22px;
        border-radius: 26px;
    }

    .inner-wrapper {
        left: 28px;
        width: calc(100% - 56px);
    }

    .inner-wrapper h1 {
        font-size: clamp(38px, 12vw, 58px);
        overflow-wrap: anywhere;
        hyphens: auto;
        text-wrap: balance;
    }

    #content > .container > h1 {
        margin-top: 54px;
        font-size: clamp(38px, 11vw, 58px);
    }

    .view-set-block {
        grid-template-columns: 1fr;
    }

    .news-image,
    .news-image img {
        min-height: 260px;
        max-height: 380px;
    }

    .news-details {
        min-height: 300px;
        padding: 30px 26px;
    }

    .gallery-front .row.offspace-30 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feedback-box {
        min-height: 240px;
        padding: 38px 28px;
    }

    .feedback-view-box {
        padding: 18px 28px;
    }

    #contacts.contact-block,
    #map.contact-block,
    .feedback-form {
        padding: 28px 22px;
    }

    .person {
        width: 100%;
        float: none;
    }

    .person > .row {
        grid-template-columns: 100px minmax(0, 1fr);
        padding: 20px;
    }

    .person img.person-photo {
        width: 82px;
        height: 82px;
    }

    #content table {
        width: 100%;
        max-width: 100%;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
    }

    .site-footer__brand {
        grid-column: 1 / -1;
    }

    .site-footer__bottom {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .gallery-front .row.offspace-30 {
        grid-template-columns: 1fr;
    }

    .gal-grid-sizer,
    .gal-grid-item,
    .gal-grid-item.percent25 {
        width: 100%;
    }

    .person > .row {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .person img.person-photo {
        width: 96px;
        height: 96px;
    }

    #content img[align="left"],
    #content img[align="right"] {
        float: none;
        margin: 0 auto 20px;
    }

    .site-footer__grid {
        grid-template-columns: 1fr;
    }

    .site-footer__brand {
        grid-column: auto;
    }

    .back-to-top {
        right: 14px;
        bottom: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }

    .redesign-animations [data-redesign-reveal] {
        opacity: 1;
        transform: none;
    }
}
