/* ============================================
   NAVIGATION — Eurasia Capital 2026
   Premium financial brand
   ============================================ */

/* --- Main Navigation Bar --- */
.nav-main {
    position: relative;
    background: #fff;
    z-index: 900;
    border-bottom: 1px solid rgba(56, 71, 131, 0.06);
}

.nav-main__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    max-width: 1198px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Logo — original size, lifted up to sit between upper_header and nav */
.nav-main__logo {
    flex-shrink: 0;
    margin-top: -20px;
    margin-right: 10px;
}

.nav-main__logo img {
    display: block;
}

/* --- Desktop Navigation --- */
.nav-main__menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.nav-main__item {
    position: relative;
}

.nav-main__link {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 8px 7px;
    font-size: 13px;
    font-weight: 500;
    color: #252525;
    white-space: nowrap;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
}

.nav-main__link:hover,
.nav-main__link:focus {
    background: #EFF4FC;
    color: #384783;
    opacity: 1;
}

/* Chevron */
.nav-main__link .nav-arrow {
    width: 14px;
    height: 14px;
    transition: transform 0.25s ease;
    opacity: 0.4;
    flex-shrink: 0;
}

.nav-main__item:hover .nav-arrow {
    transform: rotate(180deg);
    opacity: 0.7;
}

/* --- Dropdown (vertical, below item) --- */
.nav-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 240px;
    background: #ffffff;
    border: 1px solid rgba(56, 71, 131, 0.06);
    border-radius: 14px;
    box-shadow:
        0 16px 48px rgba(56, 71, 131, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.03);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 200;
    pointer-events: none;
}

.nav-main__item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Bridge to prevent hover gap */
.nav-main__item::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
}

.nav-dropdown__link {
    display: block;
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 400;
    color: #252525;
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.15s ease, color 0.15s ease;
    line-height: 1.5;
}

.nav-dropdown__link:hover,
.nav-dropdown__link:focus {
    background: #EFF4FC;
    color: #384783;
    opacity: 1;
}

/* --- Right Section (burger) — always far right --- */
.nav-main__right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
}

/* --- Burger Button --- */
.nav-burger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.2s;
    padding: 0;
    position: relative;
    z-index: 1100;
}

.nav-burger:hover {
    background: #EFF4FC;
}

.nav-burger__icon {
    width: 22px;
    height: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.nav-burger__icon span {
    display: block;
    height: 2px;
    width: 100%;
    background: #252525;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.2s ease;
    transform-origin: center;
}

.nav-burger.is-active .nav-burger__icon span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-burger.is-active .nav-burger__icon span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-burger.is-active .nav-burger__icon span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- Mobile Slide Panel --- */
.nav-mobile {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 360px;
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    z-index: 1050;
    overflow-y: auto;
    overscroll-behavior: contain;
    transition: right 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    padding: 90px 24px 32px;
    -webkit-overflow-scrolling: touch;
}

.nav-mobile.is-open {
    right: 0;
}

/* Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(20, 26, 40, 0.45);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.nav-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Mobile items */
.nav-mobile__menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-mobile__item {
    border-bottom: 1px solid rgba(56, 71, 131, 0.06);
}

.nav-mobile__item:last-child {
    border-bottom: none;
}

.nav-mobile__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 8px;
    font-size: 16px;
    font-weight: 500;
    color: #252525;
    text-decoration: none;
    transition: color 0.2s;
    cursor: pointer;
}

.nav-mobile__link:hover,
.nav-mobile__link:focus {
    color: #384783;
    opacity: 1;
}

.nav-mobile__link .nav-arrow-mobile {
    width: 20px;
    height: 20px;
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    opacity: 0.3;
    flex-shrink: 0;
}

.nav-mobile__item.is-expanded .nav-arrow-mobile {
    transform: rotate(180deg);
    opacity: 0.6;
}

/* Accordion submenu */
.nav-mobile__sub {
    list-style: none;
    margin: 0;
    padding: 0 0 8px 8px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.nav-mobile__item.is-expanded .nav-mobile__sub {
    max-height: 500px;
}

.nav-mobile__sub-link {
    display: block;
    padding: 11px 16px;
    font-size: 15px;
    font-weight: 400;
    color: #3d4555;
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-mobile__sub-link:hover,
.nav-mobile__sub-link:focus {
    background: #EFF4FC;
    color: #384783;
    opacity: 1;
}

/* Mobile contacts */
.nav-mobile__contacts {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(56, 71, 131, 0.07);
}

.nav-mobile__contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 8px;
    font-size: 14px;
    color: #384783;
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.15s;
}

.nav-mobile__contact-link:hover {
    background: rgba(56, 71, 131, 0.04);
    opacity: 1;
}

.nav-mobile__contact-link img {
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

.nav-mobile__cta {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 14px 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: #384783;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.1s ease;
}

.nav-mobile__cta:hover {
    background: #2c3a6b;
    color: #fff;
    opacity: 1;
}

.nav-mobile__cta:active {
    transform: scale(0.98);
}

/* --- Responsive --- */

@media (max-width: 1286px) {
    .nav-main__link {
        padding: 7px 6px;
        font-size: 12.5px;
    }

    .nav-main__logo img {
        height: 35px;
    }

    .nav-main__logo {
        margin-top: -16px;
    }
}

@media (max-width: 1080px) {
    .nav-main__link {
        padding: 6px 5px;
        font-size: 11.5px;
        gap: 2px;
    }

    .nav-main__link .nav-arrow {
        width: 11px;
        height: 11px;
    }

    .nav-main__inner {
        height: 70px;
    }

    .nav-main__logo img {
        height: 30px;
    }

    .nav-main__logo {
        margin-top: -12px;
    }
}

@media (max-width: 960px) {
    .nav-main__link {
        padding: 5px 4px;
        font-size: 11px;
        gap: 1px;
    }

    .nav-main__link .nav-arrow {
        width: 10px;
        height: 10px;
    }

    .nav-main__logo img {
        height: 26px;
    }

    .nav-main__logo {
        margin-top: -10px;
        margin-right: 6px;
    }
}

@media (max-width: 860px) {
    .nav-main__menu {
        display: none;
    }

    .nav-burger {
        display: flex;
    }

    .nav-main__inner {
        height: 64px;
    }

    .nav-main__logo img {
        height: 28px;
    }

    .nav-main__logo {
        margin-top: -10px;
    }
}

/* Hide nav logo exactly when upper_header logo appears (833px) */
@media (max-width: 833px) {
    .nav-main__logo {
        display: none;
    }
}

@media (max-width: 420px) {
    .nav-mobile {
        max-width: 100%;
        padding: 80px 16px 28px;
    }
}

/* Prevent body scroll when mobile menu open */
body.nav-mobile-open {
    overflow: hidden;
}
