/* =============================================
   MEGA HEADER
   ============================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

.mh {
    position: relative;
    z-index: 1000;
    font-family: inherit;
    overflow-x: clip;
}

/* ── Bar ──────────────────────────────────────────────────────── */

.mh__bar {
    position: relative;
    z-index: 2;
    background: #fff;
    height: 80px;
    display: flex;
    align-items: center;
}

.mh__inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 33px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

/* ── Logo ─────────────────────────────────────────────────────── */

.mh__logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.mh__logo img {
    display: block;
}

/* ── Nav ──────────────────────────────────────────────────────── */

/* TODO: прибрати коли Solutions буде готовий */
.mh__nav-btn[data-section="solutions"] { display: none; }
.mh__mobile-item[data-section="solutions"] { display: none; }

.mh__nav {
    display: flex;
    align-items: center;
    gap: 0;
    margin-left: auto;
}

.mh__nav-btn {
    background: none;
    border: none;
    color: #000;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.mh__nav-btn:hover,
.mh__nav-btn--active {
    background: linear-gradient(135deg, #BAEF83 0%, #8DE6A6 50%, #4DEBF4 100%);
    color: #0E1018;
    box-shadow: 0px 0px 20px rgba(141, 230, 166, 0.50);
}

.mh__nav-link {
    display: inline-block;
    color: #0E1018;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    text-decoration: none;
}

.mh__nav-link:hover {
    background: linear-gradient(135deg, #BAEF83 0%, #8DE6A6 50%, #4DEBF4 100%);
    color: #0E1018;
    box-shadow: 0px 0px 20px rgba(141, 230, 166, 0.50);
}

/* ── Actions ──────────────────────────────────────────────────── */

.mh__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* ── Search ───────────────────────────────────────────────────── */

.mh__search {
    position: relative;
    display: flex;
    align-items: center;
}

.mh__search-btn {
    position: relative;
    width: 41px;
    height: 41px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    color: rgba(14,16,24,0.55);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
}

.mh__search-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    padding: 1px;
    background: linear-gradient(200deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.20) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.mh__search-btn:hover {
    color: #0E1018;
    background: rgba(0,0,0,0.09);
}

.mh__search-btn:hover::before {
    background: linear-gradient(200deg, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.40) 100%);
}

.mh__search-form {
    display: flex;
    align-items: center;
    position: absolute;
    left: 0;
    top: 70px;
    width: 265px;
    background: #fff;
    backdrop-filter: blur(16px);
    border-radius: 50px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    outline: 1px solid rgba(0,0,0,0.12);
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}

.mh__search--open .mh__search-form {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
    z-index: 1000;
}

.mh__search-form input {
    background: none;
    border: none;
    outline: none;
    color: #0E1018;
    font-size: 14px;
    font-family: inherit;
    padding: 11px 20px;
    width: 100%;
}

.mh__search-form input::placeholder {
    color: rgba(14,16,24,0.35);
}

.mh__search-form button[type="submit"] {
    background: none;
    border: none;
    color: rgba(14,16,24,0.40);
    cursor: pointer;
    padding: 0 16px 0 0;
    display: flex;
    align-items: center;
    transition: color 0.2s;
    flex-shrink: 0;
}

.mh__search-form button[type="submit"]:hover {
    color: #0E1018;
}

/* ── Language ─────────────────────────────────────────────────── */

.mh__lang {
    position: relative;
}

.mh__lang-btn {
    position: relative;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    border: none;
    color: rgba(14,16,24,0.75);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 10px;
    min-width: 56px;
    height: 40px;
    transition: background 0.2s;
}

.mh__lang-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(200deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.20) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.mh__lang-btn:hover {
    background: rgba(0,0,0,0.09);
}

.mh__lang-btn:hover::before {
    background: linear-gradient(200deg, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.40) 100%);
}

.mh__lang-flag {
    width: 22px;
    height: 22px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    flex-shrink: 0;
    background-color: #fff;
}

.mh__lang-arrow {
    color: rgba(14,16,24,0.45);
    transition: transform 0.2s;
    display: flex;
    align-items: center;
}

.mh__lang--open .mh__lang-arrow {
    transform: rotate(180deg);
}

.mh__lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 16px;
    list-style: none;
    margin: 0;
    padding: 6px;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}

.mh__lang--open .mh__lang-dropdown {
    display: block;
    z-index: 1000;
}

.mh__lang-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px 0;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.15s;
}

.mh__lang-option:hover {
    background: rgba(0,0,0,0.05);
}

/* ── CTA ──────────────────────────────────────────────────────── */

