/* =========================================
   Шрифт и базовые настройки
   ========================================= */

@font-face {
    font-family: "Golos Text";
    src: url("/assets/fonts/golos-text/golos-text-vf.woff2") format("woff2");
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

html {
    min-height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: "Golos Text", Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: #303030;
    background: #fff;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

a {
    color: #164b83;
    text-decoration: none;
    text-shadow: none;
    transition: color 0.2s ease, border-color 0.2s ease;
}

a:hover {
    color: #10385f;
    text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid #164b83;
    outline-offset: 4px;
}

p {
    font-family: inherit;
    font-size: inherit;
    line-height: 1.6;
    color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: inherit;
    line-height: 1.35;
    text-shadow: none;
}

h1 {
    margin: 10px 0;
    color: #164b83;
    font-size: 22px;
    font-weight: 500;
}

h2 {
    margin-bottom: 10px;
    color: #303030;
    font-size: 20px;
    font-weight: 500;
}

h3 {
    margin: 5px 0;
    color: #303030;
    font-size: 18px;
    font-weight: 500;
}

h5 {
    margin: 5px 0;
    color: #333f45;
    font-size: 17px;
}

ul,
ol {
    margin: 0 0 10px 25px;
    padding: 0;
}

li {
    line-height: 1.6;
}

img {
    width: auto;
    height: auto;
    max-width: 100%;
    vertical-align: middle;
    border: 0;
}

.align-left { text-align: left; }
.align-center { text-align: center; }
.align-right { text-align: right; }

.row-fluid p {
    line-height: 1.6;
    text-shadow: none;
}

.p-pad {
    padding-bottom: 10px;
}

/* =========================================
   Кнопки
   ========================================= */

.btn {
    display: inline-block;
    padding: 10px 16px;
    margin-bottom: 0;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #fff;
    background: #164b83;
    box-shadow: none;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    text-shadow: none;
    vertical-align: middle;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
    color: #fff;
    background: #10385f;
    box-shadow: none;
    text-decoration: none;
}

.btn-large {
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 18px;
}

.btn-default {
    color: #303030;
    background: #f2f3f4;
    border-color: #c7cbd0;
}

.btn-default:hover,
.btn-default:focus-visible {
    color: #303030;
    background: #e4e7ea;
}

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* =========================================
   Белая шапка, логотип и меню
   ========================================= */

.navbar.navbar-fixed-top {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
    margin-bottom: 0;
}

.navbar .navbar-inner {
    min-height: 82px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid #e4e8eb;
    border-radius: 0;
    background: #fff;
    box-shadow: 0 2px 10px rgba(38, 52, 61, 0.06);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 90%;
    max-width: 1170px;
    min-height: 82px;
    margin: 0 auto;
}

/* Убираем служебные элементы старой сетки внутри шапки. */

.navbar .container::before,
.navbar .container::after {
    display: none;
    content: none;
}

.navbar .navbar-brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    max-width: 200px;
    padding: 6px 0;
    color: inherit;
    background: transparent;
    text-decoration: none;
}

.navbar .navbar-brand:hover,
.navbar .navbar-brand:focus-visible {
    text-decoration: none;
}

.navbar .navbar-brand img {
    display: block;
    width: auto;
    height: auto;
    max-width: 170px;
    max-height: 68px;
    object-fit: contain;
}

.navbar #collapse {
    display: block;
    flex: 1 1 auto;
    width: auto;
    height: auto;
    padding: 0;
    overflow: visible;
}

.navbar #collapse[hidden] {
    display: none !important;
}

.navbar #collapse .nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    float: none;
    margin: 0;
    padding: 0;
    list-style: none;
}

.navbar #collapse .nav > li {
    float: none;
    margin: 0;
    padding: 0;
}

.navbar #collapse .nav > li > a {
    display: block;
    float: none;
    min-height: 44px;
    padding: 10px 13px;
    border-bottom: 2px solid transparent;
    color: #164b83;
    background: transparent;
    font-size: 16px;
    line-height: 24px;
    text-decoration: none;
    text-shadow: none;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.navbar #collapse .nav > li.active > a,
.navbar #collapse .nav > li > a:hover,
.navbar #collapse .nav > li > a:focus-visible {
    border-bottom-color: #1fafc5;
    color: #164b83;
    background: transparent;
    text-decoration: none;
}

.navbar .btn-navbar {
    display: none;
    align-items: center;
    justify-content: center;
    float: none;
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    margin: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #164b83;
    background: transparent;
    box-shadow: none;
    text-shadow: none;
    cursor: pointer;
}

