body {
    height: 100%;
    margin: 0;
    padding-right: 0px !important;
}

html,
body {
    overflow-x: hidden;
}

#page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#main {
    flex: 1;
    font-family: var(--font-family);
    font-weight: 500;
}

.ui-dialog {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    max-width: calc(100% - 20px);
    max-height: calc(100% - 20px);
}
img{
    max-width: 100%;
    height: auto;
}
/*HEADER STYLES*/
#footer .ajax-progress,
#header .ajax-progress {
    display: none;
}

.header-bottom {
    background: #ccc;
}

.toolbar .toolbar-tab .toolbar-icon {
    padding: 0.75em 1.5em 0.75em 2.5em;
}
.path-admin .messages--error {
    display: none;
}
/*!* *** contextual-region *** *!*/
/*.contextual-region .contextual {*/
/*    display: none;*/
/*    top: -8px;*/
/*    right: 8px;*/
/*}*/

.contextual-region .contextual-region .contextual {
    top: 8px;
}

.contextual-region:hover .contextual {
    display: block;
}

.contextual-region .contextual .trigger {
    width: 22px !important;
    height: 22px !important;
    background-size: 14px 14px;
}

.cart-block--summary .cart-block--summary__count {
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid #fff;
    background: #ccc;
    color: #fff;
    top: -3px;
    right: -9px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 500;
}

#header-mob {
    top: 0;
    width: 100%;
    background: #d9d9d9;
    color: #000;
    padding: 5px 5px;
    z-index: 50;
}

#header-mob.toolbar-horizontal #header-mob {
    top: 0;
}

#header-mob > * {
    padding: 0 10px;
}

#header-mob a {
    color: #000;
}

.offcanvas {
    --bs-offcanvas-bg: #d9d9d9;
}

.offcanvas .offcanvas-title {
    color: #000;
    text-transform: uppercase;
    font-size: 20px;
    font-weight: 500;
}

.region-navigation .nav > .nav-item:hover .dropdown-menu {
    display: block;
    top: 100%;
    left: 0;
}


/*HEADER STYLES*/

/* SLICK STYLES */
.region-slider .view-content:not(.slick-initialized) .views-row {
    display: none;
}

.region-slider .view-content:not(.slick-initialized) .views-row:first-child {
    display: block;
}

div#slider-block .view.view-slayder.view-id-slayder .view-content .node--type-slide .content {
    position: absolute;
    top: 0;
    bottom: calc(1vw + 12px);
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
}

.slick-prev, .slick-next {
    font-size: 0;
    line-height: 0;
    position: absolute;
    top: calc(50% - 10px);
    display: block;
    width: 20px;
    height: 20px;
    padding: 0;
    -webkit-transform: translate(0, -50%);
    -ms-transform: translate(0, -50%);
    transform: translate(0, -50%);
    cursor: pointer;
    color: transparent;
    border: none;
    outline: none;
    background: transparent;
}

button.slick-prev.slick-arrow {
    left: 25px;
}

button.slick-next.slick-arrow {
    right: 25px;
}

ul.slick-dots {
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    list-style: none;
    margin: 10px 0;
}

ul.slick-dots li button {
    background: #686868;
    border-radius: 50%;
    border: none;
    padding: 0;
    width: 10px;
    font-size: 0;
    height: 10px;
    display: block;
}

ul.slick-dots li button::before {
    display: none;
}

ul.slick-dots li.slick-active button {
    background: #272727;
}

button.slick-arrow {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

button.slick-arrow::before {
    content: '';
    display: block;
    position: relative;
    width: 30px;
    height: 30px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    font-size: 0;
}

button.slick-prev.slick-arrow::before {
    background-image: url("/sites/all/themes/vesta_theme/image/arrow-top.svg");
    transform: rotate(-90deg);
}

button.slick-next.slick-arrow::before {
    background-image: url("/sites/all/themes/vesta_theme/image/arrow-top.svg");
    transform: rotate(90deg);
}

#scrollToTop {
    width: 48px;
    height: 48px;
    background: none;
    text-indent: 0;
    font-size: 0;
    border: 0px;
    outline: 0px;
    display: flex;
    bottom: 120px;
    cursor: pointer;
    position: fixed;
    right: 75px;
    z-index: 10;
    transition: 0.2s;
    padding: 0;
}

/* SLICK STYLES */

/* PRODUCT PAGE STYLES*/
.product-teaser {
    display: flex;
    gap: 50px;
}

.product-teaser .product-teaser-image {
    max-width: 500px;
}

.product-teaser .product-teaser-image .field.field--name-field-variation-image.field--type-image .elements .current-slide.slick-initialized.slick-slider {
    margin: 0 0 10px;
}

.product-teaser .product-teaser-image .field.field--name-field-variation-image.field--type-image .elements .current-slide.slick-initialized.slick-slider .slick-list.draggable .slick-track .element.slick-slide img {
    max-width: 500px;
    min-width: 500px;
    max-height: 500px;
    min-height: 500px;
    object-fit: cover;
}

.product-teaser .product-teaser-image .field.field--name-field-variation-image.field--type-image .elements .nav-slide.slick-initialized.slick-slider .slick-list.draggable {
    margin: 0 -5px;
}

.product-teaser .product-teaser-image .field.field--name-field-variation-image.field--type-image .elements .nav-slide.slick-initialized.slick-slider .slick-list.draggable .slick-track .element.slick-slide {
    margin: 0 5px;
    max-width: 118px;
    min-width: 118px;
    max-height: 118px;
    min-height: 118px;
}

.product-teaser .product-teaser-image .field.field--name-field-variation-image.field--type-image .elements .nav-slide.slick-initialized.slick-slider .slick-list.draggable .slick-track .element.slick-slide img {
    max-width: 118px;
    min-width: 118px;
    max-height: 118px;
    min-height: 118px;
    object-fit: cover;
}

.product-teaser .product-teaser-info {
    max-width: 500px;
}

.product-view-full button.slick-prev.slick-arrow {
    left: -25px;
}

.product-view-full button.slick-next.slick-arrow {
    right: -25px;
}


.node--view-mode-full .field--name-body img {
    margin: 0 10px;
}

/* PRODUCT PAGE STYLES*/

/* ==========================
   FONTS
   ========================== */

/* Roboto Flex — variable font, весь диапазон насыщенности */
@font-face {
    font-family: 'Roboto Flex';
    src: url('../font/RobotoFlex-VariableFont.woff2') format('woff2-variations');
    font-weight: 100 1000;
    font-style: normal;
    font-display: swap;
}

/* Geologica Regular */
@font-face {
    font-family: 'Geologica';
    src: url('../font/Geologica-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Geologica Medium */
@font-face {
    font-family: 'Geologica';
    src: url('../font/Geologica-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* Inter SemiBold */
@font-face {
    font-family: 'Inter';
    src: url('../font/Inter-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

:root {
    --font-family: "Roboto Flex", sans-serif;
    --second-family: "Geologica", sans-serif;
    --third-family: "Inter", sans-serif;

    --white: #fff;
    --white2: #eef0f4;
    --black: #2f2a30;
    --gray: #39455d;
    --blue: #698edd;
    --blue2: #2c4f8f;
    --blue3: #203e74;
}

body {
    font-family: var(--font-family);
    font-weight: 500;
}

/* ============================================
   HEADER STYLES
   ============================================ */

#header {
    background: #ffffff;
    font-family: 'Inter', 'Roboto', sans-serif;
}

/* --- Header Top --- */
#header .header-top {
    background: #ffffff;
    padding: 18px 0 !important;
}

#header .header-top .container > .d-flex {
    gap: 88px;
}

#header .col-actions {
    gap: 16px;
}

.col-social {
    height: 34px;
}

/* --- Logo --- */
#header .logo img {
    max-height: 60px;
    width: auto;
    display: block;
}

/* --- Address --- */
#header .col-address {
    font-weight: 400;
    font-size: 14px;
    line-height: 120%;
    color: var(--black);
    white-space: nowrap;
}

#header .col-address .icon-address {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

#header .col-address .address {
    font-weight: 400;
    font-size: 14px;
    line-height: 120%;
    color: var(--black);
}

/* --- Contacts --- */
#header .col-contacts {
    gap: 7px;
}

#header .col-contacts a {
    font-weight: 400;
    font-size: 14px;
    line-height: 120%;
    color: var(--black);
    text-decoration: none;
    transition: color .2s ease;
}

#header .col-contacts a:hover {
    color: #2c5aa0;
}

#header .col-contacts .icon-phone,
#header .col-contacts .icon-mail {
    width: 20px;
    height: 20px;
    margin-right: 8px !important;
}

#header .col-contacts .tel {
    font-weight: 500;
}

/* --- Search --- */
#header .col-search {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

#header .col-search .region-search {
    position: static;
}

/* Скрываем форму поиска по умолчанию */
#header .col-search .search-api-page-block-form {
    position: absolute;
    top: 50%;
    right: 50px; /* ширина иконки + отступ */
    transform: translateY(-50%);
    margin: 0;
    width: 0;
    height: 44px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: width .3s ease, opacity .3s ease;
    background: #ffffff;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .12);
    z-index: 1000;
    padding: 0;
    display: flex;
    align-items: center;
}

#header .col-search.active .search-api-page-block-form {
    width: 320px;
    opacity: 1;
    visibility: visible;
    padding: 0 6px 0 10px;
}

#header .col-search .search-api-page-block-form form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    width: 100%;
    height: 100%;
}

#header .col-search .form-item {
    margin: 0;
    flex: 1;
    display: flex;
    align-items: center;
}

#header .col-search input[type="search"] {
    border: none;
    outline: none;
    box-shadow: none;
    background: transparent;
    padding: 0 8px;
    width: 100%;
    height: 40px;
    font-size: 14px;
    line-height: 40px;
}

#header .col-search .form-actions {
    margin: 0;
    display: flex;
    align-items: center;
}

#header .col-search .search-form__submit {
    background: #2c5aa0;
    border: none;
    color: #fff;
    padding: 0 16px;
    height: 34px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

/* Иконка-переключатель поиска */
#header .search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: background .2s ease;
    text-decoration: none;
    border: none;
    position: relative;
    z-index: 2;
}

#header .search-toggle:hover {
    background: #f0f4fa;
}

#header .search-toggle img,
#header .search-toggle .icon-search {
    width: 20px;
    height: 20px;
    display: block;
}

/*!* --- Активная ссылка в навигации --- *!*/
/*#header .navigation .nav-item:not(:first-child) .nav-link.is-active,*/
/*#header .navigation .nav-item:not(:first-child) .nav-link.active,*/
/*#header .navigation .nav-item:not(:first-child) .nav-link[aria-current="page"] {*/
/*    background: #4a7dc4;*/
/*    color: #fff;*/
/*    border-radius: 30px;*/
/*    padding: 10px 24px;*/
/*    font-weight: 500;*/
/*    transition: background .2s ease;*/
/*}*/

/*#header .navigation .nav-item:not(:first-child) .nav-link.is-active:hover,*/
/*#header .navigation .nav-item:not(:first-child) .nav-link.active:hover,*/
/*#header .navigation .nav-item:not(:first-child) .nav-link[aria-current="page"]:hover {*/
/*    background: #5a8bd0;*/
/*    opacity: 1;*/
/*    color: #fff;*/
/*}*/

/* --- Social (header + footer) --- */
#header .col-social,
.footer-wrap .col-social {
    display: inline-flex;
    align-items: center;
}

#header .col-social .social-vk,
#header .col-social .social-max,
.footer-wrap .col-social .social-vk,
.footer-wrap .col-social .social-max {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: transform .2s ease, background .2s ease;
}

#header .col-social .social-vk:hover,
#header .col-social .social-max:hover,
.footer-wrap .col-social .social-vk:hover,
.footer-wrap .col-social .social-max:hover {
    background: #e3ebf5;
    transform: translateY(-2px);
}

#header .col-social .icon-vk,
#header .col-social .icon-max,
.footer-wrap .col-social .icon-vk,
.footer-wrap .col-social .icon-max {
    width: 34px;
    height: 34px;
    display: block;
    border-radius: 8px;
}

#header .col-social .social-max,
.footer-wrap .col-social .social-max {
    margin-left: 8px;
}

/* --- Social (offcanvas) --- */
.offcanvas .msngrs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.offcanvas .msngrs .social-vk,
.offcanvas .msngrs .social-max {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background .2s ease;
}

.offcanvas .msngrs .social-vk:hover,
.offcanvas .msngrs .social-max:hover {
    background: #e3ebf5;
}

.offcanvas .msngrs .icon-vk,
.offcanvas .msngrs .icon-max {
    width: 34px;
    height: 34px;
    display: block;
    border-radius: 8px;
}

/* --- Callback Button --- */
#header .col-callback .btn,
#header .col-callback a.btn-primary {
    background: var(--blue);
    border: none;
    line-height: 120%;
    color: var(--white);
    padding: 14px 16px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: background .2s ease, transform .2s ease;
}

#header .col-callback .btn:hover {
    background: #234a85;
    transform: translateY(-1px);
    color: #fff;
}

#header .col-callback .field__item {
    margin: 0;
}

/* ============================================
   HEADER BOTTOM (Navigation)
   ============================================ */

#header .header-bottom {
    background: #2c5aa0;
    padding: 0 !important;
    margin-left: 40px;
    margin-right: 40px;
}

#header .header-bottom .container,
#header .header-bottom .container > .d-flex,
#header .region-navigation,
#header .navigation,
#header .navigation .nav {
    min-height: 56px;
}

#header .region-navigation {
    width: 100%;
    display: flex;
    align-items: stretch;
}

#header .navigation {
    width: 100%;
    display: flex;
    align-items: stretch;
}

#header .navigation .nav {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
}

#header .navigation .nav-item {
    list-style: none;
    display: flex;
    align-items: stretch;
}

#header .navigation .nav-link {
    color: var(--white);
    font-size: 16px;
    line-height: 120%;
    padding: 12px 25px;
    text-decoration: none;
    font-weight: 500;
    transition: opacity .2s ease;
    display: inline-flex;
    align-items: center;
}

#header .navigation .nav-link:hover {
    opacity: .8;
    color: #fff;
}

#header .navigation .nav-link.is-active {
    font-weight: 500;
}

/* Первая ссылка (Каталог услуг) — стилизуем как кнопку на всю высоту */
#header .navigation .nav-item:first-child {
    align-self: stretch;
}

