/*---HEADER---*/
.header {
    width: 100%;
    max-width: 100%;
    background-color: var(--gray-accent);
    position: sticky;
    position: -webkit-sticky;
    top: 0;
    left: 0;
    z-index: 99;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}
.header.transparent {
    background-color: #ffffffbf;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}
.header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 300px;
    max-height: 110px;
    aspect-ratio: 5 / 2;
    transition: all .25s ease-in-out;
    margin: 5px auto 5px 40px;
}
.header-contacts {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    gap: 0.5rem;
    margin-left: auto;
    margin-right: 40px;
}
.header-contacts > a {
    margin: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}
.header-contacts > a > i {
    color: var(--blue-accent);
    /* background: linear-gradient(var(--blue-dark), #4e7191); */
    background-color: var(--blue-accent);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: var(--fs-30);
    transition: all 0.25s ease-in-out;
}
.header-contacts > a > i:hover,  .header-contacts > a > i:active{
    opacity: 0.85;
}
.header-contacts > a > .expand {
    transition: all .25s ease-in-out;
    color: var(--blue-accent);
    align-items: center;
    font-family: Oswald;
    font-size: 0;
}
.header-contacts > a:hover > .expand {
    font-size: var(--fs-20);
    margin: 0 5px;
}
.header-navigation {
    background-color: var(--blue-accent);
    width: 100%;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    min-height: 44px;
}
#menuButton {
    display: none;
    color: var(--gray-accent);
    background-color: var(--blue-accent);
    font-family: Oswald;
    font-size: 24px;
    line-height: 1;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 10px;
    transition: color 0.25s ease-in-out;
}
.header-navigation_list {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    height: 100%;
}
.header-navigation_list > li {
    display: block;
    width: 20%;
    text-align: center;
    height: 100%;
}
.header-navigation_list > li > a {
    color: var(--gray-accent);
    font-family: Oswald;
    font-size: var(--fs-24);
    line-height: 1;
    text-transform: uppercase;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    height: 100%;
    letter-spacing: 1.2px;
}
.header-navigation_list > li > a.active {
    background-color: var(--blue-dark);
}
.dropdown {
    position: relative;
}
.sub-menu {
    display: none;
    position: absolute;
    overflow: auto;
    background-color: var(--gray-accent);
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    top: 44px;
    width: 100%;
}
.sub-menu > li > a {
    font-family: Oswald;
    display: block;
    color: var(--blue-accent);
    padding: 10px;
    font-size: 18px;
    text-align: left;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    white-space: wrap;
    text-align: left;
}
.header-navigation.open .header-navigation_list {
    background-color: var(--gray-accent);
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}
.header-navigation.open .sub-menu {
    left: 100%;
    top: 0;
    width: max-content;
}
.header-navigation.open .sub-menu > li > a {
    white-space: nowrap;
    width: 100%;
    padding: 12px;
    font-size: 14px !important;
}
body:has(.reduced_header) .header-logo, body:has(.reduced_header) .header-contacts {
    display: none;
}
/*---MEDIA QUERIES---*/
@media (hover: none) or (pointer: coarse) {
    .expand {
        display: none;
    }
}
@media screen and (min-width: 751px) {
    .header-navigation_list > li > a:hover, .header-navigation_list > li > a:active {
        background-color: var(--blue-dark);
        color: var(--gray-accent);
    }
    .dropdown:hover .sub-menu {
        display: block !important;
        z-index: 1;
    }
    .dropdown:has(.sub-menu > li > a:hover, .sub-menu > li > a:focus) > a {
        color: var(--gray-accent);
        background-color: var(--blue-dark);
    }
    /* .dropdown:hover .sub-menu {
        visibility: visible;
        max-height: unset;
        opacity: 1;
        transition: opacity 500ms;
        box-shadow: none;
    } */
    .sub-menu > li > a:is(:hover, :active) {
        color: var(--blue-accent);
        background-color: var(--gray-mid);
    }
    .sub-menu-trigger {
        display: none;
    }
}
@media screen and (max-width: 750px) {
    body:has(.reduced_header) .header-contacts {
        display: flex;
    }   
    .header-logo {
        margin: 5px auto;
        width: 100%;
    }
    .header-navigation {
        min-height: unset;
    }
    .header-navigation_list {
        height: unset;
        align-items: baseline;
    }
    #menuButton {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: auto;
        transition: opacity 0.25s ease-in-out;
    }
    #menuButton:hover {
        opacity: 0.85;
    }
    .header-contacts {
        width: 100%;
        background-color: var(--blue-accent);
        margin: 0;
        padding: 0 20px 0 10px;
        box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    }
    .header-contacts > a > i {
        color: var(--gray-accent);
        background: none;
        background-clip: unset;
        -webkit-background-clip: unset;
        -webkit-text-fill-color: unset;
        font-size: 24px;
    }
    .header-contacts > a > .expand {
        color: var(--gray-accent);
    }
    .header-contacts > a:hover > .expand {
        font-size: var(--fs-16);
    }
    .header-navigation_list {
        background-color: var(--gray-accent);
        color: var(--blue-accent);
    }
    .header-navigation .header-navigation_list {
        display: flex;
        flex-direction: column;
        position: absolute;
        width: 100%;
        z-index: -100;
        left: -111%;
        opacity: 0;
        visibility: hidden;
        transition: opacity 300ms ease-in-out, 
                    visibility 0s linear 300ms, 
                    left 0s linear 300ms;
        padding: 20px 0px;
    }
    .header-navigation.open .header-navigation_list {
        visibility: visible;
        opacity: 1;
        z-index: 0;
        left: 0;
        transition: opacity 300ms ease-in-out, 
                    visibility 0s linear 0s, 
                    left 0s linear 0s;
    }
    /* @keyframes fadeOutMobileMenu {
        from { opacity: 1 }
        to { opacity: 0 }
    } */
    .header-navigation_list > li {
        background-color: var(--gray-accent);
        width: 100%;
    }
    .header-navigation_list > li > a {
        color: inherit;
        font-size: 18px;
        text-align: left;
        padding: 10px 20px;
        min-height: 50px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
    }
    .sub-menu {
        display: none;
        position: relative;
        box-shadow: none;
        /* visibility: hidden;
        max-height: 0;
        opacity: 0; */
    }
    .sub-menu-trigger {
        padding: 5px 10px;
    }
    .header-navigation.open .sub-menu {
        left: 0;
        top: 0;
        width: 100%;
    }
    .sub-menu > li > a {
        text-align: center;
        border-bottom: 1px solid var(--gray-mid);
        font-size: 14px !important;
    }
    .menu-item-has-children.is-open > a {
        color: var(--gray-accent);
        background-color: var(--blue-accent);
        transition: all 0.25s ease-in-out;
    }
    .menu-item-has-children .sub-menu-trigger i {
        transition: transform 0.3s ease;
    }
    .menu-item-has-children.is-open > a .sub-menu-trigger i {
        transform: rotate(180deg);
    }
}
@media screen and (max-width: 600px) {
    .header-logo {
        display: none;
    }
}
@media screen and (max-height: 600px) {
    .header-logo {
        width: 150px !important;
    }
}
@media (prefers-color-scheme: dark) {
    .header {
        background-color: var(--blue-dark);
    }
    .header.transparent {
        background-color: var(--blue-dark);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    .header-logo {
        filter: brightness(0) invert(1);
        -webkit-filter: brightness(0) invert(1);
    }
    .header-contacts, .header-navigation {
        background-color: var(--blue-dark);
        box-shadow: 0 -1px 0 0 var(--blue-accent), 
                    0 5px 10px 0px #00000061;
    }
    #menuButton {
        background-color: var(--blue-dark);
    }
    .header-navigation_list {
        background-color: var(--blue-accent) !important;
    }
    .header-navigation.open .header-navigation_list, 
    .header-navigation_list > li {
        background-color: var(--blue-accent);
    }
    .header-navigation_list > li > a:hover, .header-navigation_list > li > a:active {
        background-color: var(--blue-accent);
    }
    .header-navigation_list > li > a {
        color: var(--gray-accent);
    }
    .sub-menu {
        background-color: var(--blue-accent);
    }
    .sub-menu > li > a {
        color: var(--gray-accent);
        border-bottom: 1px solid var(--blue-accent);
    }
    .sub-menu > li:first-child > a {
        border-top: 1px solid var(--blue-accent);
    }
    .sub-menu > li:last-child > a {
        border-bottom: none;
    }
    .dropdown:has(.sub-menu > li > a:hover, .sub-menu > li > a:focus)>a {
        background-color: var(--blue-accent);
    }
}
@media (prefers-color-scheme: dark) and (min-width: 751px) {
    .header-contacts {
        box-shadow: none;
    }
    .header-contacts > a > i {
        color: var(--gray-accent);
        background-color: var(--gray-accent);
    }
    .header-contacts > a > .expand {
        color: var(--gray-accent);
    }
    .header-navigation.open .header-navigation_list, 
    .header-navigation_list > li {
        background-color: var(--blue-dark);
    }
    .header-navigation_list > li > a:hover, .header-navigation_list > li > a:active {
        background-color: var(--blue-accent);
    }
    .sub-menu {
        background-color: var(--blue-mid);
    }
    .sub-menu > li > a {
        border: none;
    }
    .sub-menu > li:first-child > a {
        border-top: none;
    }
}
@media (prefers-color-scheme: dark) and (max-width: 750px) {
    .sub-menu {
        background-color: #495f7538;
    }
}