/* HEADER */

.av-header {
    --header-height: 112px;

    position: relative;
    z-index: 100;
    width: 100%;
    background: var(--av-white, #ffffff);
    color: var(--av-black, #11141c);
    border-bottom: 1px solid rgba(17, 20, 28, 0.1);
}

.av-header__inner {
    width: min(
            calc(100% - var(--av-header-side, 72px) * 2),
            var(--av-header-container, 1900px)
    );
    height: var(--header-height);
    margin-inline: auto;

    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: clamp(32px, 4vw, 72px);
}

/* LOGO */

.av-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.av-logo__image {
    width: 76px;
    height: 76px;
    display: block;
    object-fit: cover;
    border-radius: 14px;
}

/* DESKTOP NAVIGATION */

.av-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(30px, 3vw, 58px);
}

.av-nav__link {
    position: relative;
    padding: 12px 0;

    color: var(--av-black, #11141c);
    font-size: 17px;
    font-weight: 750;
    line-height: 1;
    letter-spacing: -0.02em;
    text-decoration: none;

    transition: opacity 0.2s ease;
}

.av-nav__link::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 4px;
    left: 0;

    height: 2px;
    background: currentColor;

    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.25s ease;
}

.av-nav__link:hover::after,
.av-nav__link.is-active::after,
.av-nav__link[aria-current="page"]::after {
    transform: scaleX(1);
    transform-origin: left;
}

.av-nav__link:hover {
    opacity: 0.68;
}

/* RIGHT ACTIONS */

.av-header__actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.av-header__cta {
    min-height: 50px;
    padding: 0 22px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 2px solid var(--av-black, #11141c);
    border-radius: 12px;
    background: var(--av-black, #11141c);
    color: var(--av-white, #ffffff);

    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;

    transition: transform 0.2s ease,
    opacity 0.2s ease;
}

.av-header__cta:hover {
    opacity: 0.86;
    transform: translateY(-1px);
}

/* LANGUAGE */

.av-lang {
    position: relative;
}

.av-lang__button {
    min-width: 64px;
    min-height: 50px;
    padding: 0 14px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    border: 1px solid rgba(17, 20, 28, 0.14);
    border-radius: 12px;
    background: var(--av-white, #ffffff);
    color: var(--av-black, #11141c);

    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.av-lang__button:hover {
    background: #f3f4f6;
}

.av-lang__arrow {
    transition: transform 0.2s ease;
}

.av-lang.is-open .av-lang__arrow {
    transform: rotate(180deg);
}

.av-lang__menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;

    min-width: 78px;
    padding: 7px;

    display: grid;
    gap: 4px;

    border: 1px solid rgba(17, 20, 28, 0.12);
    border-radius: 12px;
    background: var(--av-white, #ffffff);
    box-shadow: 0 14px 36px rgba(17, 20, 28, 0.12);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);

    transition: opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease;
}

.av-lang.is-open .av-lang__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.av-lang__option {
    min-height: 38px;
    padding: 0 10px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;
    color: var(--av-black, #11141c);

    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.av-lang__option:hover {
    background: #f3f4f6;
}

.av-lang__option.is-active {
    background: var(--av-black, #11141c);
    color: var(--av-white, #ffffff);
}

/* MENU BUTTON */

.av-menu {
    width: 50px;
    height: 50px;
    padding: 0;

    display: none;
    position: relative;

    border: 1px solid rgba(17, 20, 28, 0.14);
    border-radius: 12px;
    background: var(--av-white, #ffffff);
    cursor: pointer;
}

.av-menu span {
    position: absolute;
    left: 14px;

    width: 20px;
    height: 2px;

    border-radius: 10px;
    background: var(--av-black, #11141c);

    transition: top 0.25s ease,
    transform 0.25s ease;
}

.av-menu span:first-child {
    top: 20px;
}

.av-menu span:last-child {
    top: 28px;
}

.av-menu[aria-expanded="true"] span:first-child {
    top: 24px;
    transform: rotate(45deg);
}

.av-menu[aria-expanded="true"] span:last-child {
    top: 24px;
    transform: rotate(-45deg);
}

/* MOBILE MENU */

.av-mobile {
    position: fixed;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 90;

    display: none;
    overflow-y: auto;

    background: var(--av-white, #ffffff);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);

    transition: opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.25s ease;
}

.av-mobile.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.av-mobile__nav {
    width: min(
            calc(100% - var(--av-header-side, 36px) * 2),
            var(--av-header-container, 1900px)
    );
    min-height: 100%;
    margin-inline: auto;
    padding: 48px 0;

    display: flex;
    flex-direction: column;
}

.av-mobile__link {
    padding: 23px 0;
    border-bottom: 1px solid rgba(17, 20, 28, 0.12);

    color: var(--av-black, #11141c);
    font-size: clamp(34px, 9vw, 58px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.055em;
    text-decoration: none;
}

.av-mobile__link:first-child {
    border-top: 1px solid rgba(17, 20, 28, 0.12);
}

.av-mobile__link.is-active,
.av-mobile__link[aria-current="page"] {
    color: rgba(17, 20, 28, 0.48);
}

.av-mobile__cta {
    min-height: 68px;
    margin-top: 34px;
    padding: 0 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-radius: 14px;
    background: var(--av-black, #11141c);
    color: var(--av-white, #ffffff);

    font-size: 19px;
    font-weight: 800;
    text-decoration: none;
}

/* TABLET */

@media (max-width: 1100px) {
    .av-header {
        --header-height: 96px;
    }

    .av-header__inner {
        gap: 28px;
    }

    .av-logo__image {
        width: 66px;
        height: 66px;
    }

    .av-nav {
        gap: 26px;
    }

    .av-nav__link {
        font-size: 15px;
    }

    .av-header__cta {
        display: none;
    }
}

/* MOBILE */

@media (max-width: 820px) {
    .av-header {
        --header-height: 88px;
    }

    .av-header__inner {
        width: calc(100% - 40px);
        grid-template-columns: auto 1fr auto;
        gap: 14px;
    }

    .av-logo__image {
        width: 60px;
        height: 60px;
        border-radius: 11px;
    }

    .av-nav {
        display: none;
    }

    .av-header__actions {
        grid-column: 3;
        gap: 10px;
    }

    .av-lang__button {
        min-width: 58px;
        min-height: 48px;
    }

    .av-menu {
        display: block;
    }

    .av-mobile {
        display: block;
    }
}

@media (max-width: 420px) {
    .av-header__inner {
        width: calc(100% - 28px);
    }

    .av-logo__image {
        width: 56px;
        height: 56px;
    }

    .av-lang__button {
        min-width: 54px;
        padding: 0 10px;
    }

    .av-mobile__nav {
        width: calc(100% - 28px);
    }
}