#header .navigation .nav-item:first-child .nav-link {
    background: var(--blue);
    color: var(--white);
    border: 2px solid var(--blue);
    border-radius: 20px;
    padding: 0 48px 0 24px;
    position: relative;
    transition: background .2s ease;
    display: inline-flex;
    align-items: center;
    height: 100%;
}

#header .navigation .nav-item:first-child .nav-link:hover {
    background: #5a8bd0;
    opacity: 1;
}

/* Иконка "бургер" справа от Каталога услуг */
#header .navigation .nav-item:first-child .nav-link::after {
    content: '';
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 12px;
    background-image: linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff);
    background-size: 16px 2px;
    background-position: 0 0, 0 5px, 0 10px;
    background-repeat: no-repeat;
}

/* ============================================
   DROPDOWN MENU (Каталог услуг)
   ============================================ */

/* Убираем стандартную Bootstrap-стрелку у .dropdown-toggle */
#header .navigation .dropdown-toggle::after {
    display: none !important;
    content: none !important;
    border: none !important;
}

/* Возвращаем наш кастомный burger (три линии), который Bootstrap мог перебить своей специфичностью */
#header .navigation .nav-item:first-child .nav-link.dropdown-toggle::after {
    content: '' !important;
    display: block !important;
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 12px;
    background-image: linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff);
    background-size: 16px 2px;
    background-position: 0 0, 0 5px, 0 10px;
    background-repeat: no-repeat;
    border: none;
}

/* Родительский li - relative для позиционирования меню, стили для наведения */
#header .navigation .nav-item.dropdown {
    position: relative;
}

/* Само выпадающее меню - скрыто по умолчанию */
#header .navigation .dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    min-width: 320px;
    margin: 0;
    padding: 12px;
    list-style: none;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(20, 40, 100, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 30; /* было 1000 - снижаем, чтобы не перекрывать toolbar/contextual links Drupal */
}

/* Небольшая "мостик"-зона, чтобы курсор не терял ховер между кнопкой и меню */
#header .navigation .nav-item.dropdown::before {
    content: '';
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    height: 12px;
    z-index: 29;
}

#header {
    z-index: auto;
    position: relative;
}

#header .header-bottom {
    position: relative;
    z-index: 10;
}

/* Открытие меню на hover родительского li */
#header .navigation .nav-item.dropdown:hover .dropdown-menu,
#header .navigation .nav-item.dropdown .dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Пункты меню */
#header .navigation .dropdown-menu .nav-item {
    display: block;
    width: 100%;
}

#header .navigation .dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    color: #1a1a2e;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    white-space: normal;
    transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

#header .navigation .dropdown-item:hover,
#header .navigation .dropdown-item:focus {
    background-color: #eef1f8;
    color: var(--blue);
    padding-left: 20px;
}

/* Разделитель между пунктами (кроме последнего) */
#header .navigation .dropdown-menu .nav-item:not(:last-child) {
    border-bottom: 1px solid #f0f2f7;
    margin-bottom: 2px;
    padding-bottom: 2px;
}

/* ============================================
   PROMO BLOCK
   ============================================ */

#promo-block.promo-block {
    position: relative;
    padding: 0;
}

#promo-block .container {
    position: relative;
}

#promo-block .region-promo-block,
#promo-block .block-block-content {
    position: static;
}

/* Основной блок промо-контента */
#promo-block .promo_content {
    position: relative;
    z-index: 2;
    padding: 132px 0 132px;
    color: #fff;
    max-width: 726px;
}

/* Фоновая картинка — вылезает за пределы .container на 40px слева/справа,
   скругление только снизу */
#promo-block .promo_bg {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 40px;   /* отступ от края экрана — как у header-bottom */
    right: 40px;
    z-index: 1;
    overflow: hidden;
    border-radius: 0 0 50px 50px; /* скругление только снизу */
    background: #3a5a9c;
}

/* Отменяем ограничение container для картинки —
   она должна выходить за пределы .container */
#promo-block .container {
    /* container из bootstrap имеет padding по бокам,
       но фон позиционируется относительно ближайшего relative-родителя,
       поэтому берём .promo-block */
}

/* Перекрываем: фон относительно .promo-block, а не .container */
#promo-block.promo-block > .container {
    position: static;
}

#promo-block .promo_bg .field--name-field-promo-image-bg,
#promo-block .promo_bg .field__item {
    width: 100%;
    height: 100%;
    margin: 0;
}

#promo-block .promo_bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- Заголовок --- */
#promo-block .field--name-field-promo-title h1,
#promo-block .field--name-field-promo-title {
    font-family: var(--second-family);
    font-size: 64px;
    line-height: 100%;
    font-weight: 400;
    color: var(--white);
    margin: 0 0 30px;
}

/* --- Списки --- */
#promo-block .promo_content_center {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
}

#promo-block .promo_content_left,
#promo-block .promo_content_right {
    flex: 1;
}

#promo-block .promo_content_center ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#promo-block .promo_content_center ul li {
    position: relative;
    padding-left: 10px;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 20px;
    line-height: 110%;
    color: var(--white);
}

#promo-block .promo_content_center ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
}

/* --- Кнопка --- */
#promo-block .field--name-field-promo-btn-link a {
    display: inline-block;
    background: var(--white);
    color: var(--blue);
    padding: 10px 21px;
    border: 1.50px solid var(--white);
    border-radius: 20px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: background .2s ease, transform .2s ease;
}

#promo-block .field--name-field-promo-btn-link a:hover {
    background: #f0f4fa;
    transform: translateY(-1px);
}

/* Декоративный круг - позади изображения, в правом нижнем углу */
#promo-block.promo-block::after {
    content: '';
    position: absolute;
    right: -160px;
    bottom: -290px;
    left: auto;
    width: 481px;
    height: 462px;
    background-image: url('/sites/all/themes/vesta_theme/image/dec.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 0;
    pointer-events: none;
}

/*SERVICE BLOCK*/

#services_block {
    padding: 110px 0;
    background-color: #ffffff;
}

/* Превращаем views-element-container в grid-контейнер */
#services_block .views-element-container {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 24px;
    row-gap: 40px;
}

/* "Разворачиваем" промежуточные обёртки, чтобы их дети стали прямыми grid-элементами */
#services_block .views-element-container > div:not(.contextual) {
    display: contents;
}

#services_block .view-our-services {
    display: contents;
}

/*!* Скрываем служебные кнопки редактирования Drupal *!*/
/*#services_block .contextual {*/
/*    display: none;*/
/*}*/

/* Заголовок - верхний левый угол сетки */
#services_block .block-title {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    font-family: var(--second-family);
    font-weight: 400;
    font-size: 50px;
    line-height: 110%;
    color: var(--black);
}

/* Кнопка "Все услуги" - верхний правый угол, на одной линии с заголовком */
#services_block .more-link {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
}

#services_block .more-link a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: 2px solid var(--blue);
    border-radius: 20px;
    color: var(--blue);
    text-decoration: none;
    font-size: 16px;
    line-height: 120%;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#services_block .more-link a:hover {
    background: var(--blue);
    color: var(--white);
}

/* Сетка карточек - вторая строка, на всю ширину */
#services_block .view-content {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Скрываем дублирующий h2 внутри карточки */
#services_block article.node--type-service > h2 {
    display: none;
}

/* Карточка */
#services_block article.node--type-service {
    position: relative;
    display: flex;
    min-height: 220px;
    border-radius: 30px;
    overflow: hidden;
    background: linear-gradient(180deg, #5986e5 0%, #184ba8 111%);
    cursor: pointer;
}

/* Плавный кроссфейд градиента на hover */
#services_block article.node--type-service::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #c3d2f4 0%, #759be3 111%);
    opacity: 0;
    transition: opacity 0.6s ease;
}

#services_block article.node--type-service:hover::before {
    opacity: 1;
}

#services_block article.node--type-service .node__content {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    padding: 24px;
}

#services_block .service_left {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
}

#services_block .field--name-field-service-title {
    font-family: var(--second-family);
    font-weight: 500;
    font-size: 26px;
    line-height: 110%;
    color: var(--white);
}

#services_block .field--name-field-service-title a {
    color: #ffffff;
    text-decoration: none;
}

#services_block .field--name-field-service-btn a {
    color: var(--white);
    font-size: 18px;
    font-weight: 500;
    line-height: 110%;
    text-decoration-line: underline;
    text-decoration-color: rgba(255, 255, 255, 1);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.4s ease;
}

#services_block article.node--type-service:hover .field--name-field-service-btn a {
    text-decoration-color: transparent;
}

/* Ссылка "Подробнее" растягивается на всю карточку */
#services_block .field--name-field-service-btn a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
}

/* Иконка справа снизу */
#services_block .service_right {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

#services_block .service_right img {
    width: 150px;
    height: auto;
    max-height: 160px;
    object-fit: contain;
    opacity: 0.9;
}

/*SERVICES CATALOG PAGE (страница /services) - исправлено, защищено от применения к отдельной странице услуги*/

#block-vesta-theme-content .view-content:has(article.node--type-service) {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 20px 0;
}

#block-vesta-theme-content article.node--type-service > h2 {
    display: none;
}

/* Добавлен :has(.service_left) - применится ТОЛЬКО к карточкам-тизерам каталога, не к полной странице услуги */
#block-vesta-theme-content article.node--type-service:has(.service_left) {
    position: relative;
    display: flex;
    min-height: 220px;
    border-radius: 30px;
    overflow: hidden;
    background: linear-gradient(180deg, #5986e5 0%, #184ba8 111%);
    cursor: pointer;
}

#block-vesta-theme-content article.node--type-service:has(.service_left)::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #c3d2f4 0%, #759be3 111%);
    opacity: 0;
    transition: opacity 0.6s ease;
}

#block-vesta-theme-content article.node--type-service:has(.service_left):hover::before {
    opacity: 1;
}

#block-vesta-theme-content article.node--type-service:has(.service_left) .node__content {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    padding: 24px;
}

#block-vesta-theme-content .service_left {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
}

#block-vesta-theme-content .field--name-field-service-title {
    font-family: var(--second-family);
    font-weight: 500;
    font-size: 26px;
    line-height: 110%;
    color: var(--white);
}

#block-vesta-theme-content .field--name-field-service-title a {
    color: #ffffff;
    text-decoration: none;
}

#block-vesta-theme-content .field--name-field-service-btn a {
    color: var(--white);
    font-size: 18px;
    font-weight: 500;
    line-height: 110%;
    text-decoration-line: underline;
    text-decoration-color: rgba(255, 255, 255, 1);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.4s ease;
}

#block-vesta-theme-content article.node--type-service:hover .field--name-field-service-btn a {
    text-decoration-color: transparent;
}

#block-vesta-theme-content .field--name-field-service-btn a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
}

#block-vesta-theme-content .service_right {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

#block-vesta-theme-content .service_right img {
    width: 150px;
    height: auto;
    max-height: 160px;
    object-fit: contain;
    opacity: 0.9;
}

/*SINGLE SERVICE PAGE (страница отдельной услуги, например /konsultaciya-osmotr-polosti-rta)*/

#block-vesta-theme-content article.node--type-service:has(.field--name-field-service-info-on-page) {
    padding: 20px 0;
    background: none;
}

#block-vesta-theme-content .field--name-field-service-info-on-page {
    max-width: 900px;
    font-size: 16px;
    line-height: 1.7;
    color: #4a4a5a;
}

#block-vesta-theme-content .field--name-field-service-info-on-page p {
    margin-bottom: 20px;
}

#block-vesta-theme-content .field--name-field-service-info-on-page p:last-child {
    margin-bottom: 0;
}

#block-vesta-theme-content .field--name-field-service-info-on-page ul {
    margin: 0 0 20px 0;
    padding-left: 24px;
}

#block-vesta-theme-content .field--name-field-service-info-on-page li {
    margin-bottom: 10px;
    line-height: 1.6;
}

#block-vesta-theme-content .field--name-field-service-info-on-page li:last-child {
    margin-bottom: 0;
}

/* Заголовок страницы услуги - в общем стиле сайта */
#block-vesta-theme-content ~ #block-vesta-theme-page-title h1,
#block-vesta-theme-page-title:has(+ #block-vesta-theme-content .field--name-field-service-info-on-page) h1 {
    font-family: var(--second-family);
    font-weight: 400;
    font-size: 42px;
    line-height: 110%;
    color: var(--black);
    margin-bottom: 30px;
}


/*ABOUT BLOCK*/

/* Внешняя секция - относительный контейнер для псевдоэлемента-фона */
#about_block {
    position: relative;
    padding: 60px 0;
    z-index: 0;
}

/* Фон - псевдоэлемент, растянут на всю ширину экрана минус 40px с каждой стороны,
   НЕ влияет на ширину/положение реального контента */
#about_block::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: calc(100vw - 80px);
    margin-left: calc(-50vw + 40px);
    background: var(--white2);
    border-radius: 50px;
    z-index: -1;
}

/* .container остаётся стандартным - контент не трогаем шириной */
#about_block .container {
    position: relative;
    z-index: 1;
}

/*#about_block .region-about-block {*/
/*    padding: 48px 0 24px;*/
/*}*/

/*!* Скрываем контекстные кнопки редактирования Drupal *!*/
/*#about_block .contextual {*/
/*    display: none;*/
/*}*/

/* ===== Блок "О нас" ===== */
#about_block .block-block-content306b5443-29da-43de-9b8d-bd306bba8419 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 60px;
}

#about_block .about_left {
    flex: 0 0 45%;
    max-width: 570px;
}

#about_block .field--name-field-about-title h2 {
    font-family: var(--second-family);
    font-weight: 400;
    font-size: 50px;
    line-height: 110%;
    color: var(--black);
    margin: 0 0 20px 0;
}

#about_block .field--name-field-about-text {
    margin-bottom: 20px;
}

#about_block .field--name-field-about-text p {
    font-weight: 400;
    font-size: 20px;
    line-height: 110%;
    color: var(--black);
}

#about_block .field--name-field-about-text p:last-child {
    margin-bottom: 0;
}

#about_block .field--name-field-about-link a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    border-radius: 20px;
    background: var(--blue);
    color: var(--white);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    line-height: 120%;
    transition: background-color 0.3s ease;
}

#about_block .field--name-field-about-link a:hover {
    background-color: #3a63d4;
}

/* Правая часть - фото врачей + декоративный зуб поверх */
#about_block .about_right {
    position: relative;
    flex: 0 0 auto;
}

