/*
Theme Name: centertools
*/

/* #region Main Settings */

:root {
    --primary-blue: #35398E;
    --primary-red: #8B0000;
    --primary-blue-light: #4a90e2;
    --primary-red-light: #A52A2A;
    --black: #000000;
    --white: #ffffff;
    --gray-light: #666666;
    --gray-light-2: #3e3e3e;
    --gray-dark: #333333;
    --background-white: #ecf0f1;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.grecaptcha-badge {
    display: none !important;
}

.container {
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.page-title {
    font-size: 28px;
    font-weight: 300;
    color: var(--black);
    margin: 0 0 8px 0;
    line-height: 1.2;
}

@media (max-width: 400px) {
    .page-title {
        font-size: 24px;
    }
}

/* Общие стили для всех страниц (кроме главной) */
.centertools-page-main {
    padding-top: 15px;
    background-color: var(--background-white);
}

.centertools-page-main .container {
    padding-left: 0;
    padding-right: 0;
}

@media (max-width: 1200px) {
    .centertools-page-main {
        padding: 15px 20px 20px 20px;
    }
}

/* Стили для page-header (выводится через centertools_page_header()) */
.page-header {
    margin-bottom: 0;
}

/* Стили для breadcrumbs (хлебные крошки) */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    color: var(--gray-light);
    margin-left: 1px;
    font-weight: 300;
    
}

