/* =============================================
   Site Header - ASR-style corporate navigation
   ============================================= */
:root {
    --hdr-bg: #1a2332;
    --hdr-height: 64px;
    --hdr-text: rgba(255,255,255,.85);
    --hdr-text-hover: #fff;
    --hdr-accent: #3b82f6;
    --hdr-sub-bg: #fff;
    --hdr-sub-shadow: 0 8px 32px rgba(0,0,0,.12);
}

.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 10000;
    height: var(--hdr-height);
    background: var(--hdr-bg);
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
}

.site-header__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Logo */
.site-logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.site-logo__text { font-size: 20px; font-weight: 600; color: #fff; letter-spacing: .5px; }

/* Mobile toggle — hidden on desktop, shown via media query */
.site-header__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-left: auto;
    flex-shrink: 0;
}
.site-header__toggle span {
    display: block;
    width: 22px; height: 2px;
    background: #fff;
    border-radius: 1px;
    transition: transform .3s, opacity .3s;
}
.site-header__toggle--active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header__toggle--active span:nth-child(2) { opacity: 0; }
.site-header__toggle--active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Nav */
.site-nav {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    margin-left: 32px;
}
.site-nav__list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0; padding: 0;
}
.site-nav__item { position: relative; }
.site-nav__item > a {
    display: block;
    padding: 8px 16px;
    color: var(--hdr-text);
    font-size: 15px;
    text-decoration: none;
    border-radius: 10px;
    transition: color .2s, background .2s;
    white-space: nowrap;
}
.site-nav__item > a:hover,
.site-nav__item--active > a {
    color: var(--hdr-text-hover);
    background: rgba(255,255,255,.1);
}

/* Dropdown */
.site-nav__sub {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 160px;
    background: var(--hdr-sub-bg);
    border-radius: 8px;
    box-shadow: var(--hdr-sub-shadow);
    padding: 8px 0;
    list-style: none;
    margin: 0;
    z-index: 100;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .2s, transform .2s;
}
.site-nav__sub::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}
.site-nav__item:hover .site-nav__sub { display: block; opacity: 1; transform: translateY(0); }
.site-nav__sub li a {
    display: block;
    padding: 8px 20px;
    color: #4e5969;
    font-size: 14px;
    text-decoration: none;
    transition: color .2s, background .2s;
}
.site-nav__sub li a:hover {
    color: var(--hdr-accent);
    background: #f2f6ff;
}

/* Right side */
.site-nav__right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-shrink: 0;
}

/* Search */
.site-search {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,.12);
    border-radius: 20px;
    overflow: hidden;
    transition: background .2s;
}
.site-search:focus-within { background: rgba(255,255,255,.2); }
.site-search__input {
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 13px;
    padding: 6px 12px;
    width: 140px;
}
.site-search__input::placeholder { color: rgba(255,255,255,.5); }
.site-search__btn {
    background: none;
    border: none;
    color: rgba(255,255,255,.7);
    cursor: pointer;
    padding: 6px 10px;
    font-size: 16px;
    display: flex;
    align-items: center;
}

/* User area */
.site-user { display: flex; align-items: center; gap: 8px; }
.site-btn {
    display: inline-block;
    padding: 6px 18px;
    font-size: 13px;
    border-radius: 20px;
    text-decoration: none;
    transition: all .2s;
    cursor: pointer;
    border: none;
    line-height: 1.5;
    white-space: nowrap;
}
.site-btn--ghost {
    color: rgba(255,255,255,.85);
    border: 1px solid rgba(255,255,255,.3);
    background: transparent;
}
.site-btn--ghost:hover { border-color: #fff; color: #fff; }
.site-btn--primary {
    color: #fff;
    background: var(--hdr-accent);
}
.site-btn--primary:hover { background: #2563eb; }

/* User dropdown */
.site-user__avatar-wrap { position: relative; }
.site-user__avatar {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--hdr-text);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 10px;
    transition: background .2s;
}
.site-user__avatar:hover { background: rgba(255,255,255,.1); }
.site-user__avatar img { width: 32px; height: 32px; border-radius: 50%; }
.site-user__avatar span { font-size: 14px; }
.site-user__menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 160px;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--hdr-sub-shadow);
    padding: 8px 0;
    list-style: none;
    margin: 4px 0 0;
    z-index: 100;
}
.site-user__avatar-wrap:hover .site-user__menu { display: block; }
.site-user__menu li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: #4e5969;
    font-size: 14px;
    text-decoration: none;
    transition: color .2s, background .2s;
}
.site-user__menu li a:hover { color: var(--hdr-accent); background: #f2f6ff; }
.site-user__menu-divider { height: 1px; background: #e5e6eb; margin: 4px 12px; }

/* ---- Responsive: hamburger menu at <= 1024px ---- */
@media (max-width: 1024px) {
    .site-header__toggle { display: flex; }
    .site-nav {
        display: none;
        position: absolute;
        top: var(--hdr-height);
        left: 0; right: 0;
        background: var(--hdr-bg);
        flex-direction: column;
        padding: 16px;
        margin-left: 0;
        border-top: 1px solid rgba(255,255,255,.1);
        box-shadow: 0 8px 16px rgba(0,0,0,.2);
        z-index: 9999;
    }
    .site-nav--open { display: flex; }
    .site-nav__list { flex-direction: column; width: 100%; gap: 0; }
    .site-nav__item > a { padding: 12px 16px; font-size: 15px; border-radius: 0; }
    .site-nav__item > a:hover,
    .site-nav__item--active > a { background: rgba(255,255,255,.08); }
    .site-nav__sub {
        position: static;
        box-shadow: none;
        border-radius: 0;
        background: rgba(255,255,255,.05);
        display: none;
    }
    .site-nav__item:hover .site-nav__sub { display: block; }
    .site-nav__sub li a { color: rgba(255,255,255,.7); padding: 10px 32px; }
    .site-nav__sub li a:hover { color: #fff; background: rgba(255,255,255,.08); }
    .site-nav__right { width: 100%; justify-content: center; margin-top: 12px; flex-wrap: wrap; gap: 10px; }
    .site-search { width: 100%; }
    .site-search__input { width: 100%; }
}
