/* ═══════════════════════════════════════════════════════════
   Header 4 — Minimal Line
   Site name + scrollable category pills + breaking bar
   ═══════════════════════════════════════════════════════════ */

.h4-header {
    background: var(--color-surface);
    position: sticky;
    top: 0;
    z-index: 200;
    border-bottom: 1px solid var(--color-border);
}

/* ── Inner row ── */
.h4-inner {
    padding: 0;
}

.h4-inner .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 60px;
}

/* ── Brand ── */
.h4-brand {
    flex-shrink: 0;
}

.h4-brand__name {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 900;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: -.02em;
    white-space: nowrap;
}

.h4-brand .custom-logo {
    max-height: 40px;
    width: auto;
}

/* ── Nav ── */
.h4-nav {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.h4-nav__menu {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 10px 0;
}

.h4-nav__menu::-webkit-scrollbar {
    display: none;
}

.h4-nav__pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--color-muted);
    text-decoration: none;
    border-radius: 20px;
    white-space: nowrap;
    transition: color .2s, background .2s;
}

.h4-nav__pill:hover {
    color: var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 10%, transparent);
}

.h4-nav__pill.is-active {
    color: var(--color-btn-text);
    background: var(--color-primary);
}

/* ── Hamburger toggle ── */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    padding: 8px;
    align-items: center;
    flex-shrink: 0;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hamburger-icon span {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}

/* ── Breaking bar ── */
.h4-breaking {
    background: var(--color-breaking-bg);
    color: var(--color-breaking-text);
    padding: 7px 0;
    overflow: hidden;
}

.h4-breaking .container {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.h4-breaking__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-breaking-text);
    flex-shrink: 0;
    animation: blink 1.2s step-start infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

.h4-breaking__label {
    flex-shrink: 0;
    font-size: .6rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.h4-breaking__ticker {
    flex: 1;
    overflow: hidden;
}

.h4-breaking__list {
    display: flex;
    gap: 48px;
    list-style: none;
    white-space: nowrap;
    animation: ticker-scroll 32s linear infinite;
    font-size: .8rem;
    margin: 0;
    padding: 0;
}

.h4-breaking__list:hover {
    animation-play-state: paused;
}

.h4-breaking__list a {
    color: var(--color-breaking-text);
    text-decoration: none;
}

.h4-breaking__list a:hover {
    text-decoration: underline;
}

@keyframes ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .h4-nav .nav-toggle {
        display: flex;
    }

    .h4-nav__menu {
        display: none;
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 200;
        background: var(--color-surface);
        border-top: 1px solid var(--color-border);
        box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
        padding: 8px;
        gap: 2px;
    }

    .h4-nav__menu.is-open {
        display: flex;
    }

    .h4-header {
        position: relative;
    }

    .h4-nav__pill {
        border-radius: 8px;
        padding: 10px 14px;
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .h4-brand__name {
        font-size: 1.1rem;
    }
}
