/*! ALL */

.header {
    min-height: 100px;
    display: flex;
    align-items: center;
    padding: 18px 65px;
    box-sizing: border-box;
    background-color: #FFF;
    width: 100%;
    position: relative;
}

header.active {
    z-index: 100;
    position: fixed;
}

/* Плавное скрытие/появление */
.no-display {
    opacity: 0 !important;
    transform: scale(0.8) !important;
    pointer-events: none !important;
}

/*! LOGO + TITLE */

.header-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #10069F;
    fill: #10069F;
    margin: 0 123px 0 0;
}

.header-logo-icon {
    width: 67px;
    height: 57px;
}

.header-logo-title {
    font-family: 'Jost';
    font-size: 30px;
    font-weight: bold;
}

.header-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #10069F;
    fill: #10069F;
    margin: 0 123px 0 0;
    transition: transform 0.3s ease, color 0.3s ease;
}

.header-logo-link:hover {
    transform: scale(1.05);
}

.header-logo-icon path {
    transition: fill 0.3s ease;
}

.header-logo-link:active .header-logo-icon svg {
    opacity: 0.8;
}

.header-logo-link:active {
    opacity: 0.8;
}

/*! NAV LINKS */

.header nav {
    margin: 0;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    padding: 8px 0 0 0;
    gap: 50px;
}

.header-nav-link {
    text-decoration: none;
    text-transform: uppercase;
    color: #000;
    font-family: 'Montserrat';
    font-weight: normal;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 4px 0;
}

.header-nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: #10069F;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.header-nav-link:hover {
    color: #10069F;
}

.header-nav-link:hover::after {
    transform: scaleX(1);
}

.header-nav-link:active {
    opacity: 0.7;
}

/*! SEARCH BOX */

.header-search-box {
    display: flex;
    margin: 0 333px 0 137px;
    transition: margin 0.4s ease;
}

.header-search-box input {
    width: 304px;
    height: 53px;
    border: none;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    outline: none;
    font-family: 'Montserrat';
    font-weight: 300;
    font-size: 14px;
    padding-left: 12px;
    box-sizing: border-box;
    line-height: 1.2;
    background: #f5f5f5;
    transition: box-shadow 0.4s ease, background 0.4s ease;
    position: relative;
}

.header-search-box-button {
    width: 45px;
    height: 53px;
    background-color: #10069F;
    border: none;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    fill: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    box-sizing: border-box;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s ease;
}

.header-search-box input:focus {
    background: #ffffff;
    box-shadow: 0 0 8px rgba(16, 6, 159, 0.4);
}

.header-search-box input::placeholder {
    color: #aaa;
    transition: color 0.3s ease, transform 0.3s ease;
}

.header-search-box input:focus::placeholder {
    color: #10069F;
    transform: translateX(10px);
}

.header-search-box-button:hover {
    background: linear-gradient(135deg, #10069F, #3b3fa5);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(16, 6, 159, 0.4);
}

.header-search-box-button svg {
    transition: transform 0.3s ease;
}

.header-search-box-button:hover svg {
    transform: rotate(-15deg) scale(1.1);
}

.header-search-box-button:active {
    transform: scale(1);
}

/*! AUTH BLOCK */

.header-auth-box {
    display: flex;
    align-items: center;
    text-transform: uppercase;
    margin-left: auto;
}

.header-auth-box-item {
    display: flex;
    align-items: center;
    fill: #10069F;
    color: #10069F;
    text-decoration: none;
    font-family: 'Montserrat';
    color: #10069F;
    font-weight: 600;
    font-size: 14px;
}

.header-auth-box-item svg {
    margin: 0 8px 0 0;
}

.header-auth-box-liner {
    color: #454343;
    font-weight: 400;
    font-size: 14px;
    margin: 0 33px;
}

.header-auth-box-item {
    transition: color 0.3s ease;
}

.header-auth-box-item svg path {
    transition: fill 0.3s ease;
}

.header-auth-box-item:hover {
    color: #3b3fa5;
}

.header-auth-box-item:hover svg path {
    fill: #3b3fa5;
}

.burger {
    background-color: transparent;
    border: none;
    display: none;
}

.burger svg {
    fill: #10069F;
}

.menu-toogle {
    display: none;
}

.authorized-box {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 0 auto;
}

.authorized-box-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    /* background-image: url(../img/камел.jpg); */
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

.avatar-img {
    width: inherit;
    height: inherit;
    border-radius: 50%;
    object-fit: cover;
}

.authorized-box-nickname {
    font-size: 15px;
    font-weight: 500;
}

.authorized-box-wrp {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.authorized-box-exit {
    border: none;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 3px;
    color: #10069F;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

/* Оверлей-попап */
.burger-menu {
    position: absolute;
    top: 100px;
    /* высота header */
    left: 0;
    width: 100%;
    background: #fff;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    padding: 0 0 50px 0;
    opacity: 0;
    z-index: -1000;
    display: flex;
    transform: translateY(-10%);
    /* изначально уезжает наверх */
    align-items: center;
    flex-direction: column;
    font-size: 20px;
    gap: 50px;
}

.burger-menu.active {
    transform: translateY(0);
    /* возвращаем на место */
    opacity: 1;
    z-index: 1000;
    pointer-events: auto;
    /* клики снова активны */
}

/*! FOOTER */

.footer-bkg {
    background-color: #FFF;
    background-size: cover;
    color: #000;
    height: 100px;
}

.footer-flex {
    display: flex;
    justify-content: space-between;
    padding: 41px 65px;
}

.footer-text {
    font-weight: 300;
    font-size: 14px;
    font-family: 'Montserrat';
}

/*! ADAPTIVE */

@media (max-width: 1160px) {
    .header {
        flex-direction: column;
        justify-content: space-between;
        gap: 15px;
        width: 100%;
    }

    .header-logo-title {
        font-size: 20px;
    }

    .header-logo-link,
    .header-auth-box,
    .authorized-box {
        margin: 0;
    }
}

@media (max-width: 1000px) {
    .footer-text {
        text-align: center;
    }

    .footer-flex {
        padding: 6vw 8vw;
        justify-content: space-evenly;
        gap: 20px;
    }
}

@media (max-width: 640px) {

    .header nav,
    .header-auth-box,
    .authorized-box {
        display: none;
    }

    .header {
        display: flex;
        padding: 0px 10px;
        flex-wrap: wrap;
        gap: 0px;
        flex-direction: row;
    }

    .burger {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        z-index: 110;
    }

    .burger-menu nav,
    .burger-menu .header-auth-box {
        display: flex;
    }

    .burger-menu .authorized-box,
    .burger-menu .auth-block {
        display: flex;
        align-items: center;
    }
}

/* контейнер для иконок */
#burger-btn {
    position: relative;
    width: 50px;
    height: 50px;
    background: none;
    border: none;
    cursor: pointer;
}

/* оба svg друг над другом */
#burger-btn svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* по умолчанию: бургер видим, крестик скрыт */
#icon-burger {
    opacity: 1;
    transform: scale(1);
}

#icon-close {
    opacity: 0;
    transform: scale(0.8);
}

/* при открытии меню — класс .open на кнопке */
#burger-btn.open #icon-burger {
    opacity: 0;
    transform: scale(0.8);
}

#burger-btn.open #icon-close {
    opacity: 1;
    transform: scale(1);
}