#about_block .field--name-field-about-image img {
    border-radius: 20px;
    display: block;
    max-width: 572px;
    width: 100%;
    height: auto;
    object-fit: cover;
}

#about_block .field--name-field-about-image-dec {
    position: absolute;
    left: -55px;
    top: 89%;
    transform: translateY(-50%);
    z-index: 2;
}

#about_block .field--name-field-about-image-dec img {
    max-width: 150px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(20, 40, 100, 0.15));
}

/* ===== Блок "Лицензии" ===== */
#about_block .block-block-content6a8c0ffc-279f-49aa-9d56-64d9287446a2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    background: linear-gradient(180deg, #5986e5 0%, #184ba8 111%);
    border-radius: 30px;
    padding: 30px 60px 0 30px;
    overflow: hidden;
    min-height: 260px;
}

#about_block .license_left {
    flex: 0 0 50%;
    max-width: 630px;
    padding-bottom: 30px; /* компенсируем убранный padding у родителя только для текстовой части */
}

#about_block .field--name-field-license-title {
    font-family: var(--second-family);
    font-weight: 400;
    font-size: 40px;
    line-height: 110%;
    color: var(--white);
    margin-bottom: 20px;
}

#about_block .field--name-field-license-text p {
    font-weight: 400;
    font-size: 18px;
    line-height: 110%;
    color: var(--white);
    margin-bottom: 30px;
}

#about_block .field--name-field-license-link a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    border-radius: 20px;
    background: var(--white);
    color: var(--gray);
    line-height: 120%;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#about_block .field--name-field-license-link a:hover {
    background-color: #eef1f8;
}

/* Правая часть - картинка прижата к низу карточки, без искажения пропорций */
#about_block .license_right {
    flex: 0 0 auto;
    align-self: flex-end; /* прижимает картинку к нижнему краю карточки */
}

#about_block .field--name-field-license-images .field__item img {
    display: block;
    width: auto;
    height: auto;
    max-width: 420px;
    max-height: 260px;
    object-fit: contain;
}

/* Фон - теперь содержит цвет + два декоративных круга (снизу слева, сверху справа) */
#about_block::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: calc(100vw - 80px);
    margin-left: calc(-50vw + 40px);
    border-radius: 50px;
    z-index: -1;
    background:
            url('/sites/all/themes/vesta_theme/image/dec.svg') no-repeat left -150px bottom -150px,
            url('/sites/all/themes/vesta_theme/image/dec.svg') no-repeat right -150px top -150px,
            var(--white2);
    background-size: 576px 552px, 576px 552px, auto;
}

/*SPECIALISTS BLOCK*/

#specialists_block {
    padding: 110px 0;
    background-color: #ffffff;
}

/* Превращаем views-element-container в grid-контейнер - точно как в services_block */
#specialists_block .views-element-container {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 24px;
    row-gap: 30px;
}

/* "Разворачиваем" промежуточные обёртки, чтобы их дети стали прямыми grid-элементами */
#specialists_block .views-element-container > div:not(.contextual) {
    display: contents;
}

#specialists_block .view-our-specialists {
    display: contents;
}

/*!* Скрываем служебные кнопки редактирования Drupal *!*/
/*#specialists_block .contextual {*/
/*    display: none;*/
/*}*/

/* Заголовок - верхний левый угол сетки */
#specialists_block .block-title {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    font-family: var(--second-family);
    font-weight: 400;
    font-size: 50px;
    line-height: 110%;
    color: var(--black);
}

/* Кнопка "Все специалисты" - верхний правый угол, на одной линии с заголовком */
#specialists_block .more-link {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
}

#specialists_block .more-link a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: 2px solid var(--blue);
    border-radius: 20px;
    color: var(--blue);
    text-decoration: none;
    font-size: 16px;
    line-height: 120%;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#specialists_block .more-link a:hover {
    background: var(--blue);
    color: var(--white);
}

/* Сетка карточек - вторая строка, на всю ширину */
#specialists_block .view-content {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* Скрываем дублирующий заголовок карточки */
#specialists_block article.node--type-specialist > h2 {
    display: none;
}

/* Карточка специалиста */
#specialists_block article.node--type-specialist {
    position: relative;
    display: flex;
    background: var(--white2);
    border-radius: 20px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
}

#specialists_block article.node--type-specialist .node__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Слой для плавного hover-перехода фона (кроссфейд через opacity) */
#specialists_block article.node--type-specialist::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: 20px;
    background: linear-gradient(180deg, #5986e5 0%, #184ba8 111%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

#specialists_block article.node--type-specialist:hover::before {
    opacity: 1;
}

/* Имя специалиста */
#specialists_block .field--name-field-specialist-name {
    order: 1;
    font-weight: 600;
    font-size: 20px;
    line-height: 110%;
    text-align: center;
    color: var(--black);
    margin-bottom: 10px;
    max-width: 240px;
    transition: color 0.5s ease;
}

#specialists_block .field--name-field-specialist-name a {
    color: inherit;
    text-decoration: none;
}

#specialists_block article.node--type-specialist:hover .field--name-field-specialist-name {
    color: #ffffff;
}

/* Стаж */
#specialists_block .field--name-field-specialist-experience {
    order: 2;
    font-weight: 500;
    font-size: 16px;
    line-height: 120%;
    text-align: center;
    color: var(--black);
    margin-bottom: 16px;
    transition: color 0.5s ease;
}

#specialists_block .field--name-field-specialist-experience a {
    color: inherit;
    text-decoration: none;
}

#specialists_block article.node--type-specialist:hover .field--name-field-specialist-experience {
    color: rgba(255, 255, 255, 0.85);
}

/* Фото - круглое */
#specialists_block .field--name-field-specialist-photo {
    order: 3;
    width: 180px;
    height: 180px;
    margin-bottom: 20px;
}

#specialists_block .field--name-field-specialist-photo a {
    display: block;
    width: 100%;
    height: 100%;
}

#specialists_block .field--name-field-specialist-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Кнопка "Подробнее" */
#specialists_block .field--name-field-specialist-btn {
    order: 4;
}

#specialists_block .field--name-field-specialist-btn a {
    position: relative;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    border-radius: 20px;
    background: var(--blue);
    color: var(--white);
    text-decoration: none;
    font-size: 16px;
    line-height: 120%;
    font-weight: 500;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* На hover карточки кнопка становится белой с синим текстом */
#specialists_block article.node--type-specialist:hover .field--name-field-specialist-btn a {
    background-color: #ffffff;
    color: #2f4fa8;
}

/* Растягиваем клик на всю карточку через stretched-link на имени специалиста */
#specialists_block .field--name-field-specialist-name a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
}

/*SPECIALISTS CATALOG PAGE (страница /specialists) - исправлено*/

#block-vesta-theme-content .view-content:has(article.node--type-specialist) {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding: 20px 0;
}

#block-vesta-theme-content article.node--type-specialist > h2 {
    display: none;
}

/* Карточка тизера - применяется ТОЛЬКО если внутри есть поле имени (только в тизере, не на полной странице) */
#block-vesta-theme-content article.node--type-specialist:has(.field--name-field-specialist-name) {
    position: relative;
    display: flex;
    background: var(--white2);
    border-radius: 20px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
}

#block-vesta-theme-content article.node--type-specialist:has(.field--name-field-specialist-name) .node__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

#block-vesta-theme-content article.node--type-specialist:has(.field--name-field-specialist-name)::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: 20px;
    background: linear-gradient(180deg, #5986e5 0%, #184ba8 111%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

#block-vesta-theme-content article.node--type-specialist:has(.field--name-field-specialist-name):hover::before {
    opacity: 1;
}

#block-vesta-theme-content .field--name-field-specialist-name {
    order: 1;
    font-weight: 600;
    font-size: 20px;
    line-height: 110%;
    text-align: center;
    color: var(--black);
    margin-bottom: 10px;
    max-width: 240px;
    transition: color 0.5s ease;
}

#block-vesta-theme-content .field--name-field-specialist-name a {
    color: inherit;
    text-decoration: none;
}

#block-vesta-theme-content article.node--type-specialist:hover .field--name-field-specialist-name {
    color: #ffffff;
}

#block-vesta-theme-content .field--name-field-specialist-experience {
    order: 2;
    font-weight: 500;
    font-size: 16px;
    line-height: 120%;
    text-align: center;
    color: var(--black);
    margin-bottom: 16px;
    transition: color 0.5s ease;
}

#block-vesta-theme-content .field--name-field-specialist-experience a {
    color: inherit;
    text-decoration: none;
}

#block-vesta-theme-content article.node--type-specialist:hover .field--name-field-specialist-experience {
    color: rgba(255, 255, 255, 0.85);
}

/* Фото в тизере - круглое */
#block-vesta-theme-content article.node--type-specialist:has(.field--name-field-specialist-name) .field--name-field-specialist-photo {
    order: 3;
    width: 180px;
    height: 180px;
    margin-bottom: 20px;
}

#block-vesta-theme-content article.node--type-specialist:has(.field--name-field-specialist-name) .field--name-field-specialist-photo a {
    display: block;
    width: 100%;
    height: 100%;
}

#block-vesta-theme-content article.node--type-specialist:has(.field--name-field-specialist-name) .field--name-field-specialist-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

#block-vesta-theme-content .field--name-field-specialist-btn {
    order: 4;
}

#block-vesta-theme-content .field--name-field-specialist-btn a {
    position: relative;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    border-radius: 20px;
    background: var(--blue);
    color: var(--white);
    text-decoration: none;
    font-size: 16px;
    line-height: 120%;
    font-weight: 500;
    transition: background-color 0.5s ease, color 0.5s ease;
}

#block-vesta-theme-content article.node--type-specialist:hover .field--name-field-specialist-btn a {
    background-color: #ffffff;
    color: #2f4fa8;
}

#block-vesta-theme-content .field--name-field-specialist-name a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
}

/*SINGLE SPECIALIST PAGE - фото float слева, текст обтекает и раскрывается на всю ширину снизу*/

#block-vesta-theme-content article.node--type-specialist:has(.field--name-field-specialist-info-on-page) {
    padding: 20px 0;
    background: none;
}

#block-vesta-theme-content article.node--type-specialist:has(.field--name-field-specialist-info-on-page) .node__content {
    display: block; /* убираем flex - теперь используем float */
}

/* Фото - float слева, текст будет обтекать его */
#block-vesta-theme-content article.node--type-specialist:has(.field--name-field-specialist-info-on-page) .field--name-field-specialist-photo {
    float: left;
    width: 280px;
    margin: 0 40px 20px 0;
}

#block-vesta-theme-content article.node--type-specialist:has(.field--name-field-specialist-info-on-page) .field--name-field-specialist-photo img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 24px;
    display: block;
}

/* Текст - обтекает фото сверху, а после его окончания раскрывается на всю ширину */
#block-vesta-theme-content .field--name-field-specialist-info-on-page {
    font-size: 16px;
    line-height: 1.7;
    color: #4a4a5a;
}

#block-vesta-theme-content .field--name-field-specialist-info-on-page p {
    margin-bottom: 16px;
}

#block-vesta-theme-content .field--name-field-specialist-info-on-page p:last-child {
    margin-bottom: 0;
}

#block-vesta-theme-content .field--name-field-specialist-info-on-page em {
    font-style: italic;
    color: var(--blue);
}

#block-vesta-theme-content .field--name-field-specialist-info-on-page strong {
    color: var(--black);
    font-weight: 600;
}

#block-vesta-theme-content .field--name-field-specialist-info-on-page ul {
    margin: 0 0 16px 0;
    padding-left: 24px;
}

#block-vesta-theme-content .field--name-field-specialist-info-on-page li {
    margin-bottom: 10px;
    line-height: 1.6;
}

#block-vesta-theme-content .field--name-field-specialist-info-on-page li:last-child {
    margin-bottom: 0;
}

/* Очистка float после текста, чтобы следующие блоки на странице не наезжали */
#block-vesta-theme-content article.node--type-specialist:has(.field--name-field-specialist-info-on-page) .node__content::after {
    content: '';
    display: table;
    clear: both;
}

/*GALLERY BLOCK*/

#gallery_block {
    padding-bottom: 110px;
    background-color: #ffffff;
}

/* Превращаем views-element-container в grid-контейнер */
#gallery_block .views-element-container {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 24px;
    row-gap: 30px;
}

/* "Разворачиваем" промежуточные обёртки, чтобы их дети стали прямыми grid-элементами */
#gallery_block .views-element-container > div:not(.contextual) {
    display: contents;
}

#gallery_block .view-gallery {
    display: contents;
}

/*!* Скрываем служебные кнопки редактирования Drupal *!*/
/*#gallery_block .contextual {*/
/*    display: none;*/
/*}*/

/* Заголовок - верхний левый угол сетки */
#gallery_block .block-title {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    font-family: var(--second-family);
    font-weight: 400;
    font-size: 50px;
    line-height: 110%;
    color: var(--black);
}

/* Кнопка "Смотреть все" - верхний правый угол, на одной линии с заголовком */
#gallery_block .more-link {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
}

#gallery_block .more-link a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: none;
    border-radius: 20px;
    border: 2px solid var(--blue);
    background: var(--white);
    color: var(--blue);
    text-decoration: none;
    font-size: 16px;
    line-height: 120%;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}

#gallery_block .more-link a:hover {
    background: var(--blue);
    color: var(--white);
}

/* Сетка изображений - вторая строка, на всю ширину */
#gallery_block .view-content {
    grid-column: 1 / -1;
    grid-row: 2;
}

#gallery_block .views-row,
#gallery_block .views-field-field-gallery,
#gallery_block .field-content {
    display: contents;
}

/* Сама сетка из 4 колонок задаётся на field-content через grid */
#gallery_block .view-content .views-row {
    display: grid;
}

#gallery_block .field-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

#gallery_block .photoswipe-gallery {
    display: block;
    border-radius: 30px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

#gallery_block .photoswipe-gallery a {
    display: block;
    width: 100%;
    height: 100%;
}

#gallery_block .photoswipe-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

#gallery_block .photoswipe-gallery:hover img {
    transform: scale(1.05);
}

/*GALLERY PAGE (страница /gallery) - исправлено*/

#block-vesta-theme-content .view-content:has(.photoswipe-gallery) {
    padding: 20px 0;
}

/* display: contents - ТОЛЬКО на промежуточные обёртки, БЕЗ .field-content */
#block-vesta-theme-content .view-content:has(.photoswipe-gallery) .views-row,
#block-vesta-theme-content .view-content:has(.photoswipe-gallery) .views-field-field-gallery {
    display: contents;
}

