/*
Назначение:
     Стили для кастомной шапки сайта. Описывают внешний вид кнопок,
     логотипа, дескриптора и навигационного меню. Содержат медиа-запросы
     для адаптации шапки под различные разрешения экрана, включая
     реализацию компактной шапки и выезжающего меню для мобильных устройств.

История
     изменений:
v1.3
     – Шапка сделана фиксированной на мобильных. Добавлены стили, гарантирующие отображение кнопки в мобильном меню. (2025-08-04)
v1.2
     – Исправлено отображение мобильного меню на полный экран, добавлены стили для кнопки записи. (2025-08-04)
v1.1
     – Добавлены стили для мобильной шапки и полноэкранного меню-бургера. (2025-08-04)
v1.0
     – Исходная версия. (2025-07-28)
*/
.btn-custom {
    padding: 0px 35px;
    height: 60px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-custom i {
    font-size: 18px;
    position: relative;
    top: 2px;
    margin-right: 10px;
}

.btn-custom-reverse-icon {
    margin-left: 10px;
    margin-right: 0;
}

.btn-outline-custom {
    border: 1px solid #2fa8ff !important;
    color: #2fa8ff;
    background-color: transparent;
}

.btn-outline-custom:hover {
    background-color: #2fa8ff;
    color: #fff;
    border-color: #2fa8ff;
}

.main-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding-top: 10px;
}
.main-header__descriptor-top {
    text-transform: uppercase;
    line-height: normal;
    font-weight: bold;
    font-size: 20px;
}
.main-header__descriptor-bottom {
    text-transform: uppercase;
    line-height: normal;
    margin-top: 12px;
    font-size: 14px;
}

.main-header__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header__top-wrapper {
    display: flex;
    gap: 25px;
    align-items: center;
}

.main-header__buttons {
    max-width: 800px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
}

.main-header__menu {
    position: relative;
    z-index: 1000;
    padding: 0;
}
.main-header__menu .wrap-main-menu {
    background-color: rgb(248 249 250) !important;
}
.main-header__menu .main-menu-inner {
    padding-top: 18px;
    padding-bottom: 8px;
    position: relative;
}
.main-header__menu .main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: center;
}
.main-header__menu .main-menu::before {
    content: "";
    position: absolute;
    top: 11px;
    width: 100vw;
    height: 1px;
    background-color: #ededed;
}
.main-header__menu .main-menu>li {
    position: relative;
}
.main-header__menu .main-menu>li.menu.visible {
    display: none !important;
}
.main-header__menu .main-menu>li>a {
    width: fit-content;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 7px 35px;
    display: block;
    position: relative;
}
.main-header__menu .main-menu>li>a:hover {
    color: #ee1d23;
}
.main-header__menu .main-menu>li>a::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #ee1d23;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}
.main-header__menu .main-menu>li>a:hover::before {
    transform: scaleX(1);
}
.main-header__menu .main-menu>li .child {
    position: absolute;
    top: 100%;
    left: 0;
    width: 220px;
    background: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    list-style: none;
    padding: 10px 0;
    border-radius: 4px;
    animation: fadeIn 0.3s ease-out;
}
.main-header__menu .main-menu>li .child li {
    padding: 10px 15px;
}
.main-header__menu .main-menu>li .child li a {
    font-size: 14px;
    font-weight: 400;
    color: #444;
    text-decoration: none;
    display: block;
    transition: background 0.3s ease, color 0.3s ease;
}
.main-header__menu .main-menu>li .child li a:hover {
    background: #ee1d23;
    color: #ffffff;
}
.main-header__menu .main-menu>li:hover .child {
    display: flex;
}

/* Мобильное меню и бургер */
.main-header__burger-button,
.main-header__close-button,
.main-header__mobile-actions {
    display: none;
}

/* Анимация появления */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Медиа-запросы для адаптации */
@media (max-width: 1440px) {
    .main-header__buttons {
        width: unset;
    }
    .btn-custom {
        padding: 0 5px;
        width: 100%;
    }
}

