* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

header {
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
}

/* ───── HEADER ───── */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.container-head {
    width: 100%;
    height: 104px;
}

.container-nav {
    position: relative;
    width: 100%;
    height: 104px;
    background: #001435;
    overflow: hidden;
}

/* ── «Веер» из лепестков — абсолютно слева ──
   ВАЖНО №1: mix-blend-mode задан CSS-ом на <img>, потому что
   blend-режим внутри самого SVG-файла через <img> с фоном страницы не смешивается.
   ВАЖНО №2: .elips создаёт stacking context (absolute + z-index),
   поэтому overlay видит только фон САМОГО .elips — без background: #001435
   здесь лепестки останутся белыми. */
.elips {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 412px;   /* ширина самого широкого лепестка */
    height: 104px;
    background: #001435;   /* тот же цвет, что у шапки — обязателен для overlay */
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}
.elips img {
    position: absolute;
    left: 0;
    bottom: 0;          /* все лепестки заякорены в левый нижний угол кадра */
    display: block;
    mix-blend-mode: overlay;
}

/* ── Внутренний контейнер: как на макете — контент ~1320px по центру ── */
.header-inner {
    position: relative;
    z-index: 10;
    max-width: 1820px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* ── Logo ── */
.logo {
    flex-shrink: 0;
}
.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.logo img {
    height: 34px;
    display: block;
}

/* ── Main nav ── */
nav.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 4px;
    text-decoration: none;
    transition: color 0.2s;
}
.nav-item:hover {
    color: #1D93FF;
}

.nav-item .arrow {
    width: 10px;
    height: 6px;
    flex-shrink: 0;
}
.arrow {
    transition: transform 0.2s ease;
}
.nav-item.open > .arrow {
    transform: rotate(180deg);
}

/* ── Right action buttons ── */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* капсула Демо + Спробувати */
.btn-group {
    display: flex;
    align-items: center;
    height: 44px;
    background: #263755;
    border-radius: 100px;
}

.btn-demo {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 28px;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    border-radius: 100px;
    transition: background 0.2s;
}
.btn-demo:hover {
    background: rgba(255, 255, 255, 0.06);
}

.btn-cta {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 30px;
    background: #FF9000;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-cta:hover {
    background: #E07C00;
}

.btn-ghost {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 26px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 400;
    white-space: nowrap;
    text-decoration: none;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.btn-ghost:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

/* ── Language selector ── */
.lang-selector {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 44px;
    padding: 0 14px;
    background: #000E23;
    border-radius: 10px;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.lang-selector:hover {
    background: #021A40;
}
.main-nav.open > .arrow {
    transform: rotate(180deg);
}

/* ── Dropdowns ── */
.nav-dropdown {
    position: fixed;
    top: 104px;
    min-width: 240px;
    background: #001435;
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 6px;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 99999;
}
.nav-item.open > .nav-dropdown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
    top: 92px;
}

.lang-dropdown {
    position: fixed;
    top: 92px;
    min-width: 200px;
    background: #001435;
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 6px;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 99999;
}
.lang-selector.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-section {
    padding: 4px 0;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 4px;
}
.dropdown-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.dropdown-section-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px 6px;
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.dropdown-link:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}
.dropdown-link-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}
.dropdown-link-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.dropdown-link-title {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    line-height: 1.3;
}
.dropdown-link-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1.3;
}

/* ─── HAMBURGER BUTTON ─── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 1001;
    flex-shrink: 0;
    margin-left: auto;
}
.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.32s cubic-bezier(.4,0,.2,1), opacity 0.22s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ─── MOBILE DRAWER ─── */
.mobile-nav-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background: #001435;
    z-index: 1000;
    border-top: 1px solid rgba(255,255,255,0.08);
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.36s cubic-bezier(.4,0,.2,1), opacity 0.28s ease;
    -webkit-overflow-scrolling: touch;
}
.mobile-nav-drawer.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.mobile-drawer-inner {
    padding: 8px 0 32px;
}

.mobile-drawer-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.25);
    padding: 20px 20px 6px;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    color: rgba(255,255,255,0.9);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    gap: 8px;
    transition: background 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.mobile-nav-link:active { background: rgba(255,255,255,0.06); }
