/* =============================================================
   HAMBURGER HEADER — Logo + burger on all screen sizes
   Prefix: hhb-
   ============================================================= */

.hhb-header {
    --hhb-height: 68px;
    --hhb-bg: #ffffff;
    --hhb-text: #1a1a2e;
    --hhb-accent: var(--main-bg, #025273);
    --hhb-accent-light: var(--bg-third, #F5FDFF);
    --hhb-border: rgba(0,0,0,0.07);
    --hhb-shadow: 0 1px 0 var(--hhb-border);
    --hhb-panel-shadow: 0 8px 32px rgba(0,0,0,0.10);
    --hhb-radius: 10px;
    --hhb-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --hhb-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --hhb-speed: 0.22s;
    --hhb-font: 'poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    position: relative;
    z-index: 100;
    font-family: var(--hhb-font);
    -webkit-font-smoothing: antialiased;
}

/* ── Bar ── */
.hhb-bar {
    width: 100%;
    height: var(--hhb-height);
    background: var(--hhb-bg);
    box-shadow: var(--hhb-shadow);
    position: relative;
    z-index: 102;
}

.hhb-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 36px !important;
}

@media (max-width: 768px) {
    .hhb-container { padding: 0 16px !important; }
}

/* ── Logo ── */
.hhb-logo-link {
    display: flex;
    align-items: center;
    height: var(--hhb-height);
    text-decoration: none !important;
}

.hhb-logo img,
.hhb-logo .logo-img { max-height: 40px; width: auto; object-fit: contain; display: block; }

.hhb-logo .logo-lg-text-light {
    font-size: 20px;
    font-weight: 700;
    color: var(--hhb-text);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

/* ── Toggle Button ── */
.hhb-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 44px;
    padding: 0 12px;
    background: none;
    border: 1px solid var(--hhb-border);
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--hhb-speed) var(--hhb-ease),
                border-color var(--hhb-speed) var(--hhb-ease);
    position: relative;
    z-index: 103;
}

.hhb-toggle:hover {
    background: var(--hhb-accent-light);
    border-color: var(--hhb-accent);
}

.hhb-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--hhb-text);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1;
    display: block;
}

.hhb-line {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--hhb-text);
    border-radius: 2px;
    transition: transform 0.3s var(--hhb-ease-out), opacity 0.2s ease;
}

.hhb-toggle.active .hhb-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hhb-toggle.active .hhb-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hhb-toggle.active .hhb-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.hhb-toggle.active .hhb-label { opacity: 0; }

/* ── Dropdown Panel ── */
.hhb-panel {
    position: absolute;
    top: var(--hhb-height);
    left: 0;
    right: 0;
    background: var(--hhb-bg);
    border-top: 1px solid var(--hhb-border);
    box-shadow: var(--hhb-panel-shadow);
    z-index: 101;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.22s var(--hhb-ease-out);
}

.hhb-panel.active {
    max-height: 80vh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.hhb-panel-inner {
    padding: 16px 36px 28px;
}

@media (max-width: 768px) {
    .hhb-panel-inner { padding: 12px 16px 24px; }
}

/* ── Menu grid — multi-column on desktop ── */
.hhb-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 2px 8px;
}

@media (max-width: 600px) {
    .hhb-menu { grid-template-columns: 1fr; }
}

/* ── Menu Items ── */
.hhb-item { position: relative; }

.hhb-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--hhb-text);
    text-decoration: none !important;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--hhb-font);
    transition: background var(--hhb-speed) var(--hhb-ease),
                color var(--hhb-speed) var(--hhb-ease);
    text-align: left;
}

.hhb-link:hover, .hhb-link:focus-visible {
    background: var(--hhb-accent-light);
    color: var(--hhb-accent);
    text-decoration: none !important;
}

/* ── Chevron ── */
.hhb-chevron {
    flex-shrink: 0;
    transition: transform 0.3s var(--hhb-ease-out);
    margin-left: 6px;
    opacity: 0.5;
}

.hhb-item--has-children.open > .hhb-link--parent .hhb-chevron {
    transform: rotate(180deg);
}

/* ── Sub-menu accordion ── */
.hhb-sub {
    list-style: none;
    margin: 0;
    padding: 0 0 4px 14px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.18s var(--hhb-ease-out);
}

.hhb-item--has-children.open > .hhb-sub {
    max-height: 400px;
}

.hhb-sub-link {
    display: block;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--hhb-text);
    text-decoration: none !important;
    border-radius: 7px;
    transition: background var(--hhb-speed) var(--hhb-ease),
                color var(--hhb-speed) var(--hhb-ease);
}

.hhb-sub-link:hover {
    background: var(--hhb-accent-light);
    color: var(--hhb-accent);
    text-decoration: none !important;
}

/* ── Backdrop ── */
.hhb-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.18);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--hhb-ease), visibility 0.3s;
    backdrop-filter: blur(2px);
}

.hhb-backdrop.active { opacity: 1; visibility: visible; }

body.hhb-open { overflow: hidden; }

/* ── Align with page content column ── */
@media (min-width: 992px) {
    .hhb-container {
        max-width: var(--page-max-desktop) !important;
    }
    .hhb-panel-inner {
        max-width: var(--page-max-desktop) !important;
        margin: 0 auto;
    }
}

.hhb-header * { box-sizing: border-box; }
.hhb-header a { text-decoration: none !important; }
.hhb-header ul { list-style: none; margin: 0; padding: 0; }