.navbar .btn-navbar:hover,
.navbar .btn-navbar:focus-visible {
    border-color: #e4e8eb;
    color: #164b83;
    background: #f2f5f6;
    box-shadow: none;
}

.navbar .btn-navbar:focus-visible {
    outline: 2px solid #164b83;
    outline-offset: 2px;
}

.navbar .menu-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 24px;
    height: 24px;
}

.navbar .menu-icon__line {
    display: block;
    width: 24px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.navbar .btn-navbar[aria-expanded="true"] .menu-icon__line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.navbar .btn-navbar[aria-expanded="true"] .menu-icon__line:nth-child(2) {
    opacity: 0;
}

.navbar .btn-navbar[aria-expanded="true"] .menu-icon__line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =========================================
   Первый блок и старый hero-блок
   ========================================= */

.row1 {
    background: #f2f5f6;
}

.hero-unit {
    padding-top: 100px;
    color: #26343d;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
}

.hero-unit h1 {
    max-width: 1000px;
    margin: 0 0 24px;
    color: #164b83;
    font-size: clamp(28px, 2.5vw, 40px);
    font-weight: 400;
    line-height: 1.2;
}

.hero-unit h2 {
    padding-bottom: 20px;
    color: #26343d;
    font-family: inherit;
    font-size: 22px;
    font-weight: 400;
    line-height: 1.4;
}

.brand {
    display: block;
    float: left;
    width: 100%;
    padding-top: 20px;
    padding-bottom: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid #d6dfe3;
    text-shadow: none;
}

.header-image {
    display: block;
    padding: 16px;
    margin-top: 30px;
    border: 1px solid #d7dbe0;
    border-radius: 4px;
    background: #fff;
    box-shadow: none;
    line-height: 1.5;
}

.header-image img {
    display: block;
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
}

/* =========================================
   Основные блоки и сетка
   ========================================= */

.wrap {
    width: 100%;
    overflow: hidden;
}

.row3,
.row4 {
    overflow: hidden;
    background: #f7f3de;
}

.bdr-bottom {
    border-bottom: 1px solid #d8d6c8;
}

.brd-tlr {
    width: 240px;
    max-width: 100%;
    margin-bottom: -1px;
    border-top: 1px solid #d8d6c8;
    border-right: 1px solid #d8d6c8;
    border-bottom: 1px solid #f7f3de;
    border-radius: 0 4px 0 0;
}

.thumbnail {
    display: block;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    box-shadow: none;
    line-height: 1.5;
}

.thumbnail > img {
    display: block;
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
}

.fl-l { float: left; }
.thumb25 { width: 30%; }

.thumb75,
.thumb75-2 {
    width: 70%;
}

.top { padding-top: 60px; }
.mar-top60 { margin-top: 60px; }
.mar-bot30 { margin-bottom: 30px; }
.pad-bot30 { padding-bottom: 30px; }
.pad-top { padding-top: 20px; }
.pad-right { padding-right: 30px; }
.pad-left { padding-left: 30px; }
.mar-top { margin-top: 30px; }
.mar { margin: 15px; }
.pad-left60 { padding-left: 60px; }
.pad { padding: 15px; }
.pad-top-50 { padding-top: 50px; }

.top-bottom,
.spacing-top-bottom {
    padding-top: 60px;
    padding-bottom: 60px;
}

.container {
    width: 80%;
    max-width: 1170px;
    margin: 0 auto;
}

.container .cols {
    float: left;
    padding: 1px 0;
}

.container .cols.col-1 { width: 8.333333333333%; }
.container .cols.col-2 { width: 16.666666666667%; }
.container .cols.col-3 { width: 25%; }
.container .cols.col-4 { width: 33.333333333333%; }
.container .cols.col-5 { width: 41.666666666667%; }
.container .cols.col-6 { width: 50%; }
.container .cols.col-7 { width: 58.333333333333%; }
.container .cols.col-8 { width: 66.666666666667%; }
.container .cols.col-9 { width: 75%; }
.container .cols.col-10 { width: 83.333333333333%; }
.container .cols.col-11 { width: 91.666666666667%; }
.container .cols.col-12 { width: 100%; }

.container::before,
.container::after,
.row::before,
.row::after,
.clear::before,
.clear::after {
    display: table;
    content: "";
}

.container::after,
.row::after,
.clear::after {
    clear: both;
}

/* =========================================
   Футер: тот же синий, что под картинами
   ========================================= */

.footer.wrap {
    min-height: 100px;
    padding: 30px 0;
    margin-top: auto;
    color: #e6ebef;
    background: #164b83;
    box-shadow: none;
}

.footer p {
    padding-top: 7px;
    color: #e6ebef;
    font-size: 14px;
    line-height: 1.6;
    text-shadow: none;
}

.footer a {
    color: #e6ebef;
    text-shadow: none;
}

.footer a:hover,
.footer a:focus-visible {
    color: #fff;
    text-decoration: underline;
}

.footer a:focus-visible {
    outline-color: #fff;
}

.footer img { height: 30px; }
.vk { list-style: none; }
.vk > li { float: left; line-height: 35px; }
.vk > li > a { display: block; }

/* =========================================
   Страницы художников и выставок
   ========================================= */

.up {
    padding-top: 90px;
}

.up h1 {
    color: #e9e7cf;
    font-size: 25px;
    font-weight: 500;
    line-height: 1.3;
}

.up p,
.up h4,
.up a {
    color: #e9e7cf;
    font-weight: 400;
}

.up a:hover,
.up a:focus-visible {
    color: #fff;
}

.row5 {
    background-color: #164b83;
}

.exp-image {
    display: block;
    max-width: 700px;
    margin-right: auto;
    margin-left: auto;
}

/* =========================================
   Главная: заголовок
   ========================================= */

.page-home main {
    min-width: 0;
}

.page-home .home-intro {
    padding: 118px 0 26px;
    color: #303030;
    background: #f2f5f6;
}

.page-home .home-intro h1 {
    max-width: 960px;
    margin: 0;
    color: #164b83;
    font-size: clamp(25px, 2.3vw, 36px);
    font-weight: 400;
    line-height: 1.25;
    text-wrap: balance;
}

/* =========================================
   Главная: движущаяся лента
   ========================================= */

.home-ribbon {
    --art-height: 360px;
    --gray-height: 240px;
    --caption-height: 64px;
    --art-gap: 24px;

    width: 100%;
    padding: 0;
    background: #f2f5f6;
}

.home-ribbon__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 4px;
    padding-bottom: 22px;
}

