/* ==========================================================================
   Secure Affair — Header: masthead, section nav, search, slide-out menu
   ========================================================================== */

/* ── Utility bar ─────────────────────────────────────── */
.topbar { background: var(--primary); color: #CBD5E1; font-size: 13px; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 38px; }
.topbar__date i { color: var(--accent); margin-right: 6px; }
.topbar__links { display: flex; gap: 22px; }
.topbar__links a:hover, .topbar__social a:hover { color: #fff; }
.topbar__social { display: flex; gap: 14px; }

/* ── Main header ─────────────────────────────────────── */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .98); backdrop-filter: saturate(160%) blur(10px);
    transition: box-shadow .25s;
}
.site-header.is-scrolled { box-shadow: 0 8px 24px -16px rgba(15, 23, 42, .35); }

/* Masthead: logo left, actions right */
.masthead { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 20px; height: var(--header-h); }
.masthead__right { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.masthead__subscribe {
    display: inline-flex; align-items: center; gap: 7px; margin-right: 10px; padding-right: 16px;
    border-right: 1px solid var(--line-2);
    font-family: var(--font-head); font-weight: 800; font-size: 15px; color: var(--secondary);
}
.masthead__subscribe:hover { color: var(--primary); }
.icon-btn--plain { border-color: transparent; font-size: 18px; }
.icon-btn--plain:hover { background: var(--bg); color: var(--primary); border-color: var(--line); }
.icon-btn--plain .nav-toggle__bars, .icon-btn--plain .nav-toggle__bars::before, .icon-btn--plain .nav-toggle__bars::after { width: 20px; }

.brand { flex: none; }
.brand .logo__text { font-size: 26px; }

.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
    display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative;
}
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; width: 12px; }

/* Section navigation row */
.section-nav { border-top: 1px solid var(--line); border-bottom: 3px solid var(--primary); }
.section-nav__list {
    display: flex; justify-content: center; gap: 2px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.section-nav__list::-webkit-scrollbar { display: none; }
.section-nav__list li { flex: none; }
.section-nav__list a {
    position: relative; display: block; padding: 13px 12px;
    font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--text-2);
    transition: color .2s;
}
.section-nav__list a::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0;
    background: var(--accent); transform: scaleY(0); transform-origin: bottom; transition: transform .2s var(--ease);
}
.section-nav__list a:hover, .section-nav__list a.is-active { color: var(--cat, var(--primary)); }
.section-nav__list a:hover::after, .section-nav__list a.is-active::after { transform: scaleY(1); }

/* ── Search overlay ──────────────────────────────────── */
.search-overlay {
    position: fixed; inset: 0; z-index: 300; background: rgba(23, 37, 84, .96);
    display: flex; align-items: flex-start; padding-top: 14vh;
    animation: fadeIn .2s ease;
}
.search-overlay[hidden] { display: none; }
.search-overlay__inner { position: relative; max-width: 820px; }
.search-overlay__form { display: flex; align-items: center; gap: 14px; border-bottom: 3px solid var(--accent); padding-bottom: 14px; }
.search-overlay__form > i { color: var(--accent); font-size: 24px; }
.search-overlay__form input {
    flex: 1; min-width: 0; border: 0; background: none; color: #fff;
    font-family: var(--font-head); font-size: clamp(22px, 4vw, 36px); font-weight: 700;
}
.search-overlay__form input::placeholder { color: #64748B; }
.search-overlay__form input:focus { outline: none; }
.search-overlay__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; color: #94A3B8; font-size: 14px; }
.search-overlay__chips .chip { background: transparent; border-color: rgba(255, 255, 255, .2); color: #E2E8F0; }
.search-overlay__chips .chip:hover { border-color: var(--accent); color: var(--accent); }
.search-overlay__close { position: absolute; right: var(--gutter); top: -70px; background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Right-side slide-out menu ───────────────────────── */
.side-menu { position: fixed; inset: 0; z-index: 250; }
.side-menu[hidden] { display: none; }
.side-menu__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .5); animation: fadeIn .2s ease; }
.side-menu__panel {
    position: absolute; right: 0; top: 0; bottom: 0; z-index: 1;
    width: min(400px, 92vw); display: flex; flex-direction: column;
    padding: 22px 26px 26px; overflow-y: auto; overscroll-behavior: contain;
    background: var(--surface); box-shadow: -20px 0 50px -20px rgba(15, 23, 42, .45);
    animation: slideInRight .3s var(--ease);
}
.side-menu__panel > * { flex-shrink: 0; }
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: none; } }

.side-menu__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.side-menu__close {
    display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0;
    background: var(--primary); color: #fff; font-size: 18px; transition: background .2s, transform .2s;
}
.side-menu__close:hover { background: var(--accent); color: var(--primary); transform: rotate(90deg); }

.side-menu__search { display: flex; border: 1.5px solid var(--line-2); border-radius: 10px; overflow: hidden; margin-bottom: 14px; }
.side-menu__search:focus-within { border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(23, 37, 84, .15); }
.side-menu__search input { flex: 1; min-width: 0; border: 0; padding: 12px 14px; background: none; }
.side-menu__search input:focus { outline: none; }
.side-menu__search button { border: 0; background: none; color: var(--primary); width: 46px; font-size: 16px; }

.side-menu__item { border-bottom: 1px solid var(--line); }
.side-menu__row { display: flex; align-items: center; }
.side-menu__link {
    flex: 1; padding: 14px 0; font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--text);
    position: relative; transition: color .2s, padding .2s;
}
.side-menu__link::before {
    content: ""; position: absolute; left: -26px; top: 50%; width: 4px; height: 0; border-radius: 0 3px 3px 0;
    background: var(--accent); transform: translateY(-50%); transition: height .2s;
}
.side-menu__link:hover { color: var(--cat); padding-left: 4px; }
.side-menu__link:hover::before { height: 60%; }
.side-menu__expand {
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; border: 0; background: none;
    color: var(--text-2); transition: background .2s, color .2s;
}
.side-menu__expand:hover { background: var(--bg); color: var(--cat); }
.side-menu__expand i { transition: transform .25s var(--ease); }
.side-menu__expand[aria-expanded="true"] i { transform: rotate(180deg); color: var(--cat); }

.side-menu__sub { padding: 0 0 14px 14px; border-left: 3px solid var(--accent); margin-bottom: 14px; animation: fadeIn .2s ease; }
.side-menu__sub li a { display: block; padding: 7px 0; font-size: 14px; line-height: 1.4; color: var(--text-2); }
.side-menu__sub li a:hover { color: var(--cat); }
.side-menu__all { display: inline-flex !important; align-items: center; gap: 6px; font-family: var(--font-head); font-weight: 800; color: var(--cat) !important; }

.side-menu__extra { display: grid; gap: 2px; margin: 26px 0 24px; }
.side-menu__extra a { display: inline-block; padding: 7px 0; font-weight: 600; font-size: 15px; color: var(--text-2); }
.side-menu__extra a:hover { color: var(--secondary); }
.side-menu__subscribe { display: inline-flex !important; align-items: center; gap: 8px; color: var(--secondary) !important; font-family: var(--font-head); font-weight: 800 !important; }

.side-menu__social { display: flex; justify-content: center; gap: 10px; margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line); }
.side-menu__social a {
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
    background: var(--bg); color: var(--primary); transition: background .2s, color .2s;
}
.side-menu__social a:hover { background: var(--primary); color: #fff; }
body.is-locked { overflow: hidden; }