.breadcrumb-link {
    color: var(--gray-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: var(--gray-dark);
}

.breadcrumb-separator {
    color: var(--gray-light);
}

.breadcrumb-current {
    text-decoration: underline;
}

@media (max-width: 400px) {
    .breadcrumbs {
        font-size: 14px;
    }
}

/* #endregion */

/* #region Header */

/* Header Styles */
.dynamic-header {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.header-top {
    width: 100%;
    height: auto;
    background-color: var(--white);
    display: flex;
    flex-direction: row;
    padding-top: 10px;
    padding-bottom: 10px;
}

.dynamic-header .container {
    display: flex;
    flex-direction: row;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.header-logo-wrapper {
    display: flex;
    align-items: center;
    transition: opacity 0.3s;
}

.header-logo-wrapper:hover {
    opacity: 0.8;
    transition: opacity 0.3s;
    cursor: pointer;
}

.header-logo {
    height: 65px;
    width: auto;
    object-fit: contain;
}

.header-logo img {
    max-height: 65px;
    width: auto;
    object-fit: contain;
}

.header-wrapper {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.header-title {
    background-color: var(--white);
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-title h1 {
    font-size: 16px;
    font-weight: 500;
    color: var(--black);
    text-align: center;
}

.header-contacts {
    height: auto;
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.contact-icon {
    display: flex;
    color: var(--primary-blue);
    font-size: 24px;
    padding-right: 8px;
}

.contact-arrow {
    display: flex;
    color: var(--black);
    font-size: 16px;
    margin-left: 5px;
    cursor: pointer;
}

.contact-arrow:hover {
    transition: color 0.3s;
    color: var(--primary-blue);
    cursor: pointer;
}

.contact-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    padding: 8px 0;
    margin-top: 5px;
    min-width: 180px;
    display: none;
    z-index: 1000;
}

.contact-item.contact-dropdown-open .contact-dropdown {
    display: block;
}

.contact-item.contact-dropdown-open .contact-arrow i {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

.contact-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    color: var(--black);
    transition: background-color 0.2s ease, color 0.2s ease;
    font-size: 14px;
}

.contact-dropdown-item span {
    text-decoration: underline;
}

.contact-dropdown-item i {
    color: var(--primary-blue);
    font-size: 20px;
    text-decoration: none;
}

.contact-dropdown-item:hover {
    background-color: #f5f5f5;
}

.contact-dropdown-item:hover span {
    color: var(--primary-blue);
}

.contact-text a {
    display: flex;
    color: var(--black);
    text-decoration: underline;
    font-size: 15px;
    font-weight: 400;
    transition: color 0.3s;
}

.contact-text a:hover {
    transition: color 0.3s;
    color: var(--primary-blue);
    cursor: pointer;
}

.call-button {
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    padding: 7px 15px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    transition: background-color 0.3s;
}

.call-button:hover {
    background-color: var(--primary-red-light);
}

.header-login {
    width: auto;
    height: 100%;
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-link {
    display: flex;
    flex-direction: column;
    color: var(--black);
    text-decoration: none;
    font-weight: 400;
    font-size: 14px;
    align-items: center;
}

.login-text {
    text-decoration: underline;
}

.login-link:hover {
    transition: color 0.3s;
    color: var(--primary-blue);
    cursor: pointer;
}

.login-icon i {
    font-size: 46px;
    font-weight: 400;
    color: var(--primary-blue);
}

.header-bottom {
    width: 100%;
    background-color: var(--primary-blue);
}

.header-bottom .container {
    display: flex;
    align-items: center;
    justify-content: stretch;
    height: 100%;
}

.nav-catalog-container {
    position: relative;
    flex: 0 0 280px;
    height: 100%;
    overflow: visible;
}

.nav-catalog {
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-size: 16px;
    font-weight: 300;
    cursor: pointer;
    height: 100%;
    padding: 15px 0px;
    box-sizing: border-box;
}

.nav-catalog:hover {
    opacity: 0.7;
    transition: opacity 0.3s;
}

.nav-catalog i {
    font-size: 24px;
    padding-left: 10px;
}

/* Всплывающее меню для каталога */
.nav-catalog-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--gray-dark);
    /* border-radius: 0 0 8px 8px; */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    margin-top: 0;
    transition-delay: 0s;
    display: none;
    overflow: visible;
}

/* Показываем меню каталога при активном состоянии */
.nav-catalog-container.catalog-menu-open .nav-catalog-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s;
    display: block;
}

.nav-catalog-dropdown-links {
    padding-top: 6px;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    list-style: none;
    margin: 0;
    position: relative;
    overflow: visible;
}

/* Padding-bottom для всех страниц кроме главной */
body:not([data-page="home"]) .nav-catalog-dropdown-links {
    padding-bottom: 6px;
}

/* Padding-bottom для главной страницы при ширине <= 760px */
@media (max-width: 760px) {
    body[data-page="home"] .nav-catalog-dropdown-links {
        padding-bottom: 6px;
    }
}

/* Особенности меню каталога на главной странице только при ширине > 760px */
@media (min-width: 761px) {
    /* Ограничение высоты только для главной страницы (кнопка НЕ нажата) */
    body[data-page="home"] .nav-catalog-container.home-page-menu.catalog-menu-open .nav-catalog-dropdown-links {
        height: 400px;
        overflow: visible; /* Позволяем подменю выходить за пределы */
        justify-content: flex-start;
        gap: 6px; /* Постоянный промежуток между элементами */
    }

    /* Раскрытое состояние меню на главной странице (кнопка нажата) */
    body[data-page="home"] .nav-catalog-container.home-page-menu.menu-expanded.catalog-menu-open .nav-catalog-dropdown-links {
        height: auto;
        overflow: visible;
        justify-content: flex-start;
        gap: 6px; /* Постоянный промежуток между элементами */
    }

}

.nav-catalog-dropdown-links li {
    margin: 0;
    padding: 0;
}

.nav-catalog-dropdown-link {
    color: var(--white);
    text-decoration: none;
    padding: 12px 20px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 400;
    border-radius: 0;
    position: relative;
}

/* Hover эффект только на широком экране */
@media (min-width: 621px) {
    .nav-catalog-dropdown-link:hover {
        color: var(--white);
        background-color: rgba(255, 255, 255, 0.1);
    }
}

.nav-catalog-dropdown-link i {
    font-size: 20px;
    color: var(--white);
    flex-shrink: 0;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-catalog-dropdown-link:hover i {
    color: var(--white);
}

.nav-catalog-dropdown-link span {
    flex: 1;
}

/* Стрелочка для элементов с дочерними */
.nav-catalog-arrow {
    font-size: 16px;
    color: var(--white);
    flex-shrink: 0;
    margin-left: auto;
    transition: transform 0.2s ease;
}

/* Hover эффект только на широком экране */
@media (min-width: 621px) {
    .nav-catalog-dropdown-links li.menu-item-has-children:hover .nav-catalog-arrow {
        transform: translateX(3px);
    }
}

/* Подменю (второй уровень) */
.nav-catalog-dropdown-links .sub-menu {
    position: absolute;
    left: calc(100% - 1px);
    top: 0;
    background-color: var(--gray-light-2);
    min-width: 250px;
    padding: 0;
    list-style: none;
    margin: 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    border-radius: 0 8px 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.2s ease;
    z-index: 1001;
    white-space: nowrap;
}

.nav-catalog-dropdown-links .sub-menu.sub-menu-active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.nav-catalog-dropdown-links .sub-menu li {
    margin: 0;
    padding: 0;
}

.nav-catalog-dropdown-links .sub-menu a {
    color: var(--white);
    text-decoration: none;
    padding: 14px 20px;
    display: block;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s ease;
}

/* Hover эффект для подменю только на широком экране */
@media (min-width: 621px) {
    .nav-catalog-dropdown-links .sub-menu a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--white);
    }
}

/* Позиционирование родительского элемента для корректного отображения подменю */
.nav-catalog-dropdown-links > li.menu-item-has-children {
    position: relative;
}

/* Зона клика для тачскринов на широком экране (>= 621px) */
@media (min-width: 621px) and (pointer: coarse) {
    .nav-catalog-dropdown-links li.menu-item-has-children .nav-catalog-dropdown-link {
        position: relative;
    }
    
    .nav-catalog-dropdown-links li.menu-item-has-children .nav-catalog-dropdown-link::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 60px;
        height: 100%;
        z-index: 10;
        cursor: pointer;
    }
}

/* Мобильная версия меню каталога (<= 620px) */
@media (max-width: 620px) {
    /* Стрелка вниз вместо вправо на мобильных (поворачиваем caret-right на 90deg) */
    .nav-catalog-dropdown-links .nav-catalog-arrow {
        transform: rotate(90deg) !important;
        transition: transform 0.3s ease;
    }
    
    /* Убираем hover эффект для стрелки на мобильных */
    .nav-catalog-dropdown-links li.menu-item-has-children:hover .nav-catalog-arrow {
        transform: rotate(90deg) !important;
    }
    
    /* Поворот стрелки вверх при раскрытии (еще на 180deg, итого 270deg) */
    .nav-catalog-dropdown-links li.menu-item-has-children.sub-menu-open .nav-catalog-arrow {
        transform: rotate(270deg) !important;
    }
    
    /* Большой хитбокс для стрелки - невидимая область на весь правый край */
    .nav-catalog-dropdown-link {
        position: relative;
    }
    
    .nav-catalog-dropdown-links li.menu-item-has-children .nav-catalog-dropdown-link::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 60px;
        height: 100%;
        z-index: 10;
        cursor: pointer;
    }
    
    /* Подменю снизу на мобильных */
    .nav-catalog-dropdown-links .sub-menu {
        position: static;
        left: auto;
        top: auto;
        background-color: rgba(0, 0, 0, 0.2);
        min-width: 100%;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
        margin-top: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transform: none;
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
        padding: 0;
    }
    
    .nav-catalog-dropdown-links .sub-menu.sub-menu-active {
        max-height: 1000px;
        opacity: 1;
        visibility: visible;
        padding: 6px 0;
    }
    
    /* Стили для элементов подменю на мобильных */
    .nav-catalog-dropdown-links .sub-menu a {
        padding-left: 40px; /* Больший отступ слева для вложенности */
    }
}