.home-ribbon__toolbar::before,
.home-ribbon__toolbar::after {
    display: none;
    content: none;
}

.home-ribbon__label {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.home-ribbon__controls {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
}

.home-ribbon__control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #d7dfe3;
    border-radius: 4px;
    color: #164b83;
    background: transparent;
    font: inherit;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.home-ribbon__control:hover {
    border-color: #164b83;
    color: #164b83;
    background: #fff;
}

.home-ribbon__control:focus-visible {
    outline: 2px solid #164b83;
    outline-offset: 2px;
}

/*
   Граница фона привязана к высоте картин.
   Подписи полностью находятся на синем фоне.
*/

.home-ribbon__viewport {
    width: 100%;
    height: calc(var(--art-height) + var(--caption-height));
    overflow-x: auto;
    overflow-y: hidden;
    background: linear-gradient(
        to bottom,
        #f2f5f6 0,
        #f2f5f6 var(--gray-height),
        #164b83 var(--gray-height),
        #164b83 100%
    );
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

.home-ribbon__viewport::-webkit-scrollbar {
    display: none;
}

.home-ribbon__viewport:focus-visible {
    outline: 2px solid #164b83;
    outline-offset: -2px;
}

.home-ribbon__track {
    display: flex;
    width: max-content;
    height: 100%;
}

.home-ribbon__group {
    display: flex;
    flex: 0 0 auto;
    align-items: flex-start;
    gap: var(--art-gap);
    height: 100%;
    padding-right: var(--art-gap);
}

.home-ribbon__item {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    height: 100%;
    margin: 0;
    padding: 0;
}

.home-ribbon__item img {
    display: block;
    flex: 0 0 auto;
    width: auto;
    height: var(--art-height);
    max-width: none;
    margin: 0;
    padding: 0;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 6px;
    box-shadow: 0 3px 12px rgba(16, 32, 48, 0.18);
}

/* Подпись остаётся одной строкой. */

.home-ribbon__caption {
    display: block;
    flex: 0 0 var(--caption-height);
    width: max-content;
    min-width: 0;
    max-width: none;
    padding: 9px 8px 4px;
    color: #dce1e6;
    white-space: nowrap;
    text-align: center;
    line-height: 1.4;
}

.home-ribbon__title {
    display: inline;
    color: #dce1e6;
    font-size: 14px;
    font-weight: 700;
}

.home-ribbon__separator {
    display: inline;
    color: #dce1e6;
    font-size: 14px;
}

.home-ribbon__artist {
    display: inline;
    margin: 0;
    color: #dce1e6;
    font-size: 14px;
    font-weight: 400;
}

/* =========================================
   Главная: об организации
   Текст сверху, фото снизу.
   Оба блока на всю ширину контейнера.
   ========================================= */

.page-home .home-about {
    padding: 64px 0 72px;
    color: #f1eee6;
    background: #164b83;
}

.home-about__layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 32px;
}

.home-about__layout::before,
.home-about__layout::after {
    display: none;
    content: none;
}

.home-about__text {
    order: 1;
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    text-align: left;
}

.page-home .home-about h2 {
    margin: 0 0 22px;
    color: #f1eee6;
    font-size: clamp(24px, 2vw, 30px);
    font-weight: 500;
}

.home-about__text p {
    width: 100%;
    max-width: none;
    margin: 0 0 20px;
    color: #f1eee6;
    font-size: 16px;
    line-height: 1.75;
}

.home-about__photo {
    order: 2;
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0;
}

/*
   Без grayscale и других фильтров:
   сохраняем собственный синеватый оттенок файла.
*/

.home-about__photo img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 4px;
    filter: none;
    opacity: 1;
    mix-blend-mode: normal;
}

