:root {
    --dark-blue: #1B1A7E;
    --light: #ffffff;
    --dark: #333333;
    --great-transition: all 200ms ease;
}

.inner {
    max-width: 1248px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

.user-icon {
    display: block;
    width: 20px;
    height: 20px;
    -webkit-mask-image: url(/assets/img/icons/user-icon.svg);
    mask-image: url(/assets/img/icons/user-icon.svg);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-position: center center;
    mask-position: center center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    background-color: var(--dark-blue);
    transition: var(--great-transition);
}

.phone-fat-icon {
    display: block;
    width: 20px;
    height: 20px;
    -webkit-mask-image: url(/assets/img/icons/phone-fat-icon.svg);
    mask-image: url(/assets/img/icons/phone-fat-icon.svg);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-position: center center;
    mask-position: center center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    background-color: var(--light);
    transition: var(--great-transition);
}

.eye-icon {
    display: block;
    width: 20px;
    height: 20px;
    -webkit-mask-image: url(/assets/img/icons/eye-icon.svg);
    mask-image: url(/assets/img/icons/eye-icon.svg);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-position: center center;
    mask-position: center center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    background-color: var(--dark-blue);
    transition: var(--great-transition);
}

.loup-icon {
    display: block;
    width: 20px;
    height: 20px;
    -webkit-mask-image: url(/assets/img/icons/loup-icon.svg);
    mask-image: url(/assets/img/icons/loup-icon.svg);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-position: center center;
    mask-position: center center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    background-color: var(--dark-blue);
    transition: var(--great-transition);
}

.arrow-icon {
    display: block;
    width: 20px;
    height: 20px;
    -webkit-mask-image: url(/assets/img/icons/arrow-icon.svg);
    mask-image: url(/assets/img/icons/arrow-icon.svg);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-position: center center;
    mask-position: center center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    background-color: var(--dark-blue);
    transition: var(--great-transition);
}

.inline-btn {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.14;
    color: var(--dark-blue);
    cursor: pointer;

    span {
        flex-shrink: 0;
        width: 20px;
        height: 20px;
    }
}
.icon-btn{
    display: flex;
    padding: 10px 20px;
    border: 1px solid var(--dark-blue);
    border-radius: 8px;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.12;
    color: var(--dark-blue);
    span{
        width: 24px;
        height: 24px;
        background-color: var(--dark-blue);
    }
}
/***********************************************************************************/
#header {
    position: relative;
    padding-bottom: 10px;
    z-index: 11;
    .burger-btn {
        margin-left: auto;
    }

    &.show-menu {

        .header-mobile {
            opacity: 1;
            visibility: visible;
        }

        .burger-btn {
            span {
                opacity: 0;
            }

            &::before {
                top: 50%;
                transform: translateY(-50%) rotate(45deg);
            }

            &::after {
                bottom: 50%;
                transform: translateY(50%) rotate(-45deg);
            }
        }
    }
}

.header__top {
    display: flex;
    align-items: center;
    gap: 36px;
    padding: 16px 0;
    box-sizing: border-box;
}

.header-search-form {
    flex-grow: 1;
    position: relative;
    display: grid;
    gap: 8px;
    margin: 0;
    margin-left: auto;
    grid-template-columns: 0fr 71px;
    justify-content: end;
    transition: all 200ms ease;


    &.active {
        grid-template-columns: 1fr 71px;
    }

    label {
        position: absolute;
        top: 0;
        left: 0;
        opacity: 0;
        visibility: hidden;
    }

    .header-search-field {
        min-width: 0;
        display: block;
        padding: 0;
        border: none;
        border-bottom: 1px solid var(--dark-blue);
        outline: none;
        transition: all 200ms ease;
    }

    .inline-btn {
        padding: 0;
        margin: 0;
        border: none;
        background-color: transparent;
    }
}

.header__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--dark-blue);
    margin-top: 10px;
    gap: 20px;
    padding: 16px;
    border-radius: 8px;
    box-sizing: border-box;
}

