/* ======= ОБЩИЕ СТИЛИ ======= */
.main-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.main-menu ul li a {
    color: #d8d8d8;
    font-weight: 400;
    text-transform: uppercase;
    transition-duration: 0.5s;
}
.main-menu ul li.current_page_item a {
    color: #fff;
}
.main-menu ul li a:hover {
    color: #fff;
    transition-duration: 0.5s;
}
.main-menu ul li.current-menu-item a::before {
    display: block;
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #fff;
}
.main-menu ul.sub-menu li a::before {
    background: none;
}
.main-menu ul.sub-menu li.current-menu-item a::before {
    display: none;
}
.header-block {
    align-items: start;
}
.header-logo {
    margin-left: 10px;
    margin-top: 5px;
}
.header-block.active {
    background: #0f0f0f;
    height: 100vh;
    justify-content: start;
}

.header-block .mob-contact {
    display: none;
}
@media (min-width: 1025px) {
    .header-block {
        align-items: center;
    }
    .main-menu > ul {
        display: flex;
        gap: 20px;
    }
    .main-menu ul li a {
        color: #d8d8d8;
        font: normal 16px "OpenSans-B", sans-serif;
        font-weight: 400;
        text-transform: uppercase;
        transition-duration: 0.5s;
    }
    .main-menu li {
        position: relative;
    }

    .main-menu .sub-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background: #0f0f0f;
        padding: 10px;
        min-width: 150px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        z-index: 10;
    }

    .main-menu li:hover > .sub-menu {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .main-menu .sub-menu li {
        display: block;
        white-space: nowrap;
    }
    .main-menu .sub-menu li.submenu-back {
        display: none;
    }
}

.nav-button.cmn-toggle-switch {
    right: 0px;
    top: 5px;
    left: auto;
}

@media (max-width: 1024px) {
    .main-menu {
        display: none;
        position: relative;
        inset: 0;
        width: 95%;
        background: #0f0f0f;
        z-index: 1000;
        overflow-y: auto;
        margin: 0 auto;
    }

    .main-menu ul li a {
        color: #d8d8d8;
        font-family: "OpenSans-R";
        font-weight: 400;
        text-transform: uppercase;
        transition-duration: 0.5s;
    }

    .main-menu.active {
        display: block;
        margin-top: 30px;
    }

    .main-menu ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .main-menu ul.menu {
        display: flex;
        flex-direction: column;
        /*gap: 12px;*/
    }

    .main-menu ul.menu li {
        border-bottom: 1px solid #2b2b2b;
        padding: 12px 12px 12px 0;
    }

    .main-menu ul.menu li:last-child {
        border-bottom: none;
    }

    .main-menu ul.menu li a {
        color: #fff;
        font-size: 22px;
    }

    .main-menu ul.menu li.active-parent a {
        color: #7B7B7B;
        font-size: 32px;
    }

    .main-menu ul.menu li .sub-menu li a {
        color: #fff;
        font-size: 22px;
        padding-left: 0px;
    }

    .main-menu .sub-menu {
        display: none;
        flex-direction: column;
        gap: 12px;
    }

    .main-menu .sub-menu.active {
        display: flex;
        margin-top: 30px;
    }

    .submenu-back {
        font-weight: bold;
        cursor: pointer;
        padding: 10px 0;
        color: #333;
    }
    .header-block {
        display: flex;
        flex-direction: column;
    }
    .header-block.active .mob-contact {
        display: block;
    }
    .mob-contact {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 95%;
        margin: 50px auto 0;
    }
    .btn-contact {
        display: flex;
        justify-content: center;
        align-items: center;
        padding-bottom: 30px;
    }
    .btn-contact a {
        width: 100%;
        padding: 10px;
        font-size: 20px;
        color: #fff;
        background: #E94033;
        text-align: center;
        border-radius: 12px;
        font-family: "OpenSans-R";
        font-weight: 400;
    }
    .mob-contact .contacts-info-item {
        margin-top: 0;
    }
    .contacts-socials ul {
        border-top: 1px solid #2b2b2b;
        padding-top: 30px;
        display: flex;
        flex-wrap: wrap-reverse;
        justify-content: center;
        gap: 12px;
        list-style: none;
    }

    .contacts-socials ul li {
        width: 45px;
        height: 45px;
    }

    .contacts-socials ul li a {
        display: block;
        width: 100%;
        height: 100%;
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
    }
    .main-menu.active ul li.menu-item-has-children {
        position: relative;
    }
    .main-menu.active ul li.menu-item-has-children a:before,
    .main-menu.active ul li.menu-item-has-children a:after {
        content: "";
        position: absolute;
        width: 12px;
        height: 2px;
        top: 15px;
        background: #fff;
    }
    .main-menu.active ul li.menu-item-has-children a:before {
        top: 20px;
        right: 5px;
        transform: rotate(45deg);
    }
    .main-menu.active ul li.menu-item-has-children a:after {
        top: 28px;
        right: 5px;
        transform: rotate(-45deg);
    }
    .main-menu.active ul li.menu-item-has-children.active-parent a:before,
    .main-menu.active ul li.menu-item-has-children.active-parent a:after {
        display: none;
    }
}

body.admin-bar {
    margin-top: 0; /* обычно WordPress сам поднимает страницу */
}

body.admin-bar .header-wrap {
    margin-top: 32px; /* отступ под админ-бар на десктопе */
}

@media screen and (max-width: 782px) {
    body.admin-bar .header-wrap {
        margin-top: 46px; /* больший отступ на мобильных */
    }
}
/* Обёртка с кастомным скроллом */
.custom-scroll-wrapper {
    position: relative;
    max-height: 300px;
    overflow: hidden;
}

/* Контент с прокруткой */
.custom-scroll-content {
    overflow-y: scroll;
    max-height: 300px;
    padding-right: 16px;
    scrollbar-width: none; /* Firefox */
}

/* Скрываем стандартный скроллбар в Webkit */
.custom-scroll-content::-webkit-scrollbar {
    display: none;
}

/* Кастомный фон скроллбара */
.custom-scrollbar {
    position: absolute;
    top: 0;
    right: 2px;
    width: 4px;
    background: #626262;
    border-radius: 4px;
    height: 100%;
    z-index: 1;
}

/* Кастомный ползунок */
.custom-scroll-thumb {
    width: 100%;
    background: #e94033;
    border-radius: 4px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    opacity: 1;
    transition: top 0.1s;
}

/* 1. Убираем серую/синюю вспышку браузера при тапе
-----------------------------------------------------*/
.main-menu,
.main-menu * {
    -webkit-tap-highlight-color: transparent; /* Safari / Chrome / Android */
    -webkit-touch-callout: none;              /* убирает контекст-меню на iOS */
    user-select: none;                        /* блокирует выделение текста   */
}

/* 2. На всякий случай гасим псевдосостояния, если они где-то прописаны */
.main-menu li:active,
.main-menu a:active,
.main-menu li:focus-within {
    background: transparent !important;
    color: inherit !important;
}
.header-block {
    -webkit-transition: all 0s;
    -moz-transition: all 0s;
    -o-transition: all 0s;
    -ms-transition: all 0s;
    transition: all 0s;
}

.header-wrap {
    -webkit-transition: all 0s;
    -moz-transition: all 0s;
    -o-transition: all 0s;
    -ms-transition: all 0s;
    transition: all 0s;
}