/* Ссылка «О нас»: меняется только цвет. */

.home-about__link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-height: 44px;
    padding: 0;
    color: #f1eee6;
    font-size: 16px;
    line-height: 20px;
    text-decoration: none;
    vertical-align: middle;
    transition: color 0.2s ease;
}

.home-about__link-text {
    display: block;
    margin: 0;
    padding: 0;
    line-height: 20px;
}

.home-about__link:hover,
.home-about__link:focus-visible {
    color: #1fafc5;
    text-decoration: none;
}

.home-about__link:focus-visible {
    outline-color: #f1eee6;
}

/*
   Треугольник с реальными размерами вместо рамок.
   Небольшое оптическое смещение вниз относительно
   центра строки учитывает рисунок букв Golos Text.
*/

.home-about__arrow {
    position: relative;
    top: 1px;
    display: block;
    flex: 0 0 11px;
    align-self: center;
    width: 11px;
    height: 14px;
    margin: 0;
    padding: 0;
    border: 0;
    background: currentColor;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    transform: none;
}

/* Не рисуем вторую стрелку и не сдвигаем её при наведении. */

.home-about__arrow::before,
.home-about__arrow::after {
    display: none;
    content: none;
}

.home-about__link:hover .home-about__arrow,
.home-about__link:focus-visible .home-about__arrow {
    transform: none;
}

/* =========================================
   Контакты
   ========================================= */

.page-contacts {
    padding-top: 20px;
    padding-bottom: 40px;
    background: #f7f3de;
}

.page-contacts h1 {
    margin-bottom: 30px;
    color: #164b83;
    font-size: 28px;
    text-align: center;
}

.page-contacts p {
    max-width: 600px;
    margin: 0 auto 40px;
    color: #303030;
    line-height: 1.6;
    text-align: center;
}

.contact-form-wrapper {
    max-width: 550px;
    padding: 40px 30px;
    margin: 0 auto;
    border-radius: 4px;
    background: #fff;
    box-shadow: none;
}

.contact-form-wrapper .form-group {
    margin-bottom: 20px;
}

.contact-form-wrapper .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #303030;
    font-size: 16px;
    font-weight: 500;
}

.contact-form-wrapper input[type="text"],
.contact-form-wrapper input[type="email"],
.contact-form-wrapper textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #aeb4bb;
    border-radius: 3px;
    color: #303030;
    background: #fff;
    box-shadow: none;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
}

.contact-form-wrapper input[type="text"]:focus,
.contact-form-wrapper input[type="email"]:focus,
.contact-form-wrapper textarea:focus {
    border-color: #164b83;
    outline: 2px solid #164b83;
    outline-offset: 2px;
    box-shadow: none;
}

.contact-form-wrapper textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form-wrapper .btn {
    margin-top: 10px;
    margin-right: 10px;
}

.contact-form-wrapper .form-consent label {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
}

.contact-form-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 6px;
    vertical-align: middle;
    accent-color: #164b83;
}

.contact-form-wrapper .form-consent .help-block {
    max-width: none;
    margin: 8px 0 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
}