/* Сама сетка из 4 колонок - задаётся именно на field-content, ничего это правило больше не перебивает */
#block-vesta-theme-content .field-content:has(.photoswipe-gallery) {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

#block-vesta-theme-content .photoswipe-gallery {
    display: block;
    border-radius: 30px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

#block-vesta-theme-content .photoswipe-gallery a {
    display: block;
    width: 100%;
    height: 100%;
}

#block-vesta-theme-content .photoswipe-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

#block-vesta-theme-content .photoswipe-gallery:hover img {
    transform: scale(1.05);
}

/*FEEDBACK BLOCK*/

#feedback_block {
    padding: 0;
}

/* Сам блок-контент - высота определяется реальной высотой формы (естественный поток) */
#feedback_block .block-block-contentcf6eb3b0-93c2-4b98-89e7-3eae0f3e58f4 {
    position: relative;
}

#feedback_block .contextual {
    display: none;
}

/* Фоновое изображение - вырывается за пределы .container на всю ширину viewport, растягивается на высоту родителя */
#feedback_block .feedback_content_bg {
    position: absolute;
    inset: 0;
    left: 50%;
    width: 100vw;
    margin-left: -50vw;
    z-index: 0;
    overflow: hidden;
    border-radius: 50px 50px 0 0;
}

/* Промежуточная обёртка поля - растягивается на всю высоту/ширину контейнера фона */
#feedback_block .feedback_content_bg .field--name-field-feedback-image-bg,
#feedback_block .feedback_content_bg .field__item {
    display: block;
    width: 100%;
    height: 100%;
}

/* Сама картинка - принудительно заполняет весь блок, игнорируя HTML-атрибуты width/height */
#feedback_block .feedback_content_bg img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    object-fit: cover;
    object-position: center;
}

/* Контент - остаётся строго в границах .container, поверх фона; padding задаёт итоговую высоту всей секции */
#feedback_block .feedback_content_main {
    position: relative;
    z-index: 1;
    padding: 60px 0;
}

#feedback_block .field--name-field-feedback-title {
    font-family: var(--second-family);
    font-weight: 400;
    font-size: 28px;
    line-height: 110%;
    letter-spacing: 0.02em;
    color: var(--white);
    max-width: 480px;
    margin-bottom: 10px;
}

#feedback_block .field--name-field-feedback-text {
    max-width: 540px;
    margin-bottom: 20px;
}

#feedback_block .field--name-field-feedback-text p {
    font-weight: 500;
    font-size: 16px;
    line-height: 120%;
    color: var(--white);
    margin: 0;
}

/* Форма */
#feedback_block .field--name-field-feedback-form {
    max-width: 540px;
}

/* Скрываем общий блок с перечнем ошибок сверху формы */
#feedback_block .alert.alert-error {
    display: none;
}

/* Скрываем текстовые сообщения об ошибках под каждым полем */
#feedback_block .form-item--error-message {
    display: none;
}

/* Убираем лишний отступ от контейнера поля с ошибкой */
#feedback_block .js-form-item.form-item--error {
    margin: 0;
}

#feedback_block .webform-submission-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

#feedback_block .js-form-item-name {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
}

#feedback_block .js-form-item-phone {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
}

#feedback_block .js-form-item-message {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
}

#feedback_block .js-form-item-privacy {
    grid-column: 1 / -1;
    grid-row: 3;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
}

#feedback_block .form-actions {
    grid-column: 1 / -1;
    grid-row: 4;
    margin: 0;
}

/* Поля ввода */
#feedback_block .form-text,
#feedback_block .form-textarea {
    width: 100%;
    padding: 14px 22px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    line-height: 120%;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

#feedback_block .form-text::placeholder,
#feedback_block .form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.65);
    transition: color 0.2s ease;
}

#feedback_block .form-text:focus,
#feedback_block .form-textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.7);
    background-color: rgba(255, 255, 255, 0.12);
}

/* Ошибка - красная рамка вместо текстового сообщения */
#feedback_block .form-text.error,
#feedback_block .form-textarea.error,
#feedback_block .form-text[aria-invalid="true"],
#feedback_block .form-textarea[aria-invalid="true"] {
    border-color: #ff5c5c;
    background-color: rgba(255, 92, 92, 0.08);
}

#feedback_block .form-text.error::placeholder,
#feedback_block .form-textarea.error::placeholder,
#feedback_block .form-text[aria-invalid="true"]::placeholder,
#feedback_block .form-textarea[aria-invalid="true"]::placeholder {
    color: rgba(255, 92, 92, 0.85);
}

#feedback_block .form-textarea-wrapper textarea {
    resize: none;
    max-height: 65px;
}

/* Чекбокс согласия - полный сброс нативного вида + кастомная галочка */
#feedback_block .form-checkbox {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    margin: 3px 0 0 0;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border: 1px solid var(--white);
    border-radius: 6px;
    background-color: transparent;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* Галочка - рисуем через классический приём "повёрнутая рамка" */
#feedback_block .form-checkbox::after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid var(--blue);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Состояние "отмечено" - белый фон + видимая синяя галочка */
#feedback_block .form-checkbox:checked {
    background-color: var(--white);
    border-color: var(--white);
}

#feedback_block .form-checkbox:checked::after {
    display: block;
}

/* Ошибка на чекбоксе - красная рамка */
#feedback_block .form-checkbox.error,
#feedback_block .form-checkbox[aria-invalid="true"] {
    border-color: #ff5c5c;
}

/* Фокус - лёгкая обводка для доступности (навигация с клавиатуры) */
#feedback_block .form-checkbox:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

#feedback_block .js-form-item-privacy .description {
    font-weight: 500;
    font-size: 14px;
    line-height: 110%;
    color: var(--white);
}

#feedback_block .js-form-item-privacy .description a {
    color: #ffffff;
    text-decoration: underline;
}

/* Кнопка отправки */
#feedback_block .webform-button--submit {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 20px;
    background: var(--white);
    color: var(--blue);
    font-size: 16px;
    line-height: 120%;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#feedback_block .webform-button--submit:hover {
    background-color: #eef1f8;
}

/* ============================================
   ДЕКОРАТИВНЫЕ КРУГИ - между специалистами/галереей и на блоке обратной связи
   ============================================ */

/* Круг 1 - между "Наши специалисты" и "Галерея", прижат к левому краю страницы */
#specialists_block {
    position: relative;
    overflow: visible;
}

#specialists_block::after {
    content: '';
    position: absolute;
    left: -200px;
    bottom: -210px; /* половина высоты круга, чтобы он оказался в зазоре между блоками */
    width: 441px;
    height: 423px;
    background-image: url('/sites/all/themes/vesta_theme/image/dec.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
    z-index: 1;
    pointer-events: none;
}

/* Круг 2 - блок обратной связи, правый верхний угол, позади контента */
#feedback_block .block-block-contentcf6eb3b0-93c2-4b98-89e7-3eae0f3e58f4 {
    position: relative;
}

#feedback_block .block-block-contentcf6eb3b0-93c2-4b98-89e7-3eae0f3e58f4::after {
    content: '';
    position: absolute;
    right: -445px;
    top: -290px;
    width: 441px;
    height: 423px;
    background-image: url('/sites/all/themes/vesta_theme/image/dec.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: right center;
    z-index: 0; /* ниже, чем .feedback_content_bg (z-index: 0 у неё тоже - см. пояснение ниже) и .feedback_content_main (z-index: 1) */
    pointer-events: none;
}

/* ============================================
   FEEDBACK MODAL (Обратная связь)
   ============================================ */

/* Общий контейнер модалки */
.modal-content {
    border: none;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #2f4fa8 0%, #1a2f6e 100%);
    box-shadow: 0 30px 80px rgba(20, 40, 100, 0.35);
}

/* Шапка модалки */
.modal-content .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 32px 0;
    border-bottom: none;
    background: transparent;
}

.modal-content .modal-title {
    font-family: var(--second-family);
    font-weight: 400;
    font-size: 24px;
    line-height: 120%;
    color: var(--white);
    margin: 0;
}

/* Кнопка закрытия - белая иконка на прозрачном фоне */
.modal-content .btn-close {
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.12);
    background-image: none;
    position: relative;
    opacity: 1;
    transition: background-color 0.2s ease;
}

.modal-content .btn-close:hover {
    background-color: rgba(255, 255, 255, 0.22);
}

.modal-content .btn-close::before,
.modal-content .btn-close::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 2px;
    background-color: #ffffff;
}

.modal-content .btn-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.modal-content .btn-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Тело модалки */
.modal-content .modal-body {
    padding: 20px 32px 32px;
}

/* Скрываем стандартный alert со списком ошибок */
.modal-content .alert.alert-error {
    display: none;
}

/* Скрываем текстовые сообщения об ошибках под полями */
.modal-content .form-item--error-message {
    display: none;
}

.modal-content .js-form-item.form-item--error {
    margin: 0;
}

/* Форма - grid-раскладка, как на главной */
.modal-content .webform-submission-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.modal-content .js-form-item-name {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
}

.modal-content .js-form-item-phone {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
}

.modal-content .js-form-item-message {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
}

.modal-content .js-form-item-privacy {
    grid-column: 1 / -1;
    grid-row: 3;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
}

/* Скрываем оригинальную кнопку внутри формы (используется дублирующая в footer) */
.modal-content .form-actions {
    display: none;
}

/* Поля ввода - в стиле блока обратной связи на главной */
.modal-content .form-text,
.modal-content .form-textarea {
    width: 100%;
    padding: 14px 22px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 16px;
    line-height: 120%;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.modal-content .form-text::placeholder,
.modal-content .form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.modal-content .form-text:focus,
.modal-content .form-textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background-color: rgba(255, 255, 255, 0.16);
}

/* Ошибка - красная рамка вместо текста */
.modal-content .form-text.error,
.modal-content .form-textarea.error,
.modal-content .form-text[aria-invalid="true"],
.modal-content .form-textarea[aria-invalid="true"] {
    border-color: #ff5c5c;
    background-color: rgba(255, 92, 92, 0.1);
}

.modal-content .form-text.error::placeholder,
.modal-content .form-textarea.error::placeholder,
.modal-content .form-text[aria-invalid="true"]::placeholder,
.modal-content .form-textarea[aria-invalid="true"]::placeholder {
    color: rgba(255, 92, 92, 0.85);
}

.modal-content .form-textarea-wrapper textarea {
    resize: none;
    min-height: 90px;
}

/* Чекбокс согласия - тот же кастомный стиль, что и на главной */
.modal-content .form-checkbox {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    margin: 3px 0 0 0;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border: 1px solid var(--white);
    border-radius: 6px;
    background-color: transparent;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.modal-content .form-checkbox::after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid var(--blue);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.modal-content .form-checkbox:checked {
    background-color: var(--white);
    border-color: var(--white);
}

.modal-content .form-checkbox:checked::after {
    display: block;
}

.modal-content .form-checkbox.error,
.modal-content .form-checkbox[aria-invalid="true"] {
    border-color: #ff5c5c;
}

.modal-content .form-checkbox:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

.modal-content .js-form-item-privacy .description {
    font-weight: 500;
    font-size: 13px;
    line-height: 130%;
    color: rgba(255, 255, 255, 0.85);
}

.modal-content .js-form-item-privacy .description a {
    color: #ffffff;
    text-decoration: underline;
}

/* Футер модалки с видимой кнопкой отправки */
.modal-content .modal-footer {
    display: flex;
    padding: 0 32px 32px;
    border-top: none;
    background: transparent;
}

.modal-content .modal-footer .webform-button--submit {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 20px;
    background: var(--white);
    color: var(--blue);
    font-size: 16px;
    line-height: 120%;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.modal-content .modal-footer .webform-button--submit:hover {
    background-color: #eef1f8;
}

/* ============================================
   WEBFORM CONFIRMATION MODAL
   ============================================ */

.ui-front {
    z-index: 2000 !important;
}

.ui-dialog {
    z-index: 2000 !important;
    border: none !important;
    border-radius: 24px !important;
    overflow: hidden;
    background: linear-gradient(135deg, #2f4fa8 0%, #1a2f6e 100%) !important;
    box-shadow: 0 30px 80px rgba(20, 40, 100, 0.35) !important;
    padding: 0 !important;
    max-width: calc(100vw - 40px);
}

/* Затемнение самого jQuery UI Dialog - тоже выше Bootstrap backdrop */
.ui-widget-overlay {
    z-index: 1999 !important;
    background-color: rgba(20, 40, 100, 0.55) !important;
    opacity: 1 !important;
}

/* Шапка модалки */
.ui-dialog .ui-dialog-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 32px 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
}

.ui-dialog .ui-dialog-title {
    font-family: var(--second-family);
    font-weight: 400;
    font-size: 22px;
    line-height: 120%;
    color: #ffffff !important;
    padding: 0;
    margin: 0;
}

/* Кнопка закрытия */
.ui-dialog .ui-dialog-titlebar-close {
    position: relative !important;
    width: 36px;
    height: 36px;
    margin: 0 !important;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.12) !important;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.ui-dialog .ui-dialog-titlebar-close:hover {
    background-color: rgba(255, 255, 255, 0.22) !important;
}

.ui-dialog .ui-dialog-titlebar-close .ui-icon {
    display: none !important;
}

.ui-dialog .ui-dialog-titlebar-close::before,
.ui-dialog .ui-dialog-titlebar-close::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 2px;
    background-color: #ffffff;
}

.ui-dialog .ui-dialog-titlebar-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.ui-dialog .ui-dialog-titlebar-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Тело модалки */
.ui-dialog .ui-dialog-content,
.ui-dialog .webform-confirmation-modal--content {
    padding: 20px 32px 32px !important;
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 15px;
    line-height: 1.6;
}

/*SEARCH PAGE (страница /search/...) - чистый CSS, ограничен только этой страницей*/

#block-vesta-theme-content:has(.search-api-page-block-form-search) {
    padding: 20px 0;
}

/* Форма поиска */
#block-vesta-theme-content .search-api-page-block-form-search {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 560px;
    margin-bottom: 30px;
}

#block-vesta-theme-content .search-api-page-block-form-search .js-form-item-keys {
    flex: 1 1 auto;
    margin: 0;
}

#block-vesta-theme-content .search-api-page-block-form-search .form-search {
    width: 100%;
    padding: 14px 22px;
    border: 1px solid #e0e4ee;
    border-radius: 20px;
    background-color: #f4f6fb;
    color: var(--black);
    font-size: 16px;
    line-height: 120%;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

