/* Header - DK Avisen - Dark unified header */

/* ===== Sticky wrapper (ticker + header scroll together) ===== */
.sa-sticky-header {
    position: sticky;
    top: 0;
    z-index: var(--sa-z-header);
}

/* ===== Main header bar ===== */
.sa-header {
    background: var(--sa-primary);
}

.sa-header__inner {
    max-width: calc(var(--sa-content-width) + var(--sa-gap-lg) * 2);
    margin: 0 auto;
    padding: 0 var(--sa-gap-lg);
    display: flex;
    align-items: center;
    height: var(--sa-header-height);
    gap: 0;
}

/* Burger menu - hidden on desktop, visible on mobile */
.sa-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    padding: 8px;
    cursor: pointer;
    transition: color var(--sa-transition);
    border-radius: var(--sa-radius);
}

.sa-menu-toggle:hover {
    color: var(--sa-accent);
    background: rgba(255,255,255,0.1);
}

.sa-menu-toggle svg { width: 22px; height: 22px; }

/* Logo */
.sa-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: 24px;
}

.sa-logo:hover { opacity: 0.9; }

.sa-logo__img { height: 36px; width: auto; display: block; }

.sa-logo__text {
    font-family: var(--sa-font-headline);
    font-size: 1.6rem;
    color: #fff;
    line-height: 1;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.sa-logo__text span {
    color: var(--sa-accent);
}

/* ===== Inline navigation links (desktop) ===== */
.sa-header__nav {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 0;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.sa-header__nav-link {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 14px;
    color: rgba(255,255,255,0.75);
    font-family: var(--sa-font-ui);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    transition: all var(--sa-transition);
    white-space: nowrap;
    position: relative;
}

.sa-header__nav-link:hover,
.sa-header__nav-link--active {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.sa-header__nav-link--active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 14px;
    right: 14px;
    height: 2px;
    background: var(--sa-accent);
}

.sa-header__nav-link--eksklusiv {
    color: var(--sa-eksklusiv);
}

.sa-header__nav-link--eksklusiv:hover {
    color: var(--sa-eksklusiv);
    background: rgba(255,255,255,0.08);
}

/* ===== Inline search field ===== */
.sa-header__search {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 12px;
    flex-shrink: 0;
}

.sa-header__search-form {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--sa-radius);
    overflow: hidden;
    transition: all var(--sa-transition);
}

.sa-header__search-form:focus-within {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
}

.sa-header__search-input {
    background: none;
    border: none;
    color: #fff;
    font-family: var(--sa-font-body);
    font-size: 13px;
    padding: 7px 12px;
    width: 180px;
    outline: none;
}

.sa-header__search-input::placeholder {
    color: rgba(255,255,255,0.4);
}

.sa-header__search-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    padding: 7px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color var(--sa-transition);
}

.sa-header__search-btn:hover { color: #fff; }
.sa-header__search-btn svg { width: 16px; height: 16px; }

/* ===== Date & Weather ===== */
.sa-header__date {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
    text-transform: capitalize;
    margin-right: 12px;
}

.sa-header__weather {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    white-space: nowrap;
    padding: 4px 10px;
    background: rgba(255,255,255,0.08);
    border-radius: 20px;
    margin-right: 12px;
}

.sa-header__weather-icon { font-size: 14px; }

/* ===== Header right section ===== */
.sa-header__right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Search toggle (mobile fallback - hidden on desktop) */
.sa-search-toggle {
    display: none;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    padding: 8px;
    cursor: pointer;
    align-items: center;
    transition: all var(--sa-transition);
    border-radius: var(--sa-radius);
}

.sa-search-toggle:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.sa-search-toggle svg { width: 20px; height: 20px; }

/* Login / Subscribe buttons */
.sa-header__login {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    padding: 7px 14px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--sa-radius);
    transition: all var(--sa-transition);
}

.sa-header__login:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.08);
}