.contact-form-wrapper .form-consent a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.contact-field-error {
    display: block;
    margin-top: 5px;
    color: #b42318;
    font-size: 14px;
    line-height: 1.5;
}

#contact-form [aria-invalid="true"] {
    border-color: #b42318;
    outline-color: #b42318;
}

.contact-honeypot {
    display: none !important;
}

#contact-form button:disabled {
    opacity: 0.65;
    cursor: wait;
}

#forrm form {
    overflow: hidden;
    padding: 30px 30px 6px;
    margin: 0 auto;
}

/* =========================================
   Окно результата отправки
   ========================================= */

#contact-result {
    width: calc(100% - 32px);
    max-width: 460px;
    max-height: 85vh;
    overflow: auto;
    padding: 28px;
    margin: auto;
    border: 1px solid #d7dbe0;
    border-radius: 12px;
    color: #303030;
    background: #fff;
    box-shadow: none;
}

#contact-result::backdrop {
    background: rgba(0, 0, 0, 0.55);
}

#contact-result #contact-result-title {
    margin: 0 0 14px;
    font-size: 24px;
    line-height: 1.35;
    text-align: left;
}

#contact-result #contact-result-text {
    max-width: none;
    margin: 0 0 22px;
    color: #303030;
    font-size: 16px;
    line-height: 1.6;
    text-align: left;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

#contact-result[data-status="success"] h2 {
    color: #24723b;
}

#contact-result[data-status="error"] h2 {
    color: #b42318;
}

/* =========================================
   Карточки художников и галерея работ
   ========================================= */

.art {
    text-align: center;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.art p {
    padding-top: 10px;
    color: #303030;
}

.art:hover {
    opacity: 0.8;
}

.artist-gallery {
    width: 100%;
    margin: 0;
    padding: 0 0 40px;
    column-count: 3;
    column-gap: 24px;
    background: transparent;
}

.artist-gallery .painting-card {
    display: inline-block;
    vertical-align: top;
    float: none;
    width: 100%;
    min-width: 0;
    margin: 0 0 28px;
    padding: 0;
    -webkit-column-break-inside: avoid;
    break-inside: avoid;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.artist-gallery .painting-card__link {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 12px;
    color: inherit;
    background: transparent;
    text-decoration: none;
    text-shadow: none;
}

.artist-gallery .painting-card__image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 12px;
    box-shadow: none;
    transition: opacity 0.2s ease;
}

.artist-gallery .painting-card__link:hover {
    color: inherit;
    text-decoration: none;
}

.artist-gallery .painting-card__link:hover .painting-card__image {
    opacity: 0.92;
}

.artist-gallery .painting-card__link:focus-visible {
    outline: 2px solid #164b83;
    outline-offset: 4px;
}

.artist-gallery .painting-card__caption {
    margin: 0;
    padding: 11px 0 0;
    text-align: left;
}

.artist-gallery .painting-card__title {
    margin: 0 0 5px;
    padding: 0;
    color: #303030;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.artist-gallery .painting-card__description {
    margin: 0;
    padding: 0;
    color: #666;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.artist-gallery .painting-card__description:empty {
    display: none;
}

/* =========================================
   Cookie-уведомление
   ========================================= */

#cookie-notice {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 99999;
    padding: 20px;
    border-top: 1px solid #d7dbe0;
    color: #303030;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    visibility: hidden;
    transform: translateY(110%);
    transition: transform 0.3s ease, visibility 0.3s;
}

#cookie-notice[hidden] {
    display: none;
}

#cookie-notice.is-visible {
    visibility: visible;
    transform: translateY(0);
}

#cookie-notice .cookie-notice__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1170px;
    margin: 0 auto;
}

#cookie-notice p {
    flex: 1 1 400px;
    margin: 0;
    color: #303030;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    text-align: left;
}

#cookie-notice a {
    color: #164b83;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#cookie-notice a:hover {
    color: #10385f;
}

#cookie-notice .cookie-notice__btn {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 22px;
    border: 1px solid #164b83;
    border-radius: 4px;
    color: #fff;
    background: #164b83;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#cookie-notice .cookie-notice__btn:hover {
    border-color: #10385f;
    background: #10385f;
}

#cookie-notice a:focus-visible,
#cookie-notice .cookie-notice__btn:focus-visible {
    outline: 2px solid #164b83;
    outline-offset: 4px;
}

/* =========================================
   Просмотр картин — GLightbox
   Базовый CSS библиотеки подключается отдельно.
   ========================================= */

