/* ===== NAVBAR ===== */
.navbar {
    position: absolute;
    top: 35px;
    left: 0;
    right: 0;
    transform: none;
    z-index: 10;
    display: flex;
    justify-content: center;
    pointer-events: auto;
    font-family: Telegraf, Inter, system-ui, -apple-system;
}

.navbar-main {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(100% - 32px, 1200px);
    padding: 6px 18px;
    border: 1px solid #5f5f5f3c;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    /* box-shadow: 0 8px 50px rgba(0, 0, 0, .25), inset 0 0 0 1px rgba(255, 255, 255, .06); */
}

.navbar-main img {
    height: 44px;
    width: auto;
}

.navbar-main .navbar-logo+a {
    margin-left: auto;
}

.navbar-main a {
    position: relative;
    display: inline-block;
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
    color: rgb(13, 57, 151);
    font-weight: 600;
    font-size: 18px;
    letter-spacing: .01em;
    transition: opacity .15s ease, transform .12s ease;
}

.navbar-main a:hover {
    opacity: 1;
    transform: translateY(-3px);
    scale: 1.1;
}

/* ===== BURGER ===== */
.navbar-burger {
    display: none;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(127, 127, 127, .24);
    border: 1px solid rgb(13, 57, 151);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .20), inset 0 0 0 1px rgba(255, 255, 255, .06);
    cursor: pointer;
    z-index: 50;
    color: rgb(13, 57, 151);
    font-size: large;
    font-weight: 900;
}

.navbar-burger:hover {
    background: rgba(13, 57, 151, .24);
    color: #000;
}

/* ===== MOBILE ===== */
@media (max-width: 880px) {
    .navbar {
        top: 14px;
        left: 14px;
        justify-content: left;
    }

    .navbar-main {
        display: none;
        visibility: hidden;
        pointer-events: none;
    }

    .navbar-burger {
        display: block !important;
        visibility: visible !important;
        pointer-events: all !important;
    }
}

.navbar-sub {
    display: grid;
    place-items: center;
    width: 70px;
    height: 70px;
    padding: 5px 5px;
    border-radius: 50%;
    background: rgba(127, 127, 127, 0.24);
    border: 1px solid rgba(255, 255, 255, .28);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .20), inset 0 0 0 1px rgba(255, 255, 255, .06);
    transition: transform .12s ease, background-color .2s ease;
}

.navbar-sub:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, .22);
}

.navbar-sub img {
    width: 30px;
    height: 30px;
    opacity: .95;
}

.submenu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translate(-50%, -6px) scale(.98);
    min-width: 300px;
    padding: 10px;
    background: rgba(255, 255, 255, .98);
    color: #111;
    text-align: center;
    justify-content: center;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, .06);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .6);
    backdrop-filter: saturate(1.1) blur(4px);
    z-index: 40;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

.submenu::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    width: 16px;
    height: 16px;
    background: inherit;
    border-left: 1px solid rgba(0, 0, 0, .06);
    border-top: 1px solid rgba(0, 0, 0, .06);
    transform: translateX(-50%) rotate(45deg);
    border-radius: 3px 0 0 0;
}

.submenu a {
    display: block;
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: #111;
    font-size: 13px;
    font-weight: 700;
    color: rgb(13, 57, 151);
}

.submenu a:hover {
    background: #f3f3f3;
}

.nav-item.is-open .submenu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    text-align: center;
}

.nav-item.has-submenu {
    position: relative;
}

@media (max-width: 560px) {
    .submenu {
        min-width: 200px;
    }
}

@media (max-width: 720px) {
    .navbar {
        top: 10px;
        gap: 8px;
    }

    .navbar-main {
        padding: 8px 10px;
    }

    .navbar-main a {
        padding: 8px 10px;
        font-size: 12px;
    }

    .navbar-main a.is-active::after {
        bottom: 5px;
        height: 5px;
    }

    .navbar-sub {
        width: 36px;
        height: 36px;
    }
}

.navbar-main a.is-active {
    font-weight: 800;
}

.submenu a.is-active {
    text-decoration: underline;
    text-underline-offset: 5px;
}

@media (min-width: 881px) {
    .nav-item.has-submenu:hover .submenu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translate(-50%, 0) scale(1);
    }
}

@media (max-width: 880px) {
    .navbar-burger {
        display: grid;
    }

    .navbar-main {
        display: none;
        visibility: hidden;
        pointer-events: none;
    }

    .navbar-main.is-open {
        display: flex;
        visibility: visible;
        pointer-events: auto;
        position: absolute;
        top: 58px;
        left: 14px;
        right: 14px;
        flex-direction: column;
        gap: 6px;
        border-radius: 18px;
        background: rgba(255, 255, 255, .98);
        padding: 12px;
        align-items: center;
        text-align: center;
    }

    .navbar-main .navbar-logo+a {
        margin-left: 0;
    }

    .navbar-main .submenu {
        position: static;
        transform: none;
        box-shadow: none;
    }

    .navbar-main .submenu::before {
        display: none;
    }

    .nav-item.has-submenu .submenu {
        opacity: 0;
        height: 0;
        overflow: hidden;
        text-align: center;
        justify-content: center;
    }

    .nav-item.has-submenu.is-open .submenu {
        opacity: 1;
        height: auto;
        text-align: center;
        justify-content: center;
    }

    .navbar-main a {
        -webkit-tap-highlight-color: transparent;
    }
}

.submenu__separator {
    height: 1px;
    margin: 15px 8px 25px;
    background: rgba(0, 0, 0, .08);
}

.submenu__cta {
    display: block;
    margin: 6px 0 2px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--color-blue-main) !important;
    color: #fff !important;
    font-weight: 800;
    text-align: center;
    white-space: normal;
    line-height: 1.25;
    transition: transform .12s ease, background-color .18s ease, opacity .18s ease;
}

.submenu__cta:hover,
.submenu__cta:focus-visible {
    background: var(--color-logo-blue-secondary) !important;
    transform: translateY(-1px);
    outline: none;
}

@media (max-width: 880px) {
    .submenu__separator {
        margin: 8px 0;
    }
}

/* ===== Language switch ===== */
.lang-switch {
    position: absolute;
    top: 7px;
    right: 16px;
    z-index: 10;
    display: flex;
    gap: 8px;
}

.lang-btn {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: rgba(153, 185, 255, 0.158);
    color: var(--color-blue-main);
    border: 1px solid var(--color-logo-blue-secondary);
    text-decoration: none;
    transition: transform .12s ease, background .2s ease, border-color .2s ease;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    font-weight: 900;
}

.lang-btn.is-active,
.lang-btn[aria-current="true"] {
    background: #ffffff;
    color: #111827;
    border-color: #ffffff;
}

@media (max-width: 900px) {
    .lang-switch {
        top: 7px;
        right: 10px;
        gap: 6px;
    }

    .lang-btn {
        padding: 3px 8px;
        font-size: 11px;
    }
}

.back-to-top {
    position: fixed;
    right: 8px;
    bottom: 100px;
    width: 60px;
    height: 60px;
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 999px;
    background: rgba(255, 255, 255, .75);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    z-index: 1000;

    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, background .2s ease;
}

.back-to-top:hover {
    background: #f2f6ff;
}

.back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

@media (max-width: 560px) {
    .back-to-top {
        right: 8px;
        bottom: 8px;
        width: 44px;
        height: 44px;
        font-size: 14px;
    }
}