/* =========================
   HEADER (ISOLATED)
========================= */

.ms-site-header {
    position: relative;
    z-index: 999;
    background: #ffffff;
    box-shadow: 0 8px 30px rgba(31, 57, 88, 0.06);
}

/* Reset inside header */
.ms-site-header * {
    box-sizing: border-box;
}

.ms-site-header ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ms-site-header a {
    text-decoration: none;
}

/* =========================
   TOP BAR
========================= */

.ms-header-top {
    background: #ffffff;
}

.ms-header-top-inner {
    min-height: 112px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

/* Brand */
.ms-header-brand {
    flex: 0 0 auto;
}

.ms-logo-link {
    display: inline-flex;
    align-items: center;
}

.ms-logo-full {
    max-height: 58px;
    width: auto;
}

.ms-logo-icon {
    display: none;
    max-height: 46px;
}

/* Actions */
.ms-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    flex-wrap: nowrap;
}

.ms-header-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ms-text-primary);
    font-size: 16px;
    font-weight: 500;
    position: relative;
}

.ms-header-action i {
    font-size: 14px;
    line-height: 1;
}

.ms-header-action:hover {
    color: var(--ms-accent);
}

.ms-header-action + .ms-header-action {
    padding-left: 18px;
}

.ms-header-action + .ms-header-action:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 1px;
    height: 20px;
    background: var(--ms-border-medium);
    transform: translateY(-50%);
}

/* CTA */
.ms-header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0 22px;
    border-radius: 6px;
    background: var(--ms-primary);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin-left: 6px;
    white-space: nowrap;
    border: 1px solid transparent;
}

.ms-header-cta:hover {
    background: var(--ms-primary-dark);
    color: #ffffff;
}

/* =========================
   NAV BAR
========================= */

.ms-header-nav-band {
    background: var(--ms-primary-light);
    border-top: 1px solid rgba(31, 53, 86, 0.05);
    border-bottom: 1px solid rgba(31, 53, 86, 0.05);
    overflow: visible;
}

.ms-main-nav {
    display: flex;
    justify-content: center;
}

.ms-nav-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    min-height: 92px;
}

.ms-nav-item {
    position: relative;
}

.ms-nav-item > a {
    color: var(--ms-text-primary);
    font-size: 20px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ms-nav-item > a:hover {
    color: var(--ms-accent);
}

/* Submenu */
.ms-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(31, 57, 88, 0.14);
    padding: 12px 0;
    margin-top: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
    z-index: 50;
}

.ms-submenu li a {
    display: block;
    padding: 10px 20px;
    font-size: 15px;
    color: var(--ms-text-primary);
}

.ms-submenu li a:hover {
    background: var(--ms-bg-soft);
    color: var(--ms-accent);
}

.ms-nav-item-has-children:hover .ms-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* =========================
   MOBILE MENU
========================= */

.ms-menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(31, 53, 86, 0.12);
    border-radius: 6px;
    background: #ffffff;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.ms-menu-toggle span {
    width: 22px;
    height: 2px;
    background: var(--ms-text-primary);
    display: block;
}

/* Panel */
.ms-mobile-menu-panel {
    display: none;
    background: #ffffff;
    border-bottom: 1px solid rgba(31, 53, 86, 0.08);
}

.ms-mobile-menu-panel.is-open {
    display: block;
}

.ms-mobile-nav-list {
    padding: 16px 0;
}

.ms-mobile-item {
    border-bottom: 1px solid rgba(31, 53, 86, 0.08);
}

.ms-mobile-item > a,
.ms-mobile-link-row > a {
    display: block;
    padding: 14px 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--ms-text-primary);
}

.ms-mobile-link-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ms-mobile-submenu {
    display: none;
    padding-left: 16px;
}

.ms-mobile-submenu.is-open {
    display: block;
}

.ms-mobile-submenu li a {
    padding: 8px 0;
    font-size: 15px;
    color: var(--ms-text-secondary);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 991px) {

    .ms-header-top-inner {
        padding: 16px 0;
        gap: 16px;
    }

    .ms-header-actions {
        gap: 10px;
    }

    .ms-header-action span {
        display: none;
    }

    .ms-header-cta {
        height: 42px;
        padding: 0 16px;
        font-size: 15px;
    }

    .ms-header-nav-band {
        display: none;
    }

    .ms-menu-toggle {
        display: inline-flex;
    }

    .ms-logo-full {
        max-height: 46px;
    }
}

@media (max-width: 767px) {

    .ms-header-cta {
        display: none;
    }

    .ms-menu-toggle {
        width: 44px;
        height: 44px;
    }

    .ms-logo-full {
        max-height: 58px;
    }
}