/* Кнопка "Показать больше" для главной страницы */
.nav-catalog-show-more-item {
    display: none;
    margin: 0;
    padding: 0;
}

.nav-catalog-container.home-page-menu .nav-catalog-show-more-item {
    display: block;
}

.nav-catalog-show-more {
    padding: 12px 20px;
    color: var(--white);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 400;
}

.nav-catalog-show-more:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.nav-catalog-show-more i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.nav-catalog-container.home-page-menu.menu-expanded .nav-catalog-show-more i {
    transform: rotate(180deg);
}

/* Скрытие элементов после 6-го теперь управляется через JavaScript */

.nav-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}


.nav-search {
    height: 100%;
    display: flex;
    align-items: stretch;
    flex: 1;
    margin: 0 15px;
}

.search-input {
    background-color: var(--white);
    flex: 1;
    padding: 6px 12px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.search-button {
    padding: 6px 12px;
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.3s;
}

.search-button:hover {
    background-color: var(--primary-red-light);
}

.nav-links {
    display: flex;
    gap: 20px;
    height: 100%;
}

.nav-link,
.nav-links a {
    display: flex;
    color: var(--white);
    text-decoration: none;
    font-size: 16px;
    font-weight: 300;
    transition: opacity 0.3s;
    height: 40px;
    align-items: center;
}

.nav-link:hover,
.nav-links a:hover {
    opacity: 0.7;
    transition: opacity 0.3s;
}

.nav-dots {
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    height: 100%;
    padding: 11px 8px;
    margin-left: 15px;
    position: relative;
}

/* Всплывающее меню для трёх точек */
.nav-dots-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    margin-top: 5px;
    transition-delay: 0s;
    display: none;
    pointer-events: none;
}