.buy-policy {
    position: relative;

    .buy-policy__btn {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 16px;
        min-height: 44px;
        border-radius: 8px;
        border: none;
        outline: none;
        background-color: var(--light);
        font-size: 16px;
        line-height: 1;
        color: var(--dark-blue);
        box-sizing: border-box;
        cursor: pointer;

        span {
            display: block;
            width: 20px;
            height: 20px;
            background-color: var(--dark-blue);
        }

    }

    .buy-policy__menu {
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        width: 266px;
        display: flex;
        flex-direction: column;;
        gap: 8px;
        padding: 12px 8px;
        margin: 0;
        list-style-type: none;
        border-radius: 8px;
        background-color: var(--light);
        box-sizing: border-box;
        transition: all 200ms ease;
        transform: scaleY(0);
        transform-origin: center top;
        opacity: 0;

        li {
            a {
                display: block;
                padding: 12px;
                font-size: 16px;
                border-radius: 8px;
                line-height: 1.12;
                color: var(--dark);
                transition: all 200ms ease;
                box-sizing: border-box;

                &:hover {
                    background-color: #F2F8FC;
                }

                &:active {
                    background-color: var(--dark-blue);
                    color: var(--light);
                }
            }
        }
    }

    &.active {
        .buy-policy__btn {
            span {
                transform: scaleY(-1);
            }
        }

        .buy-policy__menu {
            transform: scaleY(1);
            opacity: 1;
        }

    }
}

.main-menu {
    display: flex;
    gap: 24px;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style-type: none;

    li {
        position: relative;

        &:hover {
            .inner-menu {
                opacity: 1;
                visibility: visible;
            }
        }

        a {
            display: block;
            font-size: 16px;
            line-height: 1.12;
            color: var(--light);
        }
    }
}

.inner-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 295px;
    display: flex;
    flex-direction: column;;
    gap: 8px;
    padding: 12px 8px;
    margin: 0;
    list-style-type: none;
    border-radius: 8px;
    background-color: var(--light);
    box-sizing: border-box;
    transition: all 200ms ease;
    opacity: 0;
    visibility: hidden;

    li {
        a {
            display: block;
            padding: 12px;
            font-size: 16px;
            border-radius: 8px;
            line-height: 1.12;
            color: var(--dark);
            transition: all 200ms ease;
            box-sizing: border-box;

            &:hover {
                background-color: #F2F8FC;
            }

            &:active {
                background-color: var(--dark-blue);
                color: var(--light);
            }
        }
    }
}

.header-tel {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 20px;
    line-height: 1;
    font-weight: 700;
    color: var(--light);

    span {
        background-color: var(--light);
    }
}

.burger-btn {
    position: relative;
    display: none;
    width: 26px;
    height: 18px;
    background-color: transparent;
    border: none;
    outline: none;
    cursor: pointer;

    span {
        position: absolute;
        top: 50%;
        left: 0;
        width: 100%;
        height: 2px;
        border-radius: 2px;
        background-color: var(--dark-blue);
        transform: translateY(-50%);
        transition: all 200ms ease;
    }

    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 2px;
        border-radius: 2px;
        background-color: var(--dark-blue);
        transition: all 200ms ease;
    }

    &::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 2px;
        border-radius: 2px;
        background-color: var(--dark-blue);
        transition: all 200ms ease;
    }
}
.decor-line{
    height: 1px;
    background-color: #D0E3F0;
}
.header-mobile {
    position: fixed;
    display: flex;
    flex-direction: column;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    padding-top: 80px;
    padding-bottom: 40px;
    background-color: var(--light);
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    box-sizing: border-box;
    transition: all 200ms ease;

    .inner {
        position: relative;
        flex-grow: 1;
        overflow: auto;
    }

    .buy-policy {
        .buy-policy__btn {
            width: 100%;
            justify-content: space-between;
            padding: 10px 20px;
            min-height: 48px;
            background-color: var(--dark-blue);
            font-size: 18px;
            color: var(--light);

            span {
                background-color: var(--light);
            }
        }

        .buy-policy__menu {
            position: relative;
            top: 0;
            left: 0;
            width: 100%;
            border-radius: 8px;
            background-color: var(--light);
            transform: scaleY(1);
            opacity: 1;
        }
        .buy-policy__body{
            position: relative;
            display: grid;
            margin-top: 10px;
            grid-template-rows: 0fr;
            transition: all 200ms ease;
            overflow: hidden;
        }
        .buy-policy__content{
            min-height: 0;
        }
        &.active{
            .buy-policy__body{
                grid-template-rows: 1fr;
                overflow: visible;
            }
            .buy-policy__menu{
                box-shadow: 0 4px 16px 0 rgba(51, 51, 51, 0.2);
            }
        }
    }
    .header-search-form{
        margin-bottom: 24px;
        padding: 0 20px;
        grid-gap: 14px;
        justify-content: start;
        align-items: end;
        grid-template-columns: 80px 0fr ;
        box-sizing: border-box;
        .header-search-field{
            height: 24px;
            order: 2;
            border-bottom: 1px solid var(--dark);
        }
        .inline-btn{
            order: 1;
            color: var(--dark);
            span{
                background-color: var(--dark);
            }
        }
        &.active{
            grid-template-columns: 71px 1fr ;
        }
    }
    .inline-btn{
        margin-top: 24px;
        font-size: 16px;
        color: var(--dark);
        span{
            width: 24px;
            height: 24px;
            background-color: var(--dark);
        }
    }
    .header-tel{
        margin-top: 24px;
        width: fit-content;
        color: var(--dark-blue);
        font-size: 24px;
        span{
            width: 31px;
            height: 31px;
            background-color: var(--dark-blue);
        }
    }
    .icon-btn{
        margin-top: 24px;
    }
}
.mobile-main-menu{
    display: flex;
    flex-direction: column;
    padding: 24px 20px;
    margin: 0;
    gap: 16px;
    list-style-type: none;
    box-sizing: border-box;
    li{
        a{
            font-size: 18px;
            line-height: 1.12;
            color: var(--dark-blue);
        }
    }
}
.additional-menu{
    display: flex;
    flex-direction: column;
    padding: 24px 20px 16px 20px;
    margin: 0;
    gap: 16px;
    list-style-type: none;
    box-sizing: border-box;
    li{
        a{
            font-size: 16px;
            line-height: 1.12;
            color: var(--dark);
        }
    }
}