#block-vesta-theme-content .search-api-page-block-form-search .form-search::placeholder {
    color: #9098ad;
}

#block-vesta-theme-content .search-api-page-block-form-search .form-search:focus {
    outline: none;
    border-color: var(--blue);
    background-color: #ffffff;
}

#block-vesta-theme-content .search-api-page-block-form-search .form-actions {
    margin: 0;
    flex-shrink: 0;
}

#block-vesta-theme-content .search-api-page-block-form-search .search-form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border: none;
    border-radius: 20px;
    background: var(--blue);
    color: var(--white);
    font-size: 16px;
    line-height: 120%;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#block-vesta-theme-content .search-api-page-block-form-search .search-form__submit:hover {
    background-color: #2f4fa8;
}

/* Заголовок "Результаты поиска" */
#block-vesta-theme-content:has(.search-api-page-block-form-search) > h2 {
    font-family: var(--second-family);
    font-weight: 400;
    font-size: 28px;
    line-height: 110%;
    color: var(--black);
    margin: 0 0 8px 0;
}

/* Счётчик результатов */
#block-vesta-theme-content:has(.search-api-page-block-form-search) > p:has(+ h3),
#block-vesta-theme-content:has(.search-api-page-block-form-search) > h2 + p {
    font-size: 15px;
    color: #8a8fa3;
    margin: 0 0 32px 0;
}

/* Карточка результата поиска */
#block-vesta-theme-content:has(.search-api-page-block-form-search) h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    line-height: 1.3;
}

#block-vesta-theme-content:has(.search-api-page-block-form-search) h3 a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

#block-vesta-theme-content:has(.search-api-page-block-form-search) h3 a:hover {
    color: #1a2f6e;
    text-decoration: underline;
}

#block-vesta-theme-content:has(.search-api-page-block-form-search) h3 + p {
    margin: 0 0 28px 0;
    font-size: 15px;
    line-height: 1.6;
    color: #4a4a5a;
}

#block-vesta-theme-content:has(.search-api-page-block-form-search) h3 + p:empty {
    display: none;
}

/* ============================================
   CONTACTS PAGE
   ============================================ */

.contacts-page {
    padding: 60px 0 80px;
    background-color: #ffffff;
}

.contacts-page .front-h1 {
    font-family: var(--second-family);
    font-weight: 400;
    font-size: 50px;
    line-height: 110%;
    color: var(--black);
    margin: 0 0 40px 0;
}

/* Двухколоночная раскладка: контакты слева, карта справа */
.contacts-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
    align-items: stretch;
}

/* Колонка с карточками контактов */
.contacts-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px;
    background-color: #f4f6fb;
    border-radius: 20px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.contact-card:hover {
    background-color: #eef1f8;
    transform: translateY(-2px);
}

.contact-card img {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.contact-card__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.contact-card__label {
    font-size: 13px;
    color: #8a8fa3;
    font-weight: 500;
}

.contact-card__value {
    font-size: 16px;
    font-weight: 600;
    color: var(--black);
    text-decoration: none;
    line-height: 1.35;
    word-break: break-word;
    transition: color 0.2s ease;
}

a.contact-card__value:hover {
    color: var(--blue);
}

/* Карта */
.contacts-map {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    min-height: 100%;
    box-shadow: 0 20px 50px rgba(20, 40, 100, 0.1);
}

.contacts-map .region-map,
.contacts-map .block-block-content,
.contacts-map .mapContainer {
    width: 100%;
    height: 100%;
    position: relative;
}

.contacts-map .mapContainer {
    min-height: 460px !important;
    height: 100% !important;
}

.contacts-map iframe {
    width: 100%;
    height: 100%;
    min-height: 460px;
    border: none;
    display: block;
}

#page.not-front .wr_content {
    padding: 60px 0 80px;
}

/* ============================================
   MOBILE HEADER (#header-mob)
   ============================================ */

#header-mob {
    top: 0;
    width: 100%;
    background: #ffffff;
    color: var(--black);
    padding: 12px 16px;
    z-index: 50;
    box-shadow: 0 2px 12px rgba(20, 40, 100, 0.08);
}

#header-mob.toolbar-horizontal #header-mob {
    top: 0;
}

#header-mob > * {
    padding: 0;
}

/* --- Бургер-иконка навигации --- */
#header-mob .col-nav {
    flex-shrink: 0;
}

#header-mob .col-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background-color: #f4f6fb;
    transition: background-color 0.2s ease;
}

#header-mob .col-nav a:hover,
#header-mob .col-nav a:active {
    background-color: #eef1f8;
}

#header-mob .col-nav img {
    width: 20px;
    height: 20px;
    display: block;
}

/* --- Логотип --- */
#header-mob .col-logo {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
}

#header-mob .col-logo a {
    display: inline-flex;
    align-items: center;
}

#header-mob .col-logo img {
    max-height: 38px;
    width: auto;
    display: block;
}

/* --- Телефон --- */
#header-mob .col-phone {
    flex-shrink: 0;
}

#header-mob .col-phone .contact-item {
    display: flex;
    align-items: center;
}

#header-mob .col-phone a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--blue);
    color: transparent;
    font-size: 0;
    position: relative;
    transition: background-color 0.2s ease;
}

#header-mob .col-phone a:hover,
#header-mob .col-phone a:active {
    background-color: #234a85;
}

/* Иконка телефона внутри круглой кнопки */
#header-mob .col-phone a::before {
    content: '';
    width: 18px;
    height: 18px;
    background-image: url('/sites/all/themes/vesta_theme/image/phone.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: brightness(0) invert(1);
}

/* ============================================
   OFFCANVAS MOBILE MENU
   ============================================ */

.offcanvas {
    --bs-offcanvas-bg: #ffffff;
    --bs-offcanvas-width: 320px;
}

.offcanvas .offcanvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid #f0f2f7;
}

.offcanvas .logo img {
    max-height: 40px;
    width: auto;
}

.offcanvas .offcanvas-title {
    color: var(--black);
    text-transform: none;
    font-family: var(--second-family);
    font-size: 20px;
    font-weight: 400;
}

.offcanvas .btn-close {
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: #f4f6fb;
    background-image: none;
    opacity: 1;
    position: relative;
    transition: background-color 0.2s ease;
}

.offcanvas .btn-close:hover {
    background-color: #eef1f8;
}

.offcanvas .btn-close::before,
.offcanvas .btn-close::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 2px;
    background-color: var(--black);
}

.offcanvas .btn-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.offcanvas .btn-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.offcanvas .offcanvas-body {
    padding: 20px;
}

/* --- Навигация внутри offcanvas --- */
#offcanvasNav .nav {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#offcanvasNav .nav-item {
    width: 100%;
}

#offcanvasNav .nav-link {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--black);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

#offcanvasNav .nav-link:hover,
#offcanvasNav .nav-link.is-active,
#offcanvasNav .nav-link.active {
    background-color: #f4f6fb;
    color: var(--blue);
}

/* Первый пункт "Каталог услуг" - выделен как кнопка */
#offcanvasNav .nav > .nav-item:first-child > .nav-link {
    background: var(--blue);
    color: var(--white);
    margin-bottom: 8px;
}

#offcanvasNav .nav > .nav-item:first-child > .nav-link:hover {
    background: #5a8bd0;
}

/* Дропдаун-подменю в offcanvas */
#offcanvasNav .nav .dropdown-menu {
    display: none;
    position: static;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 4px 0 4px 14px;
    margin: 0 0 8px 0;
    border-bottom: 1px solid #f0f2f7;
}

#offcanvasNav .nav .dropdown-menu .nav-link {
    padding: 10px 14px;
    font-size: 15px;
    font-weight: 400;
}

#offcanvasNav li.nav-item {
    width: 100%;
}

/* --- Контактная информация в offcanvas --- */
#offcanvasNav .contact-item {
    padding: 16px 0;
    border-top: 1px solid #f0f2f7;
}

#offcanvasNav .contact-item-label {
    font-size: 12px;
    color: #8a8fa3;
    margin-bottom: 4px;
}

#offcanvasNav .contact-item-el {
    font-size: 15px;
    font-weight: 500;
    color: var(--black);
}

#offcanvasNav .contact-item-el a {
    color: var(--black);
    text-decoration: none;
    transition: color 0.2s ease;
}

#offcanvasNav .contact-item-el a:hover {
    color: var(--blue);
}

/* --- Соцсети/мессенджеры в offcanvas --- */
#offcanvasNav .msngrs {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

#offcanvasNav .msngrs .item a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 20px;
    background-color: #f4f6fb;
    color: var(--black);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

#offcanvasNav .msngrs .item a:hover {
    background-color: var(--blue);
    color: var(--white);
}

/* ============================================
   OFFCANVAS MOBILE MENU
   ============================================ */

.offcanvas {
    --bs-offcanvas-bg: #ffffff;
    --bs-offcanvas-width: 320px;
}

.offcanvas .offcanvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid #f0f2f7;
}

.offcanvas .logo img {
    max-height: 40px;
    width: auto;
}

.offcanvas .btn-close {
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: #f4f6fb;
    background-image: none;
    opacity: 1;
    position: relative;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.offcanvas .btn-close:hover {
    background-color: #eef1f8;
}

.offcanvas .btn-close::before,
.offcanvas .btn-close::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 2px;
    background-color: var(--black);
}

.offcanvas .btn-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.offcanvas .btn-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.offcanvas .offcanvas-body {
    padding: 20px;
}

/* --- Поиск --- */
#offcanvasNav .region-search {
    margin-bottom: 20px;
}

#offcanvasNav .search-api-page-block-form-search form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

#offcanvasNav .search-api-page-block-form-search .js-form-item-keys {
    flex: 1 1 auto;
    margin: 0;
}

#offcanvasNav .search-api-page-block-form-search .form-search {
    width: 100%;
    padding: 12px 18px;
    border: 1px solid #e0e4ee;
    border-radius: 20px;
    background-color: #f4f6fb;
    color: var(--black);
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

#offcanvasNav .search-api-page-block-form-search .form-search::placeholder {
    color: #9098ad;
}

#offcanvasNav .search-api-page-block-form-search .form-search:focus {
    outline: none;
    border-color: var(--blue);
    background-color: #ffffff;
}

#offcanvasNav .search-api-page-block-form-search .form-actions {
    margin: 0;
    flex-shrink: 0;
}

#offcanvasNav .search-form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border: none;
    border-radius: 20px;
    background: var(--blue);
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#offcanvasNav .search-form__submit:hover {
    background-color: #234a85;
}

/* --- Навигация --- */
#offcanvasNav .region-navigation {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f2f7;
}

#offcanvasNav .region-navigation .nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#offcanvasNav .region-navigation .nav-item {
    width: 100%;
}

#offcanvasNav .region-navigation .nav-link {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--black);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

#offcanvasNav .region-navigation .nav-link:hover,
#offcanvasNav .region-navigation .nav-link.is-active,
#offcanvasNav .region-navigation .nav-link.active {
    background-color: #f4f6fb;
    color: var(--blue);
}

/* Первый пункт "Каталог услуг" - выделен как кнопка */
#offcanvasNav .region-navigation .nav > .nav-item.dropdown:first-child > .nav-link {
    background: var(--blue);
    color: var(--white);
    margin-bottom: 4px;
}

#offcanvasNav .region-navigation .nav > .nav-item.dropdown:first-child > .nav-link:hover {
    background: #5a8bd0;
    color: var(--white);
}

/* Дропдаун-подменю "Каталог услуг" - раскрывается по клику (JS должен переключать .show) */
#offcanvasNav .nav .dropdown-menu {
    display: none;
    position: static;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 4px 0 8px 12px;
    margin: 0 0 4px 0;
    list-style: none;
}

#offcanvasNav .nav .dropdown-menu.show {
    display: block;
}

#offcanvasNav .nav .dropdown-menu .nav-item {
    border-bottom: 1px solid #f4f6fb;
}

#offcanvasNav .nav .dropdown-menu .nav-item:last-child {
    border-bottom: none;
}

#offcanvasNav .nav .dropdown-menu .dropdown-item {
    display: block;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 400;
    color: var(--gray);
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

#offcanvasNav .nav .dropdown-menu .dropdown-item:hover {
    background-color: #f4f6fb;
    color: var(--blue);
}

#offcanvasNav li.nav-item {
    width: 100%;
}

/* --- Телефон --- */
#offcanvasNav .contact-item {
    margin-bottom: 16px;
}

#offcanvasNav .contact-item-label {
    font-size: 12px;
    color: #8a8fa3;
    margin-bottom: 4px;
}

#offcanvasNav .contact-item-el {
    font-size: 17px;
    font-weight: 600;
}

#offcanvasNav .contact-item-el a {
    color: var(--black);
    text-decoration: none;
    transition: color 0.2s ease;
}

#offcanvasNav .contact-item-el a:hover {
    color: var(--blue);
}

/* --- Соцсети/мессенджеры --- */
#offcanvasNav .contact-item-label.w-100 {
    margin-bottom: 10px;
}

#offcanvasNav .msngrs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 4px;
}

#offcanvasNav .msngrs .item a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 20px;
    background-color: #f4f6fb;
    color: var(--black);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

#offcanvasNav .msngrs .item a:hover {
    background-color: var(--blue);
    color: var(--white);
}

/*FOOTER BLOCK*/



#footer.footer-wrap {
    background: var(--blue3);
    color: #ffffff;
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    padding-top: 45px;
    padding-bottom: 15px;
}

/* Основной ряд колонок */
#footer .footer-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
}

#footer .footer-col {
    flex: 0 0 auto;
}

/* Логотип */
#footer .footer-col-brand {
    flex-shrink: 0;
}

#footer .logo {
    margin-bottom: 20px;
}

#footer .logo a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

#footer .logo img {
    max-width: 210px;
    height: auto;
}

/* Копирайт */
#footer .copyright {
    font-weight: 400;
    font-size: 16px;
    line-height: 120%;
    color: var(--white);
    white-space: nowrap;
}

/* Навигация подвал - отступ 90px от логотипа */
#footer .col-footer-nav {
    margin-left: 90px;
}

#footer .col-footer-nav .nav,
#footer .col-footer-services .nav {
    flex-direction: column;
    padding: 0;
    margin: 0;
    list-style: none;
}