.glightbox-container {
    font-family: "Golos Text", Arial, sans-serif;
}

.glightbox-container .goverlay {
    background: rgba(0, 0, 0, 0.82);
}

.glightbox-container .ginner-container.desc-bottom {
    width: auto;
    height: auto;
    max-width: 100%;
    flex-direction: column;
    align-items: center;
}

.glightbox-container .gslide-image {
    background: transparent;
    box-shadow: none;
}

.glightbox-container .gslide-image img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(80vw, 1000px) !important;
    max-height: 68vh !important;
    margin: 0 auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    object-fit: contain;
    box-shadow: none;
}

.glightbox-container .gslide .gslide-description {
    position: static;
    flex: 0 0 auto;
    width: 100%;
    max-width: min(80vw, 1000px);
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent !important;
    box-shadow: none;
}

.glightbox-container .gslide .gdesc-inner {
    max-height: 18vh;
    overflow-y: auto;
    padding: 14px 8px 4px;
    color: #f5f5f5;
    background: transparent;
    text-align: center;
}

.glightbox-container .gslide .gslide-title {
    margin: 0 0 5px;
    padding: 0;
    color: #f5f5f5;
    font-family: inherit;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    overflow-wrap: anywhere;
}

.glightbox-container .gslide .gslide-desc {
    margin: 0;
    padding: 0;
    color: #c7c7c7;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    overflow-wrap: anywhere;
}

.glightbox-container .gslide-desc a {
    color: #e6e6e6;
    text-decoration: underline;
}

.glightbox-container .gclose,
.glightbox-container .gprev,
.glightbox-container .gnext {
    min-width: 44px;
    min-height: 44px;
    border: 0;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.35);
    box-shadow: none;
}

.glightbox-container .gclose:hover,
.glightbox-container .gprev:hover,
.glightbox-container .gnext:hover {
    background: rgba(0, 0, 0, 0.65);
}

.glightbox-container .gclose:focus-visible,
.glightbox-container .gprev:focus-visible,
.glightbox-container .gnext:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

/* =========================================
   Адаптивность: до 1280 px
   ========================================= */

@media screen and (max-width: 1280px) {
    .container {
        width: 90%;
    }
}

/* =========================================
   Адаптивность: до 980 px
   ========================================= */

@media screen and (max-width: 980px) {
    .container .cols.col-4,
    .container .cols.col-6,
    .container .cols.col-8 {
        width: 50%;
    }

    .thumb75-2 {
        width: 100%;
    }

    .thumb25 {
        width: 40%;
    }

    .thumb75 {
        width: 60%;
    }

    .artist-gallery {
        column-count: 2;
        column-gap: 20px;
    }
}

/* =========================================
   Просмотрщик: до 768 px
   ========================================= */

@media screen and (max-width: 768px) {
    .glightbox-container .gslide-image img {
        max-width: 90vw !important;
        max-height: 60vh !important;
    }

    .glightbox-container .gslide .gslide-description {
        max-width: 90vw;
    }

    .glightbox-container .gslide .gdesc-inner {
        max-height: 20vh;
        padding: 12px 6px 4px;
    }

    .glightbox-container .gslide .gslide-title {
        font-size: 16px;
    }

    .glightbox-container .gslide .gslide-desc {
        font-size: 13px;
    }
}

/* =========================================
   Адаптивность: до 700 px
   ========================================= */