.mh__cta {
    background: linear-gradient(135deg, #BAEF83 0%, #8DE6A6 50%, #4DEBF4 100%);
    color: #000;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    padding: 13px 30px;
    border-radius: 50px;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s;
    flex-shrink: 0;
    line-height: 1;
}

.mh__cta:hover {
    color: #000;
    opacity: 0.88;
}

/* ── Dropdown ─────────────────────────────────────────────────── */

.mh__dropdown {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 24px 48px rgba(0,0,0,0.15);
    display: none;
    z-index: 999;
}

.mh__dropdown--open {
    display: block;
}

.mh__dropdown .mega-menu {
    background: transparent;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 33px;
}

.mh__dropdown .mega-menu__panel--active {
    display: block;
}

.mh__dropdown .mega-menu__top-nav {
    display: none;
}

/* ── Overlay ──────────────────────────────────────────────────── */

.mh__overlay {
    display: none;
    position: fixed;
    inset: 0;
    top: 80px;
    background: rgba(0,0,0,0.4);
    z-index: 996;
}

.mh__overlay--visible {
    display: block;
}

/* ── Burger ───────────────────────────────────────────────────── */

.mh__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    position: relative;
    background: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    width: 41px;
    height: 41px;
    flex-shrink: 0;
}

.mh__burger::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    padding: 1px;
    background: linear-gradient(200deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.20) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.mh__burger span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: rgba(14,16,24,0.70);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.mh--mobile-open .mh__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mh--mobile-open .mh__burger span:nth-child(2) { opacity: 0; }
.mh--mobile-open .mh__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile panel ─────────────────────────────────────────────── */

.mh__mobile {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    z-index: 997;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mh--mobile-open .mh__mobile {
    transform: translateX(0);
}

.mh__mobile-inner {
    padding: 8px 24px 48px;
}

.mh__mobile-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mh__mobile-item {
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.mh__mobile-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    color: #0E1018;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    padding: 16px 0;
    cursor: pointer;
    text-align: left;
    gap: 8px;
}

.mh__mobile-arrow {
    color: rgba(14,16,24,0.35);
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.mh__mobile-item--open > .mh__mobile-btn .mh__mobile-arrow {
    transform: rotate(90deg);
}

.mh__mobile-sub {
    display: none;
    padding-bottom: 8px;
}

.mh__mobile-item--open > .mh__mobile-sub {
    display: block;
}

.mh__mobile-cat-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    color: rgba(14,16,24,0.60);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
    text-align: left;
    gap: 8px;
}

.mh__mobile-cat-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mh__mobile-cat-btn--open {
    color: #0E1018;
    background: rgba(0, 0, 0, 0.06);
}

.mh__mobile-cat-arrow {
    color: inherit;
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.mh__mobile-cat-btn--open .mh__mobile-cat-arrow {
    transform: rotate(90deg);
}

.mh__mobile-cat-hub {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.mh__mobile-cat-hub-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0E1018;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.2;
}

.mh__mobile-cat-hub-arrow {
    display: flex;
    align-items: center;
    transform: translateX(0) rotate(-90deg);
    transition: transform 0.2s;
}

.mh__mobile-cat-hub-title:hover .mh__mobile-cat-hub-arrow {
    transform: translateX(3px) rotate(-90deg);
}

.mh__mobile-cat-desc {
    margin: 5px 0 0;
    color: rgba(14,16,24,0.50);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.mh__mobile-cat-content {
    display: none;
    padding: 4px 12px 12px;
}

.mh__mobile-cat-content--open {
    display: block;
}

.mh__mobile-cat-hub {
    display: block;
    color: #0E1018;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 0;
    text-decoration: none;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    margin-bottom: 6px;
}

.mh__mobile-group-title {
    color: #0E1018;
    font-size: 16px;
    font-weight: 700;
    padding: 7px 0 0;
}

.mh__mobile-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mh__mobile-link {
    display: block;
    padding: 7px 0;
    color: rgba(14,16,24,0.60);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s;
}

.mh__mobile-link:hover {
    color: #0E1018;
}

.mh__mobile-simple-list {
    list-style: none;
    margin: 0;
    padding: 4px 0 8px;
}

.mh__mobile-simple-link {
    display: block;
    padding: 10px 12px;
    color: rgba(14,16,24,0.70);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.mh__mobile-simple-link:hover {
    background: rgba(0,0,0,0.05);
    color: #0E1018;
}

/* ── Responsive ───────────────────────────────────────────────── */

@media (max-width: 1200px) {
    .mh__inner { padding: 0 20px; gap: 20px; }
}

@media (max-width: 1024px) {
    .mh__nav      { display: none; }
    .mh__burger   { display: flex; }
    .mh__mobile   { display: block; }
    .mh__dropdown { display: none !important; }
    .mh__cta      { display: none; }
    .mh__search-form {
        position: fixed;
        left: 16px;
        right: 16px;
        width: auto;
        top: 90px;
    }
}

@media (max-width: 600px) {
    .mh__inner    { padding: 0 16px; gap: 10px; }
    .mh__logo img { width: 140px; }
}


.mh__mobile-cta {
    display: block;
    margin: 24px 0 0;
    background: linear-gradient(135deg, #BAEF83 0%, #8DE6A6 50%, #4DEBF4 100%);
    color: #000;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    padding: 14px 30px;
    border-radius: 50px;
    text-decoration: none;
    text-align: center;
    transition: opacity 0.2s;
}