.sa-header__subscribe {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: var(--sa-accent);
    padding: 7px 16px;
    border-radius: var(--sa-radius);
    letter-spacing: 0.3px;
    transition: background var(--sa-transition);
}

.sa-header__subscribe:hover {
    background: var(--sa-accent-hover);
    color: #fff;
}

/* User menu (logged in) */
.sa-header__user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    padding: 5px 10px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--sa-radius);
    cursor: pointer;
    position: relative;
    transition: all var(--sa-transition);
}

.sa-header__user:hover {
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.05);
}

.sa-header__user-avatar {
    width: 28px;
    height: 28px;
    background: var(--sa-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    border-radius: 50%;
}

.sa-header__user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #fff;
    border: 1px solid var(--sa-border);
    border-radius: var(--sa-radius);
    min-width: 200px;
    box-shadow: var(--sa-shadow-hover);
    z-index: var(--sa-z-nav);
    overflow: hidden;
}

.sa-header__user:hover .sa-header__user-dropdown,
.sa-header__user-dropdown.active {
    display: block;
}

.sa-header__user-dropdown a {
    display: block;
    padding: 12px 16px;
    color: var(--sa-text);
    font-size: 14px;
    border-bottom: 1px solid var(--sa-border);
    transition: background var(--sa-transition);
}

.sa-header__user-dropdown a:hover {
    background: var(--sa-bg);
    color: var(--sa-accent);
}

.sa-header__user-dropdown a:last-child { border-bottom: 0; }

/* ===== Category nav bar - REMOVED (merged into header) ===== */
.sa-nav-bar { display: none; }

/* ===== Search overlay (fallback for mobile + full search results) ===== */
.sa-search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(27, 43, 75, 0.97);
    z-index: var(--sa-z-search);
    justify-content: center;
    padding-top: 120px;
    backdrop-filter: blur(8px);
}

.sa-search-overlay.active { display: flex; }

.sa-search-overlay__inner {
    width: 100%;
    max-width: 640px;
    padding: 0 var(--sa-gap);
}

.sa-search-overlay__close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 36px;
    cursor: pointer;
    padding: 8px;
    transition: color var(--sa-transition);
}

.sa-search-overlay__close:hover { color: #fff; }

.sa-search-overlay input {
    width: 100%;
    padding: 18px 24px;
    font-size: 20px;
    font-family: var(--sa-font-body);
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: var(--sa-radius-lg);
    color: #fff;
    outline: none;
    transition: border-color var(--sa-transition);
}

.sa-search-overlay input::placeholder { color: rgba(255,255,255,0.4); }
.sa-search-overlay input:focus { border-color: var(--sa-accent); }

.sa-search-results { margin-top: 20px; }

.sa-search-result {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sa-search-result__image {
    width: 88px;
    height: 60px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: var(--sa-radius);
}

.sa-search-result__content { flex: 1; }

.sa-search-result__category {
    font-size: 11px;
    font-weight: 700;
    color: var(--sa-accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sa-search-result__title {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    margin-top: 4px;
}

.sa-search-result__title:hover { color: var(--sa-accent); }

.sa-search-result__date {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    margin-top: 4px;
}

/* ===== Responsive: Mobile header ===== */
@media (max-width: 1024px) {
    .sa-header__nav { display: none; }
    .sa-header__search { display: none; }
    .sa-header__date { display: none; }
    .sa-header__weather { display: none; }
    .sa-menu-toggle { display: flex; }
    .sa-search-toggle { display: flex; }
}

@media (max-width: 768px) {
    .sa-header__inner { height: 52px; }
    .sa-logo__text { font-size: 1.3rem; }
}

@media (max-width: 480px) {
    .sa-header__right { gap: 4px; }
    .sa-header__login { padding: 5px 8px; font-size: 11px; }
    .sa-header__subscribe { padding: 5px 10px; font-size: 11px; }
    .sa-logo__text { font-size: 1.1rem; }
}