.nav-dots-button {
    background: none;
    border: none;
    color: var(--white);
    font-size: 32px;
    cursor: pointer;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

.nav-dots-button:hover {
    opacity: 0.7;
    transition: opacity 0.3s;
}

/* Всплывающее меню для трёх точек */
.nav-dots-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    margin-top: 5px;
    transition-delay: 0s;
    display: none;
    pointer-events: none;
}

/* Показываем меню при активном состоянии */
.nav-dots.menu-open .nav-dots-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s;
    display: block;
    pointer-events: auto;
}

.nav-dots-dropdown::before {
    content: '';
    position: absolute;
    top: -9px;
    right: 15px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #e0e0e0;
}

.nav-dots-dropdown::after {
    content: '';
    position: absolute;
    top: -8px;
    right: 15px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--white);
}

.nav-dots-dropdown-links {
    padding: 8px 0;
}

.nav-dots-dropdown-link {
    display: block;
    padding: 10px 20px;
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.nav-dots-dropdown-link:hover {
    background-color: #f5f5f5;
    color: var(--primary-red);
}

.nav-dots-dropdown-link:first-child {
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
}

.nav-dots-dropdown-link:last-child {
    border-bottom-left-radius: 7px;
    border-bottom-right-radius: 7px;
    border-bottom: none;
}

@media (max-width: 1200px) {
    .header-logo-wrapper {
        margin-left: 10px;
    }

    .login-link {
        margin-right: 10px;
    }
}

@media (max-width: 980px) {
    .header-wrapper {
        flex-direction: row;
    }

    .header-title {
        flex: 1;
        order: 2;
        margin-right: 35px;
    }

    .header-contacts {
        flex: 1;
        flex-direction: column;
        gap: 2px;
        order: 1;
    }
}

@media (max-width: 940px) {
    .nav-links {
        display: none;
    }

    .nav-dots {
        margin-left: 0;
    }
}

@media (max-width: 840px) {
    .header-title {
        display: none;
    }
}

@media (max-width: 620px) {

    .header-top {
        padding-bottom: 8px;
    }

    .header-top .container {
        flex-direction: column;
    }

    .header-logo-wrapper {
        justify-content: center;
        margin-left: 0;
        margin-bottom: 10px;
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .header-login {
        display: none;
    }

    .login-link {
        margin-right: 0px;
    }

    .header-bottom .container {
        flex-direction: column;
    }

    .nav-catalog-container {
        flex: 0;
        order: 2;
        width: 100%;
    }
    
    .nav-catalog {
        width: 100%;
    }

    .nav-wrapper {
        order: 1;
        width: 100%;
    }

    .nav-dots {
        background-color: transparent;
        padding-left: 0;
        padding-right: 11px;
    }
}

/* Мобильная боковая панель */
.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background-color: var(--white);
    z-index: 1001;
    transition: right 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-sidebar.active {
    right: 0;
}

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

.sidebar-header h3 {
    margin: 0;
    color: var(--primary-blue);
    font-size: 18px;
    font-weight: 500;
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--gray-light);
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s;
}

.sidebar-close:hover {
    color: var(--primary-red);
}

.sidebar-content {
    padding: 20px;
}

.login-block {
    margin-bottom: 10px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-menu-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-menu-link {
    display: block;
    padding: 12px 0;
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-menu-link:hover {
    color: var(--primary-red);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Модальное окно заказа звонка */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px 10px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    color: var(--black);
    font-size: 20px;
    font-weight: 500;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
}

.modal-close:hover {
    background-color: #f5f5f5;
    color: var(--black);
}

.modal-body {
    padding: 20px 25px 25px 25px;
}

.modal-body h3 {
    color: var(--black);
    font-size: 24px;
    font-weight: 500;
    margin: 0 0 10px 0;
}

.modal-body>p {
    margin-bottom: 20px;
}

.modal-body p {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

/* Основные контейнеры форм */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Элементы форм */
.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--black);
}

.form-group input,
.form-group textarea {
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    width: 100%;
    margin-top: 8px;
    margin-bottom: 8px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Специальные элементы для загрузки файлов */
.form-group input[type="file"] {
    border: 1px dashed #e0e0e0;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    max-width: 100%; /* Ограничиваем максимальную ширину */
    box-sizing: border-box; /* Учитываем padding в общей ширине */
    margin: 0px;
}

.form-group input[type="file"]:hover {
    border-color: var(--primary-blue);
    background-color: #f0f8ff;
}

.form-group input[type="file"]:focus {
    border-color: var(--primary-blue);
    background-color: #f0f8ff;
}

/* Поле выбора файла */
.file-input {
    font-size: 13px;
    font-weight: 500;
    color: #495057;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    width: 100%;
}

/* Скрываем стандартную кнопку браузера */
.file-input::-webkit-file-upload-button,
.file-input::file-selector-button {
    visibility: hidden;
    width: 0;
}

/* Стилизация кастомного "Выберите файл" */
.file-input::before {
    content: "Выберите файл";
    display: inline-block;
    padding: 6px 14px;
    min-width: 120px;
    font-size: 14px;
    font-style: italic;
    color: #6c757d;
    background-color: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-input:hover::before {
    border-color: var(--primary-blue);
    background-color: #e3f2fd;
    color: var(--primary-blue);
}

/* Кнопки */
.file-upload-btn {
    background-color: var(--primary-blue);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.file-upload-btn:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.file-upload-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.submit-btn {
    background-color: var(--primary-red);
    color: white;
    border: none;
    padding: 15px 30px;
    margin-top: 10px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
}

.submit-btn:hover {
    background-color: #A52A2A;
}

.remove-file-btn {
    background-color: var(--primary-red);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: none;     /* скрыта по умолчанию */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    flex-shrink: 0;    /* кнопка не сжимается */
    position: relative;
    z-index: 1;
    align-self: center; /* вертикальное выравнивание */
    text-align: center;
    line-height: 1;
    padding: 0;
    margin: 0;
}

.remove-file-btn:hover {
    background-color: #A52A2A;
}

/* Специальный стиль для кнопки, когда она показывается через inline-block */
.remove-file-btn[style*="display: inline-block"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

/* Дополнительные элементы */
.file-upload-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 100%;
}

.file-input-group {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.file-input-wrapper {
    display: flex;
    width: 100%;
}

.file-upload-container .file-input-group p {
    display: flex;
    flex-wrap: wrap; /* перенос на новую строку после пары */
    width: 100%;
    gap: 10px;
}

form p {
    width: 100%;
}

.wpcf7-form-control-wrap {
    flex: 1 auto; /* растягивается на всё доступное место */
    min-width: 0;   /* важно, чтобы поле могло сжиматься при появлении кнопки */
}

.wpcf7-not-valid-tip {
    margin-bottom: 10px;
}

.wpcf7-response-output {
    margin-top: 15px !important; 
    margin-bottom: 0px !important;
    margin-left: 0px !important;
    margin-right: 0px !important;
    padding: 10px !important;
    border-radius: 6px !important;
}

/* Блок согласия на обработку персональных данных */
.consent-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
}

.consent-group p {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 0;
    font-size: 14px;
    color: var(--black);
    line-height: 1.5;
}

.consent-group .wpcf7-form-control-wrap {
    flex: 0 0 auto;
    margin: 0;
}

.consent-group .wpcf7-acceptance {
    display: flex;
    align-items: flex-start;
}

.consent-group .wpcf7-list-item {
    display: flex;
    align-items: flex-start;
    margin: 0;
}

.consent-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--primary-blue);
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.consent-group input[type="checkbox"]:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(53, 57, 142, 0.1);
}

.consent-group input[type="checkbox"]:checked {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.consent-group a {
    color: var(--primary-blue);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.consent-group a:hover {
    color: var(--primary-red);
}

/* Медиа-запросы */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header,
    .modal-body {
        padding: 15px 20px;
    }
    
    .modal-header h3 {
        font-size: 18px;
    }
}

/* #endregion */

/* #region Footer */

/* Footer */
footer {
    background-color: var(--primary-blue);
    padding: 40px 0;
    min-height: 100px;
}

.dynamic-footer .container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Секции футера */
.footer-top {
    display: flex;
    justify-content: flex-end;
    gap: 0px;
}

.footer-bottom {
    margin-top: 20px;
    display: flex;
    gap: 50px;
}

.footer-legal {
    margin-top: 40px;
}

/* Wrapper'ы */
.footer-logo-wrapper {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.footer-nav-wrapper {
    width: 55%;
}

.footer-left-wrapper {
    flex: 0 0 auto;
}

.footer-map-wrapper {
    flex: 1;
}

/* Декоративный белый блок */
.footer-decorative {
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: calc(-50vw + 50%);
    padding-left: calc(50vw - 50%);
    padding-right: 25px;
    padding-top: 20px;
    padding-bottom: 20px;
}

/* Логотип в футере */
.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo:hover {
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-logo-image {
    height: 70px;
    width: auto;
    flex-shrink: 0; /* Предотвращает сжатие изображения */
    object-fit: contain; /* Сохраняет пропорции изображения */
    max-width: 100%; /* Ограничивает максимальную ширину */
}

/* Навигация по сайту */
.footer-navigation {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--white);
    height: 100%;
}

/* Заголовок навигации */
.footer-nav-title {
    font-size: 20px;
    font-weight: 500;
    color: var(--white);
}

/* Белая полоска-разделитель */
.footer-nav-divider {
    height: 1px;
    background-color: var(--white);
    margin: 15px 0 20px;
    width: 60%;
}

/* Контейнер для ссылок */
.footer-nav-links {
    display: flex;
    gap: 40px;
    justify-content: center;
}

/* Столбцы с ссылками */
.footer-nav-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

/* Ссылки навигации */
.footer-nav-link {
    color: var(--white);
    text-decoration: none;
    font-size: 16px;
    font-weight: 300;
    transition: opacity 0.3s;
}

.footer-nav-link:hover {
    opacity: 0.8;
}

/* Левый контент футера */
.footer-left-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--white);
    height: 100%;
    gap: 60px;
    margin-left: 40px;
}

/* Контакты в футере */
.footer-contacts {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--white);
}

/* Секция адреса */
.footer-address-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--white);
}

