/* ==========================================================================
   VRA consolidated site header (PROTOTYPE) + global content offset.
   Loaded LAST so it overrides legacy header CSS. Active only on pages whose
   <body> has class "vra-newhdr" (the layout adds it when rendering _header.php).
   All selectors are new (vra-hdr-*) so nothing in the legacy CSS is affected.
   ========================================================================== */

:root { --vra-hdr-h: 64px; }

/* --- global offset: push page content below the fixed header (one rule, all pages) --- */
body.vra-newhdr { padding-top: var(--vra-hdr-h); }
/* the global offset supersedes the blog pages' own per-page top padding */
body.vra-newhdr .vra-blog-page,
body.vra-newhdr .vra-article-page { padding-top: 0 !important; }

/* --- the header bar --- */
.vra-hdr {
    position: fixed; top: 0; left: 0; right: 0; height: var(--vra-hdr-h);
    background: #fff; border-bottom: 1px solid #e6e8eb;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .06); z-index: 1040;
    font-family: 'Segoe UI', system-ui, sans-serif;
}
.vra-hdr-inner {
    max-width: 1200px; margin: 0 auto; height: 100%; padding: 0 20px;
    display: flex; align-items: center; justify-content: space-between;
}
.vra-hdr-logo { display: flex; align-items: center; }
.vra-hdr-logo img { height: 36px; width: auto; display: block; }

.vra-hdr-nav { display: flex; align-items: center; gap: 18px; }
.vra-hdr-link {
    color: #1a1a2e; text-decoration: none; font-weight: 600; font-size: 14px;
    padding: 8px 4px; white-space: nowrap;
}
.vra-hdr-link:hover { color: #0f4c75; }

.vra-hdr-btn {
    display: inline-block; padding: 9px 18px; border-radius: 22px;
    font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap;
    transition: background .15s, color .15s;
}
.vra-hdr-btn--ghost { color: #0f4c75; border: 1px solid #0f4c75; background: #fff; }
.vra-hdr-btn--ghost:hover { background: #0f4c75; color: #fff; }
.vra-hdr-btn--solid { color: #fff; background: #0f4c75; border: 1px solid #0f4c75; }
.vra-hdr-btn--solid:hover { background: #0d3f61; color: #fff; }

.vra-hdr-icon { position: relative; display: inline-flex; align-items: center; padding: 8px; }
.vra-hdr-badge {
    position: absolute; top: -2px; right: -2px; background: #e0245e; color: #fff;
    font-size: 10px; line-height: 1; padding: 2px 5px; border-radius: 10px;
}
.vra-hdr-profile { position: relative; display: inline-flex; align-items: center; }
.vra-hdr-avatar {
    height: 38px; width: 38px; border-radius: 50%; object-fit: cover;
    cursor: pointer; border: 1px solid #e6e8eb;
}
.vra-hdr-menu {
    display: none; position: absolute; right: 0; top: 48px; min-width: 180px;
    background: #fff; border: 1px solid #e6e8eb; border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .14); padding: 6px 0;
}
.vra-hdr-menu.open { display: block; }
.vra-hdr-menu a { display: block; padding: 11px 16px; color: #374151; text-decoration: none; font-size: 14px; }
.vra-hdr-menu a:hover { background: #f3f4f6; color: #0f4c75; }

.vra-hdr-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 9px; cursor: pointer; }
.vra-hdr-toggle span { display: block; height: 2px; width: 100%; background: #1a1a2e; margin: 5px 0; border-radius: 2px; transition: .25s; }
.vra-hdr-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.vra-hdr-toggle.is-open span:nth-child(2) { opacity: 0; }
.vra-hdr-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- mobile: hamburger + slide-down nav panel --- */
@media (max-width: 767px) {
    :root { --vra-hdr-h: 56px; }
    .vra-hdr-toggle { display: block; }
    .vra-hdr-logo img { height: 30px; }
    .vra-hdr-nav {
        position: absolute; top: var(--vra-hdr-h); left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: #fff; border-top: 1px solid #eef0f2; border-bottom: 1px solid #e6e8eb;
        box-shadow: 0 10px 24px rgba(0, 0, 0, .12); padding: 6px 0; display: none;
    }
    .vra-hdr-nav.open { display: flex; }
    .vra-hdr-link, .vra-hdr-btn { width: 100%; text-align: left; padding: 14px 22px; border-radius: 0; border: 0; font-size: 15px; }
    .vra-hdr-btn--ghost, .vra-hdr-btn--solid { background: none; color: #0f4c75; }
    .vra-hdr-icon { padding: 12px 22px; }
    .vra-hdr-profile { display: flex; padding: 6px 22px; }
    .vra-hdr-menu { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 0 12px; min-width: 0; }
    .vra-hdr-menu a { padding: 10px; }
}