#footer .col-footer-nav .nav-item,
#footer .col-footer-services .nav-item {
    margin-bottom: 14px;
    white-space: nowrap;
}

#footer .col-footer-nav .nav-item:last-child,
#footer .col-footer-services .nav-item:last-child {
    margin-bottom: 0;
}

#footer .col-footer-nav .nav-link,
#footer .col-footer-services .nav-link {
    font-weight: 500;
    font-size: 16px;
    line-height: 120%;
    color: var(--white);
    text-decoration: none;
    padding: 0;
    transition: color 0.2s ease;
}

#footer .col-footer-nav .nav-link:hover,
#footer .col-footer-services .nav-link:hover,
#footer .col-footer-nav .nav-link.active,
#footer .col-footer-services .nav-link.active {
    color: var(--blue);
}

/* Услуги подвал - отступ 40px от навигации */
#footer .col-footer-services {
    margin-left: 110px;
}

/* Контакты - отступ 115px от услуг, прижаты к правому краю container */
#footer .col-footer-contacts {
    margin-left: 235px;
    margin-right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

#footer .col-footer-contacts a,
#footer .col-footer-contacts .col-address {
    display: flex;
    align-items: center;
    font-weight: 500;
    font-size: 16px;
    line-height: 120%;
    color: var(--white);
    text-decoration: none;
    margin-bottom: 8px;
    white-space: nowrap;
}

#footer .col-footer-contacts .col-address {
    margin-bottom: 0;
}

#footer .col-footer-contacts a:hover {
    color: var(--blue);
}

#footer .icon-phone,
#footer .icon-mail,
#footer .icon-address {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-right: 10px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

/* Нижняя строка - ссылки рядом друг с другом */
#footer .row-copiryght {
    margin-top: 72px;
}

#footer .footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 95px;
    flex-wrap: wrap;
}

#footer .footer-bottom-links a {
    font-size: 14px;
    line-height: 120%;
    color: var(--white);
    text-decoration: none;
    white-space: nowrap;
    padding: 0;
    transition: color 0.2s ease;
}

#footer .footer-bottom-links a:hover {
    color: var(--blue);
}


/* *** ADAPTIVE *** */
@media screen and (max-width: 1199px) {
}

@media screen and (max-width: 991px) {
    #offcanvasNav .nav .dropdown-menu {
        display: none;
        position: static;
        border: 0px solid;
        background: transparent;
        padding: 10px 0;
        border-bottom: 1px solid #BDBDBD;
    }

    #offcanvasNav li.nav-item {
        width: 100%;
    }
}

@media screen and (max-width: 767px) {
}

@media screen and (max-width: 576px) {
}

/* *** ADAPTIVE *** */

/* ============================================
   DESKTOP SMALL (до 1399px)
   ============================================ */
@media screen and (max-width: 1399px) {

    #services_block {
        padding: 60px 0;
    }

    #specialists_block {
        padding: 60px 0;
    }

    #gallery_block {
        padding-bottom: 60px;
    }

    /* Header top — сжимаем промежутки */
    #header .header-top .container > .d-flex {
        gap: 40px;
    }

    /* Footer — уменьшаем отступы между колонками */
    #footer .col-footer-nav {
        margin-left: 50px;
    }

    #footer .col-footer-services {
        margin-left: 50px;
    }

    #footer .col-footer-contacts {
        margin-left: auto;
    }

    #footer .footer-bottom-links {
        gap: 40px;
    }

    /* Promo — уменьшаем заголовок */
    #promo-block .field--name-field-promo-title h1,
    #promo-block .field--name-field-promo-title {
        font-size: 52px;
    }

    /* Декоративный круг promo — уменьшаем */
    #promo-block.promo-block::after {
        right: -200px;
        bottom: -300px;
        width: 400px;
        height: 384px;
    }
}

/* ============================================
   TABLET LANDSCAPE / SMALL DESKTOP (до 1199px)
   ============================================ */
@media screen and (max-width: 1199px) {

    /* Header top */
    #header .header-top .container > .d-flex {
        gap: 24px;
    }

    #header .col-address {
        font-size: 13px;
    }

    #header .col-contacts a {
        font-size: 13px;
    }

    #header .col-callback .btn,
    #header .col-callback a.btn-primary {
        padding: 12px 14px;
        font-size: 14px;
    }

    /* Navigation */
    #header .header-bottom {
        margin-left: 20px;
        margin-right: 20px;
    }

    #header .navigation .nav {
        gap: 4px;
    }

    #header .navigation .nav-link {
        font-size: 14px;
        padding: 10px 16px;
    }

    #header .navigation .nav-item:first-child .nav-link {
        padding: 0 40px 0 16px;
        font-size: 14px;
    }

    /* Promo */
    #promo-block .promo_bg {
        left: 20px;
        right: 20px;
    }

    #promo-block .promo_content {
        padding: 80px 0;
        max-width: 600px;
    }

    #promo-block .field--name-field-promo-title h1,
    #promo-block .field--name-field-promo-title {
        font-size: 44px;
        margin-bottom: 24px;
    }

    #promo-block .promo_content_center ul li {
        font-size: 17px;
    }

    #promo-block .promo_content_center {
        gap: 24px;
        margin-bottom: 24px;
    }

    /* Декоративный круг — скрываем */
    #promo-block.promo-block::after {
        display: none;
    }

    /* Services — 3 колонки, 3 карточки = ровно, показываем все */
    #services_block {
        padding: 45px 0;
    }

    #services_block .block-title {
        font-size: 38px;
    }

    #services_block .view-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    #services_block .field--name-field-service-title {
        font-size: 22px;
    }

    #services_block article.node--type-service {
        min-height: 190px;
    }

    #services_block .service_right img {
        width: 120px;
        max-height: 130px;
    }

    /* About */
    #about_block::before {
        width: calc(100vw - 40px);
        margin-left: calc(-50vw + 20px);
        border-radius: 30px;
    }

    #about_block .block-block-content306b5443-29da-43de-9b8d-bd306bba8419 {
        gap: 30px;
    }

    #about_block .field--name-field-about-title h2 {
        font-size: 38px;
    }

    #about_block .field--name-field-about-text p {
        font-size: 17px;
    }

    #about_block .field--name-field-about-image img {
        max-width: 420px;
    }

    #about_block .field--name-field-about-image-dec {
        left: -35px;
    }

    #about_block .field--name-field-about-image-dec img {
        max-width: 110px;
    }

    /* License */
    #about_block .block-block-content6a8c0ffc-279f-49aa-9d56-64d9287446a2 {
        padding: 24px 30px 0 24px;
        gap: 24px;
    }

    #about_block .field--name-field-license-title {
        font-size: 30px;
    }

    #about_block .field--name-field-license-text p {
        font-size: 16px;
    }

    #about_block .field--name-field-license-images .field__item img {
        max-width: 320px;
    }

    /* Specialists — 3 колонки, 4 карточки: 4%3=1 сирота → скрываем 4-ю */
    #specialists_block {
        padding: 45px 0;
    }

    #specialists_block .block-title {
        font-size: 38px;
    }

    #specialists_block .view-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    #specialists_block .view-content .views-row:nth-child(n+4) {
        display: none;
    }

    #specialists_block .field--name-field-specialist-photo {
        width: 150px;
        height: 150px;
    }

    #specialists_block .field--name-field-specialist-name {
        font-size: 18px;
        max-width: 210px;
    }

    /* Gallery — 3 колонки, 8 фото: 8%3=2 сироты → показываем 6 */
    #gallery_block {
        padding-bottom: 45px;
    }

    #gallery_block .block-title {
        font-size: 38px;
    }

    #gallery_block .field-content {
        /*grid-template-columns: repeat(3, 1fr);*/
        gap: 20px;
    }

    #gallery_block .field-content .photoswipe-gallery:nth-child(n+7) {
        display: none;
    }

    /* Feedback */
    #feedback_block .field--name-field-feedback-title {
        font-size: 24px;
    }

    /* Footer */
    #footer .footer-row {
        flex-wrap: wrap;
    }

    #footer .col-footer-nav {
        margin-left: 40px;
    }

    #footer .col-footer-services {
        margin-left: 40px;
    }

    #footer .col-footer-contacts {
        margin-left: auto;
    }

    #footer .row-copiryght {
        margin-top: 40px;
    }

    #footer .footer-bottom-links {
        gap: 30px;
    }

    /* Декоративный круг specialists */
    #specialists_block::after {
        width: 300px;
        height: 288px;
        left: -150px;
        bottom: -144px;
    }

    /* Contacts page */
    .contacts-page .front-h1 {
        font-size: 38px;
    }

    .contacts-layout {
        grid-template-columns: 320px 1fr;
        gap: 20px;
    }

    /* Catalog pages */
    #block-vesta-theme-content .view-content:has(article.node--type-service) {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    #block-vesta-theme-content .view-content:has(article.node--type-specialist) {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    #block-vesta-theme-content .field-content:has(.photoswipe-gallery) {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* ============================================
   TABLET PORTRAIT (до 991px)
   ============================================ */
@media screen and (max-width: 991px) {

    /* Promo */
    #promo-block .promo_bg {
        left: 16px;
        right: 16px;
        border-radius: 0 0 30px 30px;
    }

    #promo-block .promo_content {
        padding: 60px 0;
        max-width: 100%;
    }

    #promo-block .field--name-field-promo-title h1,
    #promo-block .field--name-field-promo-title {
        font-size: 36px;
        margin-bottom: 20px;
    }

    #promo-block .promo_content_center {
        flex-direction: column;
        gap: 16px;
        margin-bottom: 24px;
    }

    #promo-block .promo_content_center ul li {
        font-size: 16px;
    }

    /* Services — 2 колонки, 3 карточки: 3%2=1 сирота → показываем 2 */
    #services_block {
        padding: 30px 0;
    }

    #services_block .block-title {
        font-size: 32px;
    }

    #services_block .view-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    #services_block .view-content .views-row:nth-child(n+3) {
        display: none;
    }

    #services_block .field--name-field-service-title {
        font-size: 20px;
    }

    #services_block article.node--type-service {
        min-height: 170px;
    }

    #services_block .service_right img {
        width: 100px;
        max-height: 110px;
    }

    #services_block .field--name-field-service-btn a {
        font-size: 16px;
    }

    /* About */
    #about_block {
        padding: 30px 0;
    }

    #about_block::before {
        border-radius: 24px;
    }

    #about_block .block-block-content306b5443-29da-43de-9b8d-bd306bba8419 {
        flex-direction: column;
        gap: 30px;
        margin-bottom: 40px;
    }

    #about_block .about_left {
        flex: 0 0 auto;
        max-width: 100%;
    }

    #about_block .field--name-field-about-title h2 {
        font-size: 32px;
    }

    #about_block .field--name-field-about-text p {
        font-size: 16px;
    }

    #about_block .about_right {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    #about_block .field--name-field-about-image img {
        max-width: 100%;
        width: 100%;
        max-height: 360px;
    }

    #about_block .field--name-field-about-image-dec {
        left: -20px;
        top: auto;
        bottom: -30px;
        transform: none;
    }

    #about_block .field--name-field-about-image-dec img {
        max-width: 90px;
    }

    /* License */
    #about_block .block-block-content6a8c0ffc-279f-49aa-9d56-64d9287446a2 {
        flex-direction: column;
        padding: 24px 24px 0;
        min-height: auto;
        gap: 20px;
    }

    #about_block .license_left {
        flex: 0 0 auto;
        max-width: 100%;
    }

    #about_block .field--name-field-license-title {
        font-size: 26px;
    }

    #about_block .license_right {
        width: 100%;
        display: flex;
        justify-content: center;
        align-self: auto;
    }

    #about_block .field--name-field-license-images .field__item img {
        max-width: 100%;
        max-height: 220px;
    }

    /* Specialists — 2 колонки, 4 карточки: 4%2=0 → показываем ВСЕ */
    #specialists_block {
        padding: 30px 0;
    }

    #specialists_block .block-title {
        font-size: 32px;
    }

    #specialists_block .view-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    /* Сбрасываем скрытие из предыдущего брейкпоинта — показываем все 4 */
    #specialists_block .view-content .views-row:nth-child(n+4) {
        display: block;
    }

    #specialists_block .field--name-field-specialist-photo {
        width: 140px;
        height: 140px;
    }

    #specialists_block .field--name-field-specialist-name {
        font-size: 17px;
        max-width: 200px;
    }

    #specialists_block .field--name-field-specialist-experience {
        font-size: 14px;
    }

    #specialists_block article.node--type-specialist {
        padding: 22px 16px;
    }

    /* Декоративный круг specialists — скрываем */
    #specialists_block::after {
        display: none;
    }

    /* Gallery — 2 колонки, 8 фото: 8%2=0 → показываем ВСЕ */
    #gallery_block {
        padding-bottom: 30px;
    }

    #gallery_block .block-title {
        font-size: 32px;
    }

    #gallery_block .field-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    /* Сбрасываем скрытие из предыдущего брейкпоинта */
    #gallery_block .field-content .photoswipe-gallery:nth-child(n+7) {
        display: block;
    }

    /* Feedback */
    #feedback_block .feedback_content_bg {
        border-radius: 30px 30px 0 0;
    }

    #feedback_block .feedback_content_main {
        padding: 40px 0;
    }

    #feedback_block .field--name-field-feedback-title {
        font-size: 22px;
        max-width: 100%;
    }

    #feedback_block .field--name-field-feedback-text {
        max-width: 100%;
    }

    #feedback_block .field--name-field-feedback-form {
        max-width: 100%;
    }

    #feedback_block .webform-submission-form {
        grid-template-columns: 1fr;
    }

    #feedback_block .js-form-item-name {
        grid-column: 1;
        grid-row: 1;
    }

    #feedback_block .js-form-item-phone {
        grid-column: 1;
        grid-row: 2;
    }

    #feedback_block .js-form-item-message {
        grid-column: 1;
        grid-row: 3;
    }

    #feedback_block .js-form-item-privacy {
        grid-column: 1;
        grid-row: 4;
    }

    #feedback_block .form-actions {
        grid-column: 1;
        grid-row: 5;
    }

    /* Декоративный круг feedback — скрываем */
    #feedback_block .block-block-contentcf6eb3b0-93c2-4b98-89e7-3eae0f3e58f4::after {
        display: none;
    }

    /* Footer */
    #footer.footer-wrap {
        padding-top: 30px;
    }

    #footer .footer-row {
        flex-wrap: wrap;
        gap: 30px 0;
    }

    #footer .footer-col-brand {
        flex: 0 0 100%;
        display: flex;
        align-items: center;
        gap: 20px;
        margin-bottom: 10px;
    }

    #footer .logo {
        margin-bottom: 0;
    }

    #footer .col-social {
        margin-bottom: 0;
    }

    #footer .col-footer-nav {
        flex: 0 0 33%;
        margin-left: 0;
    }

    #footer .col-footer-services {
        flex: 0 0 33%;
        margin-left: 0;
    }

    #footer .col-footer-contacts {
        flex: 0 0 33%;
        margin-left: 0;
    }

    #footer .col-footer-contacts a,
    #footer .col-footer-contacts .col-address {
        font-size: 14px;
    }

    #footer .row-copiryght {
        margin-top: 30px;
    }

    #footer .footer-bottom-links {
        gap: 20px;
        justify-content: flex-start;
    }

    /* Contacts page */
    .contacts-page {
        padding: 40px 0 50px;
    }

    .contacts-page .front-h1 {
        font-size: 32px;
        margin-bottom: 24px;
    }

    .contacts-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contacts-info {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
    }

    .contact-card {
        flex: 1 1 calc(50% - 6px);
        min-width: 0;
        padding: 18px;
    }

    .contacts-map .mapContainer {
        min-height: 360px !important;
    }

    /* Product page */
    .product-teaser {
        flex-direction: column;
        gap: 30px;
    }

    .product-teaser .product-teaser-image {
        max-width: 100%;
    }

    .product-teaser .product-teaser-image .field.field--name-field-variation-image.field--type-image .elements .current-slide.slick-initialized.slick-slider .slick-list.draggable .slick-track .element.slick-slide img {
        max-width: 100%;
        min-width: 100%;
        max-height: 400px;
        min-height: 300px;
    }

    .product-teaser .product-teaser-info {
        max-width: 100%;
    }

    /* Not front padding */
    #page.not-front .wr_content {
        padding: 40px 0 50px;
    }

    /* Catalog pages */
    #block-vesta-theme-content .view-content:has(article.node--type-service) {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    #block-vesta-theme-content .view-content:has(article.node--type-specialist) {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    #block-vesta-theme-content .field-content:has(.photoswipe-gallery) {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    /* Single specialist page — фото меньше */
    #block-vesta-theme-content article.node--type-specialist:has(.field--name-field-specialist-info-on-page) .field--name-field-specialist-photo {
        width: 220px;
        margin-right: 24px;
    }

    /* Modal */
    .modal-content .webform-submission-form {
        grid-template-columns: 1fr;
    }

    .modal-content .js-form-item-name {
        grid-column: 1;
        grid-row: 1;
    }

    .modal-content .js-form-item-phone {
        grid-column: 1;
        grid-row: 2;
    }

    .modal-content .js-form-item-message {
        grid-column: 1;
        grid-row: 3;
    }

    .modal-content .js-form-item-privacy {
        grid-column: 1;
        grid-row: 4;
    }

    /* Offcanvas menu — dropdown toggle */
    #offcanvasNav .nav .dropdown-menu {
        display: none;
        position: static;
        border: 0px solid;
        background: transparent;
        padding: 10px 0;
        border-bottom: 1px solid #BDBDBD;
    }

    #offcanvasNav li.nav-item {
        width: 100%;
    }

    /* Заголовки страниц */
    #block-vesta-theme-page-title h1 {
        font-size: 32px;
    }
}