.mobile-nav-link.has-sub .mobile-arrow {
    width: 16px;
    height: 16px;
    opacity: 0.45;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}
.mobile-nav-link.has-sub.sub-open .mobile-arrow { transform: rotate(180deg); opacity: 0.8; }
.mobile-nav-link.has-sub.sub-open { color: #1D93FF; }

.mobile-submenu {
    display: block;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.32s cubic-bezier(.4,0,.2,1);
    background: rgba(255,255,255,0.03);
    border-top: 1px solid rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.mobile-submenu.open { max-height: 400px; }

.mobile-submenu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px 11px 32px;
    color: rgba(255,255,255,0.65);
    font-size: 14px;
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
    -webkit-tap-highlight-color: transparent;
}
.mobile-submenu a:active { background: rgba(255,255,255,0.05); }

.mobile-submenu-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 17px;
}
.mobile-submenu-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.mobile-submenu-title {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    line-height: 1.3;
}
.mobile-submenu-desc {
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    line-height: 1.3;
}

.mobile-divider {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin: 8px 20px;
}

.mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 20px 0;
}
.mobile-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 13px 16px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s, border-color 0.2s, opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.mobile-actions a:active { opacity: 0.85; }
.mobile-actions .m-btn-cta   { background: #FF9000; color: #fff; border: none; }
.mobile-actions .m-btn-demo  { background: #263755; color: #fff; border: none; }
.mobile-actions .m-btn-ghost { background: transparent; color: rgba(255,255,255,0.75); border: 1px solid rgba(255,255,255,0.28); border-radius: 10px; }

.mobile-lang-block {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    flex-wrap: wrap;
}
.mobile-lang-label {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-right: 4px;
}
.mobile-lang-btn {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.12);
    transition: background 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.mobile-lang-btn:hover,
.mobile-lang-btn.active { background: rgba(29,147,255,0.18); color: #1D93FF; border-color: #1D93FF; }

.mobile-drawer-safe { height: env(safe-area-inset-bottom, 0px); }

/* ─── ШИРОКИЙ НОУТБУК (≤1440px): чуть ужимаем, чтобы всё влезло ─── */
@media (max-width: 1440px) {
    .nav-item { font-size: 15px; padding: 8px 9px; }
    .btn-demo  { padding: 0 20px; font-size: 15px; }
    .btn-cta   { padding: 0 22px; font-size: 15px; }
    .btn-ghost { padding: 0 18px; font-size: 15px; }
    .header-actions { gap: 8px; }
}

/* ─── TABLET (≤1180px) ─── */
@media (max-width: 1180px) {
    .container-head,
    .container-nav {
        height: 72px;
    }
    .elips {
        transform: scale(0.692);   /* 72 / 104 — веер ужимается вместе с шапкой */
        transform-origin: left bottom;
    }
    nav.main-nav { gap: 0; }
    .nav-item { font-size: 13px; padding: 6px 7px; }
    .nav-item .arrow { width: 9px; }
    .logo img { height: 26px; }
    .header-actions { gap: 6px; }
    .btn-group { height: 38px; }
    .btn-demo  { padding: 0 14px; font-size: 13px; }
    .btn-cta   { height: 38px; padding: 0 16px; font-size: 13px; }
    .btn-ghost { height: 38px; padding: 0 14px; font-size: 13px; }
    .lang-selector { height: 38px; padding: 0 10px; font-size: 13px; }
    .nav-dropdown { top: 72px; }
    .nav-item.open > .nav-dropdown { top: 62px; }
    .lang-dropdown { top: 62px; }
}

/* ─── MOBILE (≤768px) ─── */
@media (max-width: 768px) {
    .container-head,
    .container-nav {
        height: 60px;
    }
    .header-inner {
        padding: 0 16px;
        justify-content: space-between;
    }
    .elips { display: none; }
    nav.main-nav { display: none; }
    .header-actions { display: none; }
    .hamburger { display: flex; }
    .mobile-nav-drawer { top: 60px; }
    .logo img { height: 24px; }
}