@media screen and (max-width: 700px) {
    .navbar .navbar-inner {
        min-height: 60px;
    }

    .navbar .container {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 44px;
        grid-template-rows: 60px auto;
        align-items: center;
        justify-content: initial;
        gap: 0;
        width: 100%;
        min-height: 60px;
        padding: 0 16px;
    }

    .navbar .navbar-brand {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        align-self: center;
        width: auto;
        max-width: 100%;
        min-height: 0;
        margin: 0;
        padding: 5px 0;
    }

    .navbar .navbar-brand img {
        max-width: 150px;
        max-height: 50px;
    }

    .navbar .btn-navbar {
        display: inline-flex;
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        align-self: center;
        margin: 0;
    }

    .navbar #collapse {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        margin: 0;
        padding: 8px 0 12px;
        overflow: visible;
        border-top: 1px solid #e4e8eb;
        background: #fff;
    }

    .navbar #collapse .nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        float: none;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .navbar #collapse .nav > li {
        float: none;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .navbar #collapse .nav > li > a {
        min-height: 44px;
        padding: 10px 12px;
        border: 0;
        border-left: 3px solid transparent;
        border-radius: 3px;
        color: #164b83;
        background: #fff;
    }

    .navbar #collapse .nav > li.active > a,
    .navbar #collapse .nav > li > a:hover,
    .navbar #collapse .nav > li > a:focus-visible {
        border-left-color: #1fafc5;
        color: #164b83;
        background: #f2f5f6;
    }

    .thumb25 {
        width: 100%;
        padding-bottom: 20px;
    }

    .thumb75-2 {
        width: 100%;
    }

    .hero-unit {
        padding-top: 80px;
    }

    .hero-unit h1 {
        font-size: 28px;
    }

    .hero-unit h2 {
        font-size: 20px;
    }

    .page-home .home-intro {
        padding: 88px 0 20px;
    }

    .page-home .home-intro h1 {
        font-size: 25px;
    }

    .home-ribbon {
        --art-height: 240px;
        --gray-height: 160px;
        --caption-height: 60px;
        --art-gap: 16px;
    }

    .home-ribbon__toolbar {
        flex-wrap: wrap;
        gap: 8px;
        padding-bottom: 16px;
    }

    .home-ribbon__label {
        font-size: 13px;
    }

    /*
       Подписи не ограничиваем по ширине:
       сохраняется одна строка, как на компьютере.
    */

    .page-home .home-about {
        padding: 36px 0 44px;
    }

    .home-about__layout {
        gap: 24px;
    }

    .page-home .home-about h2 {
        margin-bottom: 18px;
    }

    .home-about__text p {
        line-height: 1.7;
    }
}

/* =========================================
   Адаптивность: до 600 px
   ========================================= */

@media screen and (max-width: 600px) {
    .artist-gallery {
        column-count: 1;
    }

    .artist-gallery .painting-card {
        margin-bottom: 26px;
    }

    #cookie-notice {
        max-height: 70vh;
        overflow-y: auto;
        padding: 16px;
    }

    #cookie-notice .cookie-notice__inner {
        gap: 14px;
    }

    #cookie-notice .cookie-notice__btn {
        width: 100%;
    }
}

/* =========================================
   Адаптивность: до 480 px
   ========================================= */

@media screen and (max-width: 480px) {
    .container .cols.col-3,
    .container .cols.col-4,
    .container .cols.col-6,
    .container .cols.col-8,
    .container .cols.col-9 {
        width: 100%;
    }

    .pad-right {
        padding-right: 0;
    }

    .pad-left {
        padding-left: 0;
    }

    .thumb25,
    .thumb75 {
        width: 100%;
    }

    .thumb25 {
        padding-bottom: 20px;
    }

    .contact-form-wrapper {
        padding: 24px 16px;
    }

    .contact-form-wrapper .btn {
        margin-right: 6px;
    }

    .hero-unit h1 {
        font-size: 25px;
    }

    .page-home .home-intro h1 {
        font-size: 23px;
    }

    .home-ribbon {
        --art-height: 210px;
        --gray-height: 140px;
        --caption-height: 58px;
    }

    #contact-result {
        padding: 24px 20px;
    }
}

/* =========================================
   Современные единицы высоты просмотрщика
   ========================================= */

@supports (height: 1dvh) {
    .glightbox-container .gslide-image img {
        max-height: 68dvh !important;
    }

    .glightbox-container .gslide .gdesc-inner {
        max-height: 18dvh;
    }

    @media screen and (max-width: 768px) {
        .glightbox-container .gslide-image img {
            max-height: 60dvh !important;
        }

        .glightbox-container .gslide .gdesc-inner {
            max-height: 20dvh;
        }
    }
}

/* =========================================
   Уменьшение анимации по настройке устройства
   ========================================= */

@media (prefers-reduced-motion: reduce) {
    a,
    .btn,
    .art,
    .artist-gallery .painting-card__image,
    #cookie-notice,
    #cookie-notice .cookie-notice__btn,
    .navbar .menu-icon__line,
    .navbar #collapse .nav > li > a,
    .home-ribbon__control,
    .home-about__link {
        transition: none;
    }
}
/* =========================================
   Об организации: текст, фото и факты
   ========================================= */

.about-overview {
    --about-background: #164b83;
    --about-text: #e2e6ea;
    --about-accent: #62d5df;

    width: 100%;
    padding: 72px 0 80px;
    color: var(--about-text);
    background: var(--about-background);
}