/* ============================================
   MOBILE LANDSCAPE / LARGE PHONE (до 767px)
   ============================================ */
@media screen and (max-width: 767px) {

    #footer .copyright {
        font-size: 14px;
    }

    /* Promo */
    #promo-block .promo_bg {
        left: 10px;
        right: 10px;
        border-radius: 0 0 24px 24px;
    }

    #promo-block .promo_content {
        padding: 40px 0;
    }

    #promo-block .field--name-field-promo-title h1,
    #promo-block .field--name-field-promo-title {
        font-size: 28px;
        margin-bottom: 16px;
    }

    #promo-block .promo_content_center ul li {
        font-size: 14px;
        margin-bottom: 4px;
    }

    #promo-block .promo_content_center ul li::before {
        top: 6px;
        width: 5px;
        height: 5px;
    }

    #promo-block .field--name-field-promo-btn-link a {
        font-size: 14px;
        padding: 10px 18px;
    }

    /* Services — 1 колонка, 3 карточки: 3%1=0 → показываем ВСЕ 3 */
    #services_block {
        padding: 20px 0;
    }

    #services_block .views-element-container {
        grid-template-columns: 1fr;
        row-gap: 20px;
    }

    #services_block .block-title {
        font-size: 28px;
        grid-column: 1;
    }

    #services_block .more-link {
        grid-column: 1;
        grid-row: 2;
        justify-self: start;
    }

    #services_block .view-content {
        grid-column: 1;
        grid-row: 3;
        /*grid-template-columns: 1fr;*/
        gap: 12px;
    }

    /* Сбрасываем скрытие из предыдущего брейкпоинта — все 3 видимы */
    #services_block .view-content .views-row:nth-child(n+3) {
        display: block;
    }

    #services_block article.node--type-service {
        min-height: 150px;
    }

    #services_block .field--name-field-service-title {
        font-size: 20px;
    }

    #services_block .service_right img {
        width: 90px;
        max-height: 100px;
    }

    /* About */
    #about_block {
        padding: 20px 0;
    }

    #about_block::before {
        width: calc(100vw - 20px);
        margin-left: calc(-50vw + 10px);
        border-radius: 20px;
    }

    #about_block .field--name-field-about-title h2 {
        font-size: 28px;
        margin-bottom: 16px;
    }

    #about_block .field--name-field-about-text p {
        font-size: 15px;
    }

    #about_block .block-block-content306b5443-29da-43de-9b8d-bd306bba8419 {
        margin-bottom: 30px;
        gap: 24px;
    }

    #about_block .field--name-field-about-image img {
        max-height: 280px;
    }

    #about_block .field--name-field-about-image-dec {
        left: -10px;
        bottom: -20px;
    }

    #about_block .field--name-field-about-image-dec img {
        max-width: 70px;
    }

    /* License */
    #about_block .block-block-content6a8c0ffc-279f-49aa-9d56-64d9287446a2 {
        padding: 20px 20px 0;
        border-radius: 20px;
        gap: 16px;
    }

    #about_block .field--name-field-license-title {
        font-size: 22px;
        margin-bottom: 12px;
    }

    #about_block .field--name-field-license-text p {
        font-size: 14px;
        margin-bottom: 20px;
    }

    #about_block .license_left {
        padding-bottom: 20px;
    }

    #about_block .field--name-field-license-link a {
        padding: 12px 18px;
        font-size: 14px;
    }

    #about_block .field--name-field-license-images .field__item img {
        max-height: 180px;
    }

    /* Specialists — 2 колонки, 4 карточки: 4%2=0 → показываем ВСЕ */
    #specialists_block {
        padding: 20px 0;
    }

    #specialists_block .views-element-container {
        grid-template-columns: 1fr;
        row-gap: 20px;
    }

    #specialists_block .block-title {
        font-size: 28px;
        grid-column: 1;
    }

    #specialists_block .more-link {
        grid-column: 1;
        grid-row: 2;
        justify-self: start;
    }

    #specialists_block .view-content {
        grid-column: 1;
        grid-row: 3;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    #specialists_block .field--name-field-specialist-photo {
        width: 120px;
        height: 120px;
    }

    #specialists_block .field--name-field-specialist-name {
        font-size: 16px;
        max-width: 190px;
    }

    #specialists_block .field--name-field-specialist-experience {
        font-size: 13px;
    }

    #specialists_block .field--name-field-specialist-btn a {
        padding: 10px 16px;
        font-size: 14px;
    }

    #specialists_block article.node--type-specialist {
        padding: 20px 14px;
    }

    /* Gallery — 2 колонки, 8 фото: 8%2=0 → показываем ВСЕ */
    #gallery_block {
        padding-bottom: 20px;
    }

    #gallery_block .views-element-container {
        grid-template-columns: 1fr;
        row-gap: 20px;
    }

    #gallery_block .block-title {
        font-size: 28px;
        grid-column: 1;
    }

    #gallery_block .more-link {
        grid-column: 1;
        grid-row: 2;
        justify-self: start;
    }

    #gallery_block .view-content {
        grid-column: 1;
        grid-row: 3;
    }

    #gallery_block .field-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* Feedback */
    #feedback_block .feedback_content_bg {
        border-radius: 24px 24px 0 0;
    }

    #feedback_block .feedback_content_main {
        padding: 30px 0;
    }

    #feedback_block .field--name-field-feedback-title {
        font-size: 20px;
        margin-bottom: 8px;
    }

    #feedback_block .field--name-field-feedback-text p {
        font-size: 14px;
    }

    #feedback_block .form-text,
    #feedback_block .form-textarea {
        padding: 12px 16px;
        font-size: 14px;
    }

    #feedback_block .webform-button--submit {
        padding: 12px 20px;
        font-size: 14px;
    }

    #footer .footer-row {
        display: flex;
        flex-wrap: wrap;
    }

    /* Бренд-блок — на всю ширину, сверху */
    #footer .footer-col-brand {
        flex: 0 0 100%;
        width: 100%;
        align-items: center;
        gap: 12px;
        order: 1;
    }

    /* Навигация и услуги — рядом, по 50% */
    #footer .col-footer-nav,
    #footer .col-footer-services {
        flex: 0 0 50%;
        width: 50%;
        max-width: 50%;
        box-sizing: border-box;
    }

    #footer .col-footer-nav {
        order: 2;
    }

    #footer .col-footer-services {
        order: 3;
        padding-right: 10px;
    }

    #footer .col-footer-nav .nav.navbar-nav,
    #footer .col-footer-services .nav.navbar-nav {
        width: 100%;
        display: block; /* убираем возможный flex/grid, который растягивал список */
    }

    #footer .col-footer-nav .nav-link,
    #footer .col-footer-services .nav-link {
        font-size: 14px;
        white-space: normal;
    }

    #footer .col-footer-nav .nav-item,
    #footer .col-footer-services .nav-item {
        margin-bottom: 10px;
    }

    /* Контакты — на всю ширину, снизу */
    #footer .col-footer-contacts {
        flex: 0 0 100%;
        width: 100%;
        margin-top: 10px;
        flex-direction: column;
        gap: 8px;
    }

    #footer .col-footer-contacts a,
    #footer .col-footer-contacts .col-address {
        font-size: 13px;
        margin-bottom: 0;
    }

    #footer .row-copiryght {
        margin-top: 20px;
    }

    #footer .footer-bottom-links {
        gap: 12px;
        flex-direction: column;
        align-items: flex-start;
    }

    #footer .footer-bottom-links a {
        font-size: 13px;
    }

    /* Contacts page */
    .contacts-page {
        padding: 30px 0 40px;
    }

    .contacts-page .front-h1 {
        font-size: 28px;
        margin-bottom: 20px;
    }

    /*.contacts-info {*/
    /*    flex-direction: column;*/
    /*}*/

    .contact-card {
        flex: 1 1 100%;
        padding: 16px;
        gap: 14px;
    }

    .contact-card__value {
        font-size: 15px;
    }

    .contacts-map .mapContainer {
        min-height: 280px !important;
    }

    .contacts-map iframe {
        min-height: 280px;
    }

    /* Not front padding */
    #page.not-front .wr_content {
        padding: 30px 0 40px;
    }

    /* Catalog pages */
    #block-vesta-theme-content .view-content:has(article.node--type-service) {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    #block-vesta-theme-content .view-content:has(article.node--type-specialist) {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    #block-vesta-theme-content .field-content:has(.photoswipe-gallery) {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* Single specialist page */
    #block-vesta-theme-content article.node--type-specialist:has(.field--name-field-specialist-info-on-page) .field--name-field-specialist-photo {
        float: none;
        width: 100%;
        max-width: 280px;
        margin: 0 auto 24px;
        display: block;
    }

    /* Single service page */
    #block-vesta-theme-content .field--name-field-service-info-on-page {
        font-size: 15px;
    }

    /* Search page */
    #block-vesta-theme-content .search-api-page-block-form-search {
        flex-direction: column;
        max-width: 100%;
    }

    #block-vesta-theme-content .search-api-page-block-form-search .js-form-item-keys {
        width: 100%;
    }

    #block-vesta-theme-content .search-api-page-block-form-search .form-actions {
        width: 100%;
    }

    #block-vesta-theme-content .search-api-page-block-form-search .search-form__submit {
        width: 100%;
    }

    /* Page title */
    #block-vesta-theme-page-title h1 {
        font-size: 28px;
    }

    /* Scroll to top */
    #scrollToTop {
        right: 20px;
        bottom: 80px;
        width: 40px;
        height: 40px;
    }

    /* Product images */
    .product-teaser .product-teaser-image .field.field--name-field-variation-image.field--type-image .elements .nav-slide.slick-initialized.slick-slider .slick-list.draggable .slick-track .element.slick-slide {
        max-width: 80px;
        min-width: 80px;
        max-height: 80px;
        min-height: 80px;
    }

    .product-teaser .product-teaser-image .field.field--name-field-variation-image.field--type-image .elements .nav-slide.slick-initialized.slick-slider .slick-list.draggable .slick-track .element.slick-slide img {
        max-width: 80px;
        min-width: 80px;
        max-height: 80px;
        min-height: 80px;
    }

    /* UI Dialog */
    .ui-dialog {
        max-width: calc(100% - 30px);
    }

    .ui-dialog .ui-dialog-titlebar {
        padding: 20px 20px 0 !important;
    }

    .ui-dialog .ui-dialog-content,
    .ui-dialog .webform-confirmation-modal--content {
        padding: 16px 20px 24px !important;
    }

    .ui-dialog .ui-dialog-title {
        font-size: 18px;
    }
}

#header .col-social .social-vk,
#header .col-social .social-max,
.footer-wrap .col-social .social-vk,
.footer-wrap .col-social .social-max {
    flex-shrink: 0;
}

#header .col-social .icon-vk,
#header .col-social .icon-max,
.footer-wrap .col-social .icon-vk,
.footer-wrap .col-social .icon-max {
    width: 34px;
    height: 34px;
    max-width: none;
    flex-shrink: 0;
}

/* ============================================
   MOBILE PORTRAIT (до 576px)
   ============================================ */