/* Заголовок контактов */
.footer-contacts-title {
    font-size: 20px;
    font-weight: 500;
    color: var(--white);
}

/* Разделитель контактов */
.footer-contacts-divider {
    height: 1px;
    background-color: var(--white);
    margin: 15px 0;
    width: 50%;
}

/* Список контактов */
.footer-contacts-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

/* Элемент контакта */
.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    position: relative;
}

.footer-contact-item i {
    font-size: 24px;
    color: var(--white);
}

.footer-contact-item a,
.footer-contact-item span {
    color: var(--white);
    text-decoration: none;
    font-size: 16px;
    font-weight: 300;
    transition: opacity 0.3s;
}

.footer-contact-item .contact-arrow {
    display: flex;
    align-items: center;
    margin-left: 0px;
    margin-bottom: 5px;
}

.footer-contact-item .contact-arrow i {
    display: flex;
    align-items: center;
    margin-left: 0px;
    font-size: 18px;
}

.footer-contact-item a:hover {
    opacity: 0.8;
}

.footer-contact-item .contact-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    padding: 8px 0;
    margin-top: 5px;
    min-width: 180px;
    display: none;
    z-index: 1000;
}

.footer-contact-item.contact-dropdown-open .contact-dropdown {
    display: block;
}

.footer-contact-item.contact-dropdown-open .contact-arrow i {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

.footer-contact-item .contact-dropdown-item {
    color: var(--black) !important;
}

.footer-contact-item .contact-dropdown-item span {
    font-size: 15px;
    color: var(--black) !important;
    text-decoration: underline !important;
}

.footer-contact-item .contact-dropdown-item i {
    color: var(--primary-blue) !important;
}

.footer-contact-item .contact-dropdown-item:hover span {
    color: var(--primary-blue) !important;
}

/* Список элементов адреса */
.footer-map-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

/* Элемент адреса */
.footer-map-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
}