/* Вступление одним абзацем на всю ширину */

.about-overview .about-overview__intro {
    width: 100%;
    max-width: none;
    margin: 0 0 48px;
    padding: 0;
    text-align: left;
}

.about-overview .about-overview__intro h2 {
    margin: 0 0 24px;
    padding: 0;
    color: #fff;
    font-size: clamp(24px, 2vw, 30px);
    font-weight: 500;
    line-height: 1.3;
}

.about-overview .about-overview__intro p {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    color: var(--about-text);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.8;
    white-space: normal;
}

/* Фото слева, факты справа */

.about-overview__layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: start;
    gap: 48px;
    width: 100%;
    min-width: 0;
}

/* Фото без обрезания и изменения цвета */

.about-overview__photo {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.about-overview .about-overview__photo img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 6px;
    box-shadow: none;
    filter: none;
    opacity: 1;
    mix-blend-mode: normal;
}

/* Правая колонка */

.about-overview__details {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    padding: 2px 0 0;
}

.about-overview .about-overview__facts {
    display: flex;
    flex-direction: column;
    gap: 36px;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Текст справа, иконка после текста */

.about-overview .about-overview__fact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px;
    align-items: start;
    column-gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.about-overview__fact-text {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    text-align: right;
}

.about-overview__icon {
    display: block;
    grid-column: 2;
    grid-row: 1;
    width: 32px;
    height: 32px;
    margin: 2px 0 0;
    color: var(--about-accent);
}

.about-overview__number {
    display: block;
    margin: 0 0 8px;
    color: var(--about-accent);
    font-size: clamp(24px, 2.1vw, 30px);
    font-weight: 600;
    line-height: 1.2;
}

.about-overview__description {
    display: block;
    margin: 0;
    color: var(--about-text);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
}

/* Заметная ссылка под фактами */

.about-overview .about-overview__link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    align-self: flex-end;
    gap: 12px;
    max-width: 100%;
    min-height: 44px;
    margin: 32px 0 0;
    padding: 0;
    color: var(--about-accent);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.4;
    text-align: right;
    text-decoration: none;
    transition: color 0.2s ease;
}

.about-overview__link > span {
    display: block;
    min-width: 0;
    line-height: inherit;
}

.about-overview__link-icon {
    display: block;
    flex: 0 0 12px;
    width: 12px;
    height: 14px;
    margin: 0;
    transform: translateY(1px);
}

.about-overview .about-overview__link:hover,
.about-overview .about-overview__link:focus-visible {
    color: #fff;
    text-decoration: none;
}

.about-overview .about-overview__link:focus-visible {
    outline: 2px solid var(--about-accent);
    outline-offset: 5px;
}

/* Планшет: фото сверху, факты под ним */

@media screen and (max-width: 900px) {
    .about-overview__layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 36px;
    }

    .about-overview__details {
        padding: 0;
    }

    .about-overview .about-overview__facts {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 28px;
    }

    .about-overview .about-overview__fact {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 14px;
    }

    .about-overview__icon {
        grid-column: 1;
        grid-row: 1;
        justify-self: end;
        margin: 0;
    }

    .about-overview__fact-text {
        grid-column: 1;
        grid-row: 2;
    }

    .about-overview__number {
        font-size: 26px;
    }
}

/* Телефон: факты вертикально, иконки справа */

@media screen and (max-width: 600px) {
    .about-overview {
        padding: 44px 0 52px;
    }

    .about-overview .about-overview__intro {
        margin-bottom: 32px;
    }

    .about-overview .about-overview__intro h2 {
        margin-bottom: 20px;
    }

    .about-overview .about-overview__intro p {
        line-height: 1.7;
    }

    .about-overview__layout {
        gap: 32px;
    }

    .about-overview .about-overview__facts {
        grid-template-columns: minmax(0, 1fr);
        gap: 30px;
    }

    .about-overview .about-overview__fact {
        grid-template-columns: minmax(0, 1fr) 32px;
        gap: 16px;
    }

    .about-overview__fact-text {
        grid-column: 1;
        grid-row: 1;
    }

    .about-overview__icon {
        grid-column: 2;
        grid-row: 1;
        margin-top: 2px;
    }

    .about-overview .about-overview__link {
        margin-top: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .about-overview .about-overview__link {
        transition: none;
    }
}
/* Немного уменьшаем фото на широких экранах */
@media screen and (min-width: 901px) {
    .about-overview__photo {
        width: 85%;
        justify-self: start;
    }
}