@media (max-width: 992px) {
    .main-header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 9000;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    .main-header__descriptor,
    .main-header__buttons {
        display: none;
    }
    .main-header__burger-button {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 10001;
    }
    .main-header__burger-line {
        width: 100%;
        height: 3px;
        background-color: #333;
        border-radius: 3px;
        transition: all 0.3s linear;
    }
    .main-header__bottom {
        display: none;
    }
    body.mobile-menu--is-open {
        overflow: hidden;
    }
    body.mobile-menu--is-open .main-header__bottom {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        z-index: 10000;
        padding: 0;
        -webkit-backdrop-filter: blur(5px);
        backdrop-filter: blur(5px);
    }
    body.mobile-menu--is-open .main-header__close-button {
        display: block;
        position: absolute;
        top: 15px;
        right: 20px;
        font-size: 40px;
        font-weight: 300;
        color: #333;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 10001;
    }
    body.mobile-menu--is-open .main-header__menu {
        flex-grow: 1;
        overflow-y: auto;
        padding: 60px 20px 20px;
    }
    body.mobile-menu--is-open .main-header__menu .main-menu {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        width: 100%;
    }
    body.mobile-menu--is-open .main-header__menu .main-menu::before {
        display: none;
    }
    body.mobile-menu--is-open .main-header__menu .main-menu>li {
        width: 100%;
    }
    body.mobile-menu--is-open .main-header__menu .main-menu>li>a {
        padding: 15px 10px;
        text-align: left;
        font-size: 18px;
        min-height: unset;
    }
    body.mobile-menu--is-open .main-header__menu .main-menu>li>a::before {
        display: none;
    }
    body.mobile-menu--is-open .main-header__menu .main-menu>li:hover .child {
        display: none;
    }
    body.mobile-menu--is-open .main-header__menu .main-menu>li .child {
        position: static;
        width: 100%;
        box-shadow: none;
        background: transparent;
        padding-left: 20px;
        animation: none;
    }
    body.mobile-menu--is-open .main-header__menu .main-menu>li .child li {
        padding: 5px 10px;
    }
    body.mobile-menu--is-open .main-header__menu .main-menu>li .child li a {
        font-size: 16px;
    }
    body.mobile-menu--is-open .main-header__menu .main-menu-inner {
        padding: 0;
    }
    .main-header__mobile-actions {
        /* Стили для контейнера кнопки в мобильном меню */
        flex-shrink: 0;
        padding: 20px;
        border-top: 1px solid #e0e0e0;
    }
    body.mobile-menu--is-open .main-header__mobile-actions {
        /* Отображение блока с кнопкой при открытом меню */
        display: block;
    }
    body.mobile-menu--is-open .main-header__mobile-actions .btn-custom {
        width: 100%;
        padding: 0 15px;
    }
}

@media (min-width: 993px) and (max-width: 1600px) {
    .main-header__menu .main-menu > li > a {
        display: flex !important;
        align-items: center;
    }
}

@media (min-width: 768px) {
    .container {
        width: 750px;
    }
    .main-header__menu .main-menu > li > a {
        min-height: 102px;
    }
}

@media (min-width: 992px) {
    .container {
        width: 970px;
    }
}

@media (min-width: 1200px) {
    .container {
        width: 1170px;
    }
    .main-header__menu .main-menu > li > a {
        min-height: 80px;
    }
}

@media (min-width: 1440px) {
    .container {
        width: 1360px !important;
    }
    .main-header__menu .main-menu > li > a {
        min-height: 58px;
    }
}

@media (min-width: 1600px) {
    .container {
        width: 1500px !important;
        max-width: unset;
    }
    .main-header__menu .main-menu > li > a {
        min-height: unset;
    }
}

/* Промежуточные брейкпоинты для плавной адаптации */
@media (max-width: 1200px) {
    .main-header__descriptor-top {
        font-size: 18px;
    }
    .main-header__descriptor-bottom {
        font-size: 13px;
    }
    .main-header__top-wrapper {
        gap: 20px;
    }
    .btn-custom {
        padding: 0 25px;
        height: 55px;
    }
}

@media (max-width: 768px) {
    .main-header__descriptor-top {
        font-size: 16px;
    }
    .main-header__descriptor-bottom {
        font-size: 12px;
    }
    .main-header__top-wrapper {
        gap: 15px;
    }
    .main-header__logo img {
        max-width: 120px;
    }
}

@media (max-width: 576px) {
    .main-header__descriptor-top {
        font-size: 14px;
    }
    .main-header__descriptor-bottom {
        font-size: 11px;
    }
    .main-header__top-wrapper {
        gap: 12px;
    }
    .main-header__logo img {
        max-width: 100px;
    }
    .main-header {
        padding-top: 8px;
        padding-bottom: 8px;
    }
}