.footer-map-item i {
    font-size: 24px;
    color: var(--white);
}

.footer-map-item span {
    color: var(--white);
    font-size: 16px;
    font-weight: 300;
}

/* Карта в футере */
.footer-map {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--white);
    height: 100%;
    margin-right: 30px;
}

/* Заголовок карты */
.footer-map-title {
    font-size: 20px;
    font-weight: 500;
    color: var(--white);
}

/* Разделитель карты */
.footer-map-divider {
    height: 1px;
    background-color: var(--white);
    margin: 15px 0;
    width: 50%;
}

/* Разделитель карты (уникальный) */
.footer-map-divider-map {
    height: 1px;
    background-color: var(--white);
    margin: 15px 0 20px;
    width: 50%;
}

/* Яндекс карта */
.yandex-map {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 2px solid var(--white);
}

/* Стили для карты из конструктора */
.yandex-map iframe {
    width: 100% !important;
    height: 100% !important;
    border: 2px solid var(--white);
}

.footer-legal-info {
    width: 100%;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-legal-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.footer-legal-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-legal-text {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 300;
    line-height: 1.6;
    max-width: 800px;
}

.footer-legal-text p {
    margin: 0 0 8px 0;
}

.footer-legal-text p:last-child {
    margin-bottom: 0;
}

/* Адаптивность для футера при 980px */
@media (max-width: 980px) {

    .dynamic-footer .container {
        gap: 40px;
    }

    .footer-top {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .footer-nav-wrapper {
        width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 40px;
        margin-top: 0px;
    }

    .nav-right-block {
        justify-content: space-between;
    }
    
    .footer-decorative {
        justify-content: center;
        margin-right: calc(-50vw + 50%);
        padding-right: calc(50vw - 50%);
    }
    
    .footer-left-content {
        flex-direction: row !important;
        gap: 40px;
        justify-content: center;
        align-items: center;
        gap: 60px !important;
        margin-left: 0px;
    }
    
    .footer-contacts {
        flex: 0 0 auto;
        align-items: center;
    }
    
    .footer-address-section {
        flex: 0 0 auto;
        align-items: flex-start;
    }
    
    .footer-map-list {
        align-items: flex-start !important;
    }
    
    footer .container {
        overflow: hidden;
    }

    .footer-map-wrapper {
        width: 100%;
    }
    
    .footer-map {
        width: 100%;
        margin-right: 0px;
    }
    
    .yandex-map {
        border: none !important;
        height: 400px !important;
        width: 100%;
    }
    
    .yandex-map iframe {
        border: none !important;
    }

    .footer-legal {
        margin-top: 0px;
    }
}

/* Адаптивность для футера при 660px */
@media (max-width: 660px) {
    .footer-left-content {
        flex-direction: column !important;
        align-items: center !important;
        gap: 40px !important;
    }
    
    .footer-contacts {
        flex: 0 0 auto;
        align-items: center;
    }

    .footer-nav-links {
        gap: 20px;
    }
    
    .footer-address-section {
        flex: 0 0 auto;
        align-items: center;
        line-height: 1.4;
        width: 100%;
    }
    
    .footer-map-list {
        align-items: center !important;
    }
    
    .footer-map-item {
        justify-content: center;
    }
}

/* Адаптивность для футера при 400px */
@media (max-width: 400px) {
    .footer-logo {
        margin: 0 15px;
    }
    
    .footer-map-item span {
        max-width: 230px;
        word-break: break-word;
        text-align: left;
    }
}

/* #endregion */

/* #region 404 страница */

.error-404-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 40px 20px;
}

.error-404-container h1 {
    font-size: 120px;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 0 0 20px 0;
    line-height: 1;
}

.error-404-container p {
    font-size: 20px;
    font-weight: 400;
    color: var(--black);
    margin: 0 0 30px 0;
    max-width: 500px;
}

.error-404-container a {
    background-color: var(--primary-red);
    color: var(--white);
    text-decoration: none;
    padding: 15px 40px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    display: inline-block;
}

.error-404-container a:hover {
    background-color: var(--primary-red-light);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .error-404-container h1 {
        font-size: 80px;
    }
    
    .error-404-container p {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .error-404-container h1 {
        font-size: 60px;
    }
    
    .error-404-container p {
        font-size: 16px;
    }
    
    .error-404-container a {
        padding: 12px 30px;
        font-size: 15px;
    }
}

/* #endregion */

/* #region Search Results */
.search-results-content {
    margin-top: 10px;
}

.search-results-title {
    font-size: 26px;
    font-weight: 500;
    color: var(--black);
    margin: 0 0 30px 0;
    text-align: center;
}

.search-results-title span {
    color: var(--primary-blue);
    font-weight: 500;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.search-result-item {
    background-color: var(--white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.search-result-title {
    font-size: 22px;
    font-weight: 500;
    margin: 0 0 10px 0;
}

.search-result-title a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.search-result-title a:hover {
    color: var(--primary-red);
}

.search-result-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--gray-light);
}

.search-result-type {
    text-transform: uppercase;
    font-weight: 500;
}

.search-result-date {
    color: var(--gray-dark);
}

.search-result-excerpt {
    color: var(--black);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.search-result-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.search-result-link:hover {
    color: var(--primary-red);
}

.search-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.search-no-results {
    background-color: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.search-no-results p {
    font-size: 18px;
    color: var(--black);
}

@media (max-width: 840px) {
    .search-results-title {
        font-size: 22px;
    }

    .search-result-item {
        padding: 20px;
    }

    .search-result-title {
        font-size: 20px;
    }

    .search-result-excerpt {
        font-size: 15px;
    }
}

@media (max-width: 460px) {
    .search-results-title {
        font-size: 20px;
    }

    .search-result-item {
        padding: 15px;
    }

    .search-result-title {
        font-size: 18px;
    }

    .search-result-meta {
        flex-direction: column;
        gap: 5px;
    }
}
/* #endregion */