.great-shadow{
    position: fixed;
    display: flex;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.3);
    overflow: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 30px;
    box-sizing: border-box;
    z-index: 1000;
    transition: all 200ms ease;
}
.great-shadow--hide-modal{
    .modal{
        opacity: 0;
        visibility: hidden;
    }
}
.great-shadow--hide{
    opacity: 0;
    visibility: hidden;
}
.modal{
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 500px;
    gap: 20px;
    padding: 30px;
    border-radius: 16px;
    background-color: #ffffff;
    box-sizing: border-box;
    transition: all 200ms ease;
}
.modal__header{
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: flex-start;
}
.modal__close-btn{
    position: relative;
    background-color: transparent;
    border: none;
    outline: none;
    width: 20px;
    height: 20px;
    cursor: pointer;

    &::before{
        content: '';
        position: absolute;
        display: block;
        top: 50%;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: #1B1A7E;
        transform: translateY(-50%) rotate(45deg); 
    }
    &::after{
        content: '';
        position: absolute;
        display: block;
        top: 50%;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: #1B1A7E;
        transform: translateY(-50%) rotate(-45deg);
    }
}
.modal__title{
    font-size: 24px;
    font-weight: 500;
}
/*=================================================*/

@media screen and (max-width: 1200px) {
    .header-tel {
        font-size: 0;
        gap: 0;
    }

    .main-menu {
        gap: 20px;
    }
}

@media screen and (max-width: 999px) {
    body{
        padding-top: 59px;
        box-sizing: border-box;
    }
    #header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        padding-bottom: 0;
        background-color: var(--light);
        box-shadow: 0 0 19px 1px rgba(51, 51, 51, 0.16);

        & > .inner {
            position: relative;
            z-index: 11;
        }
    }

    .header__top {
        padding: 10px 0;

        .header-search-form {
            display: none;
        }

        .inline-btn {
            display: none;
        }

    }

    .burger-btn {
        display: block;
    }

    .header__bottom {
        display: none;
    }
}

@media screen and (max-width: 800px) {
    .inner {
        padding: 0 16px;
    }
}

@media screen and (max-width: 380px){
    .mobile-main-menu {
        padding: 24px 0;
    }
    .additional-menu {
        padding: 24px 0 16px 0;
    }
    .header-mobile {
        .header-search-form {
            padding: 0;
        }
    }
}

.header-search-form, .inline-btn[href="/?special_version=Y"] {
    display: none;
}
.logo{
    margin-right: auto;
}