@media screen and (max-width: 576px) {

    /* Promo */
    #promo-block .promo_bg {
        left: 0;
        right: 0;
        border-radius: 0 0 20px 20px;
    }

    #promo-block .promo_content {
        padding: 32px 0;
    }

    #promo-block .field--name-field-promo-title h1,
    #promo-block .field--name-field-promo-title {
        font-size: 24px;
        margin-bottom: 14px;
    }

    #promo-block .promo_content_center ul li {
        font-size: 13px;
        padding-left: 8px;
    }

    #promo-block .promo_content_center ul li::before {
        top: 5px;
        width: 4px;
        height: 4px;
    }

    #promo-block .field--name-field-promo-btn-link a {
        font-size: 13px;
        padding: 10px 16px;
        border-radius: 16px;
    }

    /* Services — 1 колонка, 3 карточки: все помещаются */
    #services_block {
        padding: 15px 0;
    }

    #services_block .block-title {
        font-size: 24px;
    }

    #services_block .more-link a {
        font-size: 14px;
        padding: 10px 16px;
    }

    #services_block .view-content {
        /*grid-template-columns: 1fr;*/
        gap: 10px;
    }

    #services_block article.node--type-service {
        min-height: 140px;
        border-radius: 20px;
    }

    #services_block article.node--type-service .node__content {
        padding: 18px;
    }

    #services_block .field--name-field-service-title {
        font-size: 18px;
    }

    #services_block .field--name-field-service-btn a {
        font-size: 14px;
    }

    #services_block .service_right img {
        width: 80px;
        max-height: 90px;
    }

    /* About */
    #about_block {
        padding: 24px 0;
    }

    #about_block::before {
        width: 100vw;
        margin-left: -50vw;
        border-radius: 16px;
        background-size: 300px auto, 300px auto, auto;
    }

    #about_block .block-block-content306b5443-29da-43de-9b8d-bd306bba8419 {
        gap: 20px;
        margin-bottom: 24px;
    }

    #about_block .field--name-field-about-title h2 {
        font-size: 24px;
        margin-bottom: 12px;
    }

    #about_block .field--name-field-about-text p {
        font-size: 14px;
    }

    #about_block .field--name-field-about-link a {
        padding: 12px 18px;
        font-size: 14px;
        border-radius: 16px;
    }

    #about_block .field--name-field-about-image img {
        max-height: 240px;
        border-radius: 16px;
    }

    #about_block .field--name-field-about-image-dec {
        display: none;
    }

    /* License */
    #about_block .block-block-content6a8c0ffc-279f-49aa-9d56-64d9287446a2 {
        padding: 18px 16px 0;
        border-radius: 16px;
    }

    #about_block .field--name-field-license-title {
        font-size: 20px;
        margin-bottom: 10px;
    }

    #about_block .field--name-field-license-text p {
        font-size: 13px;
        margin-bottom: 16px;
    }

    #about_block .field--name-field-license-link a {
        padding: 10px 16px;
        font-size: 13px;
        border-radius: 16px;
    }

    #about_block .license_left {
        padding-bottom: 16px;
    }

    #about_block .field--name-field-license-images .field__item img {
        max-height: 150px;
    }

    /* Specialists — 2 колонки, 4 карточки: 4%2=0 → показываем ВСЕ */
    #specialists_block {
        padding: 15px 0;
    }

    #specialists_block .block-title {
        font-size: 24px;
    }

    #specialists_block .more-link a {
        font-size: 14px;
        padding: 10px 16px;
    }

    #specialists_block .view-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    #specialists_block article.node--type-specialist {
        padding: 16px 12px;
        border-radius: 16px;
    }

    #specialists_block article.node--type-specialist::before {
        border-radius: 16px;
    }

    #specialists_block .field--name-field-specialist-photo {
        width: 100px;
        height: 100px;
        margin-bottom: 12px;
    }

    #specialists_block .field--name-field-specialist-name {
        font-size: 14px;
        margin-bottom: 4px;
        max-width: 150px;
    }

    #specialists_block .field--name-field-specialist-experience {
        font-size: 12px;
        margin-bottom: 10px;
    }

    #specialists_block .field--name-field-specialist-btn a {
        padding: 8px 14px;
        font-size: 13px;
        border-radius: 14px;
    }

    /* Gallery — 2 колонки, 8 фото: 8%2=0 → показываем ВСЕ */
    #gallery_block {
        padding-bottom: 15px;
    }

    #gallery_block .block-title {
        font-size: 24px;
    }

    #gallery_block .more-link a {
        font-size: 14px;
        padding: 10px 16px;
    }

    #gallery_block .field-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    #gallery_block .photoswipe-gallery {
        border-radius: 16px;
    }

    /* Feedback */
    #feedback_block .feedback_content_bg {
        border-radius: 20px 20px 0 0;
    }

    #feedback_block .feedback_content_main {
        padding: 24px 0;
    }

    #feedback_block .field--name-field-feedback-title {
        font-size: 18px;
        margin-bottom: 6px;
    }

    #feedback_block .field--name-field-feedback-text {
        margin-bottom: 16px;
    }

    #feedback_block .field--name-field-feedback-text p {
        font-size: 13px;
    }

    #feedback_block .form-text,
    #feedback_block .form-textarea {
        padding: 10px 14px;
        font-size: 13px;
        border-radius: 16px;
    }

    #feedback_block .js-form-item-privacy .description {
        font-size: 12px;
    }

    #feedback_block .webform-button--submit {
        padding: 12px 16px;
        font-size: 14px;
        border-radius: 16px;
    }

    #feedback_block .form-checkbox {
        width: 20px;
        height: 20px;
    }

    #feedback_block .form-checkbox::after {
        left: 5px;
        top: 1px;
        width: 6px;
        height: 10px;
    }

    /* Footer */
    #footer.footer-wrap {
        padding-top: 24px;
        padding-bottom: 12px;
    }

    #footer .footer-col-brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    #footer .logo img {
        max-width: 160px;
    }

    #footer .col-footer-nav,
    #footer .col-footer-services {
        flex: 0 0 50%;
    }

    #footer .col-footer-nav .nav-link,
    #footer .col-footer-services .nav-link {
        font-size: 13px;
    }

    #footer .col-footer-nav .nav-item,
    #footer .col-footer-services .nav-item {
        margin-bottom: 8px;
    }

    #footer .col-footer-contacts {
        flex-direction: column;
        gap: 6px;
    }

    #footer .col-footer-contacts a,
    #footer .col-footer-contacts .col-address {
        font-size: 12px;
    }

    #footer .icon-phone,
    #footer .icon-mail,
    #footer .icon-address {
        width: 16px;
        height: 16px;
        margin-right: 6px;
    }

    #footer .row-copiryght {
        margin-top: 20px;
    }

    #footer .footer-bottom-links a {
        font-size: 12px;
    }

    /* Contacts page */
    .contacts-page {
        padding: 24px 0 32px;
    }

    .contacts-page .front-h1 {
        font-size: 24px;
        margin-bottom: 16px;
    }

    .contact-card {
        padding: 14px;
        gap: 12px;
        border-radius: 16px;
    }

    .contact-card img {
        width: 22px;
        height: 22px;
    }

    .contact-card__label {
        font-size: 12px;
    }

    .contact-card__value {
        font-size: 14px;
    }

    .contacts-map {
        border-radius: 16px;
    }

    .contacts-map .mapContainer {
        min-height: 240px !important;
    }

    .contacts-map iframe {
        min-height: 240px;
    }

    /* Not front padding */
    #page.not-front .wr_content {
        padding: 24px 0 32px;
    }

    /* Catalog pages */
    #block-vesta-theme-content .view-content:has(article.node--type-service) {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    #block-vesta-theme-content article.node--type-service:has(.service_left) {
        min-height: 140px;
        border-radius: 20px;
    }

    #block-vesta-theme-content .view-content:has(article.node--type-specialist) {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    #block-vesta-theme-content article.node--type-specialist:has(.field--name-field-specialist-name) {
        border-radius: 16px;
        padding: 16px 12px;
    }

    #block-vesta-theme-content article.node--type-specialist:has(.field--name-field-specialist-name)::before {
        border-radius: 16px;
    }

    #block-vesta-theme-content article.node--type-specialist:has(.field--name-field-specialist-name) .field--name-field-specialist-photo {
        width: 100px;
        height: 100px;
    }

    #block-vesta-theme-content .field-content:has(.photoswipe-gallery) {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    #block-vesta-theme-content .photoswipe-gallery {
        border-radius: 16px;
    }

    /* Single specialist page */
    #block-vesta-theme-content article.node--type-specialist:has(.field--name-field-specialist-info-on-page) .field--name-field-specialist-photo {
        max-width: 100%;
    }

    #block-vesta-theme-content article.node--type-specialist:has(.field--name-field-specialist-info-on-page) .field--name-field-specialist-photo img {
        border-radius: 16px;
    }

    #block-vesta-theme-content .field--name-field-specialist-info-on-page {
        font-size: 14px;
    }

    /* Single service page */
    #block-vesta-theme-content .field--name-field-service-info-on-page {
        font-size: 14px;
    }

    /* Page title */
    #block-vesta-theme-page-title h1 {
        font-size: 24px;
    }

    #block-vesta-theme-page-title:has(+ #block-vesta-theme-content .field--name-field-service-info-on-page) h1 {
        font-size: 28px;
    }

    /* Search page */
    #block-vesta-theme-content:has(.search-api-page-block-form-search) > h2 {
        font-size: 22px;
    }

    #block-vesta-theme-content:has(.search-api-page-block-form-search) h3 {
        font-size: 17px;
    }

    /* Modal */
    .modal-content .modal-header {
        padding: 20px 20px 0;
    }

    .modal-content .modal-title {
        font-size: 20px;
    }

    .modal-content .modal-body {
        padding: 16px 20px 24px;
    }

    .modal-content .modal-footer {
        padding: 0 20px 24px;
    }

    .modal-content .form-text,
    .modal-content .form-textarea {
        padding: 12px 16px;
        font-size: 14px;
        border-radius: 16px;
    }

    .modal-content .form-checkbox {
        width: 20px;
        height: 20px;
    }

    .modal-content .form-checkbox::after {
        left: 5px;
        top: 1px;
        width: 6px;
        height: 10px;
    }

    .modal-content .js-form-item-privacy .description {
        font-size: 12px;
    }

    .modal-content .modal-footer .webform-button--submit {
        font-size: 14px;
        padding: 12px 20px;
        border-radius: 16px;
    }

    /* Scroll to top */
    #scrollToTop {
        right: 12px;
        bottom: 70px;
        width: 36px;
        height: 36px;
    }

    /* Slick arrows */
    button.slick-prev.slick-arrow {
        left: 10px;
    }

    button.slick-next.slick-arrow {
        right: 10px;
    }

    button.slick-arrow,
    button.slick-arrow::before {
        width: 24px;
        height: 24px;
    }

    /* Mobile header fine-tuning */
    #header-mob {
        padding: 10px 12px;
    }

    #header-mob .col-logo img {
        max-height: 32px;
    }

    #header-mob .col-nav a,
    #header-mob .col-phone a {
        width: 36px;
        height: 36px;
    }

    /* Offcanvas */
    .offcanvas {
        --bs-offcanvas-width: 290px;
    }

    .offcanvas .offcanvas-header {
        padding: 16px 16px 12px;
    }

    .offcanvas .offcanvas-body {
        padding: 16px;
    }

    #offcanvasNav .region-navigation .nav-link {
        font-size: 15px;
        padding: 10px 12px;
    }

    #offcanvasNav .search-api-page-block-form-search .form-search {
        padding: 10px 14px;
        font-size: 14px;
    }

    #offcanvasNav .search-form__submit {
        padding: 10px 14px;
        font-size: 13px;
    }

    #offcanvasNav .nav .dropdown-menu .dropdown-item {
        font-size: 13px;
        padding: 8px 10px;
    }
}

/* ============================================
   VERY SMALL MOBILE (до 400px)
   ============================================ */
@media screen and (max-width: 400px) {

    #services_block .view-content {
         grid-template-columns: 1fr;
        gap: 10px;
    }

    /* Promo */
    #promo-block .field--name-field-promo-title h1,
    #promo-block .field--name-field-promo-title {
        font-size: 20px;
    }

    #promo-block .promo_content_center ul li {
        font-size: 12px;
    }

    /* Services — 1 колонка, 3 items: 3%1=0 → показываем ВСЕ */
    #services_block .block-title {
        font-size: 22px;
    }

    /* About */
    #about_block .field--name-field-about-title h2 {
        font-size: 22px;
    }

    #about_block .field--name-field-about-text p {
        font-size: 13px;
    }

    #about_block .field--name-field-license-title {
        font-size: 18px;
    }

    /* Specialists — 1 колонка, 4 items: 4%1=0 → показываем ВСЕ */
    #specialists_block .view-content {
        /*grid-template-columns: 1fr;*/
    }

    #specialists_block .block-title {
        font-size: 22px;
    }

    #specialists_block article.node--type-specialist {
        padding: 20px 16px;
    }

    #specialists_block .field--name-field-specialist-photo {
        width: 120px;
        height: 120px;
    }

    #specialists_block .field--name-field-specialist-name {
        font-size: 16px;
        max-width: 97px;
    }

    #specialists_block .field--name-field-specialist-experience {
        font-size: 13px;
    }

    /* Gallery — 1 колонка, 8 items: 8%1=0 → показываем ВСЕ */
    #gallery_block .field-content {
        /*grid-template-columns: 1fr;*/
        gap: 10px;
    }

    #gallery_block .block-title {
        font-size: 22px;
    }

    /* Footer */
    #footer .col-footer-nav,
    #footer .col-footer-services {
        flex: 0 0 100%;
    }

    #footer .col-footer-services {
        margin-top: 0;
    }

    #footer .col-footer-nav .nav-link,
    #footer .col-footer-services .nav-link {
        font-size: 13px;
    }

    /* Contacts */
    .contacts-page .front-h1 {
        font-size: 22px;
    }

    /* Catalog pages */
    #block-vesta-theme-content .view-content:has(article.node--type-specialist) {
        grid-template-columns: 1fr;
    }

    #block-vesta-theme-content .field-content:has(.photoswipe-gallery) {
        grid-template-columns: 1fr;
    }

    /* Feedback */
    #feedback_block .field--name-field-feedback-title {
        font-size: 16px;
    }

    /* Page title */
    #block-vesta-theme-page-title h1 {
        font-size: 22px;
    }
}
