/* =========================================================
   HAZARA NETWORK — PREMIUM RESPONSIVE HEADER
========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1040;
    width: 100%;
    background: rgba(255, 255, 255, 0.97);
    box-shadow:
        0 1px 0 rgba(15, 23, 42, 0.06),
        0 8px 30px rgba(15, 23, 42, 0.07);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

/* Accessibility */

.skip-link {
    position: fixed;
    top: -100px;
    left: 1rem;
    z-index: 9999;
    padding: 0.8rem 1.1rem;
    border-radius: 0.75rem;
    background: #ffffff;
    color: #111827;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.2);
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 1rem;
}

/* =========================================================
   TOP INFORMATION BAR
========================================================= */

.header-topbar {
    position: relative;
    overflow: hidden;
    min-height: 39px;
    background:
        radial-gradient(
            circle at 15% 50%,
            rgba(213, 150, 50, 0.16),
            transparent 28%
        ),
        linear-gradient(
            100deg,
            #0f172a 0%,
            #182132 54%,
            #301c1a 100%
        );
    color: #d9dfe9;
}

.header-topbar::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.3;
    background-image:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.03),
            transparent
        );
}

.header-topbar .container {
    position: relative;
    z-index: 2;
}

.header-topbar-left,
.header-topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.header-topbar-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #cbd3df;
    font-size: 0.74rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}

a.header-topbar-item:hover {
    color: #ffffff;
}

.header-topbar-item i {
    color: var(--hn-secondary, #d59632);
    font-size: 0.8rem;
}

/* Top social icons */

.header-socials {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding-left: 0.85rem;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.header-socials a {
    width: 27px;
    height: 27px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #dce2eb;
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
    font-size: 0.8rem;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.header-socials a:hover {
    color: #ffffff;
    background: var(--hn-primary, #9f2d20);
    transform: translateY(-2px);
}

/* =========================================================
   MAIN NAVBAR
========================================================= */

.header-navbar {
    position: relative;
    min-height: 86px;
    padding: 0.65rem 0;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(15, 23, 42, 0.055);
}

.header-navbar .container {
    position: relative;
}

/* Brand */

.header-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    max-width: 345px;
    margin-right: 1rem;
    padding: 0;
    text-decoration: none;
}

.header-brand:hover {
    text-decoration: none;
}

.header-brand-emblem {
    position: relative;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: inline-grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    background:
        linear-gradient(
            145deg,
            var(--hn-primary, #9f2d20),
            #6c1b15
        );
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.055em;
    box-shadow:
        0 12px 28px rgba(159, 45, 32, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.header-brand-emblem::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -55%;
    width: 75%;
    height: 200%;
    background: rgba(255, 255, 255, 0.13);
    transform: rotate(25deg);
}

.header-brand-content {
    min-width: 0;
}

.header-brand-name {
    display: block;
    overflow: hidden;
    color: #172033;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.33rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.025em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-brand-tagline {
    display: block;
    max-width: 250px;
    overflow: hidden;
    margin-top: 0.28rem;
    color: #7b8494;
    font-size: 0.67rem;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.015em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =========================================================
   DESKTOP NAVIGATION
========================================================= */

.header-navbar .navbar-nav {
    min-width: 0;
}

.header-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.7rem 0.72rem !important;
    border-radius: 0.78rem;
    color: #344054 !important;
    font-size: 0.85rem;
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.header-nav-link:hover {
    color: var(--hn-primary, #9f2d20) !important;
    background: #fff5f1;
    transform: translateY(-1px);
}

.header-nav-link.active {
    color: var(--hn-primary, #9f2d20) !important;
    background:
        linear-gradient(
            135deg,
            #fff2ec,
            #fff8f5
        );
}

.header-nav-link.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0.3rem;
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background:
        linear-gradient(
            90deg,
            var(--hn-primary, #9f2d20),
            var(--hn-secondary, #d59632)
        );
    transform: translateX(-50%);
}

/* Contact button */

.header-contact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.68rem 0.95rem;
    border: 1px solid #dde2e9;
    border-radius: 0.78rem;
    background: #ffffff;
    color: #344054;
    font-size: 0.83rem;
    font-weight: 700;
    white-space: nowrap;
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.header-contact-button:hover {
    color: var(--hn-primary, #9f2d20);
    border-color: rgba(159, 45, 32, 0.35);
    background: #fff8f5;
    transform: translateY(-1px);
}

/* Donate button */

.header-donate-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    overflow: hidden;
    padding: 0.7rem 1.05rem;
    border: 1px solid var(--hn-primary, #9f2d20);
    border-radius: 0.78rem;
    background:
        linear-gradient(
            145deg,
            var(--hn-primary, #9f2d20),
            #721e17
        );
    color: #ffffff;
    font-size: 0.83rem;
    font-weight: 750;
    white-space: nowrap;
    box-shadow: 0 10px 24px rgba(159, 45, 32, 0.2);
    transition:
        color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.header-donate-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 65%;
    height: 100%;
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent
        );
    transform: skewX(-20deg);
    transition: left 0.55s ease;
}

.header-donate-button:hover::before {
    left: 150%;
}

.header-donate-button:hover {
    color: #ffffff;
    border-color: #671a14;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(159, 45, 32, 0.28);
}

/* =========================================================
   MOBILE BUTTONS
========================================================= */

.header-mobile-donate {
    min-width: 42px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    padding: 0.55rem 0.75rem;
    border: 0;
    border-radius: 0.75rem;
    background:
        linear-gradient(
            145deg,
            var(--hn-primary, #9f2d20),
            #751f18
        );
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(159, 45, 32, 0.18);
}

.header-mobile-donate:hover,
.header-mobile-donate:focus {
    color: #ffffff;
    background: #6f1c16;
}

.header-menu-button {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid #e0e5eb !important;
    border-radius: 0.75rem;
    background: #ffffff;
    color: #273244;
    font-size: 1.55rem;
    line-height: 1;
    box-shadow: none !important;
}

.header-menu-button:hover {
    color: var(--hn-primary, #9f2d20);
    border-color: rgba(159, 45, 32, 0.28) !important;
    background: #fff7f3;
}

.header-menu-button:focus {
    box-shadow:
        0 0 0 0.22rem
        rgba(159, 45, 32, 0.12) !important;
}

/* =========================================================
   MOBILE OFFCANVAS
========================================================= */

.header-offcanvas {
    width: min(92vw, 400px) !important;
    border-left: 0 !important;
    background:
        linear-gradient(
            180deg,
            #ffffff,
            #fbfcfd
        );
    box-shadow: -20px 0 50px rgba(15, 23, 42, 0.15);
}

.header-offcanvas-header {
    min-height: 84px;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #e8ebef;
    background: #ffffff;
}

.header-brand-emblem-mobile {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 14px;
    font-size: 0.75rem;
}

.header-offcanvas-body {
    display: flex;
    flex-direction: column;
    padding: 1rem 1.15rem 1.5rem;
}

.mobile-menu-list {
    gap: 0.22rem;
}

.mobile-menu-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 50px;
    padding: 0.82rem 0.9rem;
    border-radius: 0.82rem;
    color: #354052;
    text-decoration: none;
    font-size: 0.93rem;
    font-weight: 650;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        padding 0.2s ease,
        transform 0.2s ease;
}

.mobile-menu-link i {
    color: #9ca5b3;
    font-size: 0.72rem;
    transition: transform 0.2s ease;
}

.mobile-menu-link:hover {
    color: var(--hn-primary, #9f2d20);
    background: #fff6f2;
    padding-left: 1.08rem;
}

.mobile-menu-link:hover i {
    color: var(--hn-primary, #9f2d20);
    transform: translateX(3px);
}

.mobile-menu-link.active {
    color: var(--hn-primary, #9f2d20);
    background:
        linear-gradient(
            135deg,
            #fff0e9,
            #fff8f5
        );
}

.mobile-menu-link.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 999px;
    background:
        linear-gradient(
            180deg,
            var(--hn-primary, #9f2d20),
            var(--hn-secondary, #d59632)
        );
}

/* Mobile action buttons */

.mobile-menu-actions {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.4rem;
    padding-top: 1.35rem;
    border-top: 1px solid #e8ebef;
}

.mobile-menu-actions .btn {
    min-height: 48px;
    border-radius: 0.82rem;
    font-weight: 700;
}

/* Mobile contact block */

.mobile-contact-box {
    margin-top: 1.4rem;
    padding: 1rem;
    border: 1px solid #e6eaf0;
    border-radius: 1rem;
    background:
        linear-gradient(
            145deg,
            #f8fafc,
            #ffffff
        );
}

.mobile-contact-box a {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.48rem 0;
    color: #525e70;
    font-size: 0.84rem;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.mobile-contact-box a:hover {
    color: var(--hn-primary, #9f2d20);
}

.mobile-contact-box a i {
    width: 20px;
    color: var(--hn-primary, #9f2d20);
}

/* Mobile social icons */

.mobile-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.2rem;
}

.mobile-social-links a {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #e1e5eb;
    border-radius: 50%;
    background: #ffffff;
    color: #475467;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(15, 23, 42, 0.04);
    transition:
        color 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.mobile-social-links a:hover {
    color: #ffffff;
    border-color: var(--hn-primary, #9f2d20);
    background: var(--hn-primary, #9f2d20);
    transform: translateY(-3px);
}

/* =========================================================
   BREAKING NEWS TICKER
========================================================= */

.breaking-news-bar {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #efddc6;
    background:
        linear-gradient(
            90deg,
            #fff7ec 0%,
            #fffdf9 45%,
            #fff8ef 100%
        );
}

.breaking-news-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(
            90deg,
            rgba(213, 150, 50, 0.04),
            transparent 30%,
            rgba(159, 45, 32, 0.025)
        );
}

.breaking-news-wrapper {
    position: relative;
    z-index: 2;
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.breaking-news-label {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.38rem 0.75rem;
    border-radius: 999px;
    background:
        linear-gradient(
            145deg,
            var(--hn-primary, #9f2d20),
            #721e17
        );
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    box-shadow: 0 6px 15px rgba(159, 45, 32, 0.18);
}

.breaking-news-label i {
    color: var(--hn-accent, #f4c15d);
}

.breaking-news-viewport {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    mask-image:
        linear-gradient(
            90deg,
            transparent,
            #000 4%,
            #000 96%,
            transparent
        );
    -webkit-mask-image:
        linear-gradient(
            90deg,
            transparent,
            #000 4%,
            #000 96%,
            transparent
        );
}

.breaking-news-track {
    display: flex;
    align-items: center;
    width: max-content;
    gap: 2.8rem;
    animation: breakingTicker 42s linear infinite;
    will-change: transform;
}

.breaking-news-track:hover {
    animation-play-state: paused;
}

.breaking-news-track a {
    display: inline-flex;
    align-items: center;
    gap: 0.52rem;
    color: #6e3025;
    font-size: 0.83rem;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

.breaking-news-track a:hover {
    color: var(--hn-primary, #9f2d20);
}

.breaking-news-dot {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: var(--hn-secondary, #d59632);
    box-shadow: 0 0 0 4px rgba(213, 150, 50, 0.12);
}

.breaking-news-more {
    flex: 0 0 auto;
    align-items: center;
    gap: 0.4rem;
    color: #5c6675;
    font-size: 0.73rem;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
}

.breaking-news-more:hover {
    color: var(--hn-primary, #9f2d20);
}

.breaking-news-more i {
    transition: transform 0.2s ease;
}

.breaking-news-more:hover i {
    transform: translateX(3px);
}

@keyframes breakingTicker {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* =========================================================
   DESKTOP ADJUSTMENTS
========================================================= */

@media (min-width: 1400px) {
    .header-navbar .container {
        max-width: 1380px;
    }

    .header-nav-link {
        padding-left: 0.82rem !important;
        padding-right: 0.82rem !important;
    }
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
    .header-brand {
        max-width: 250px;
    }

    .header-brand-tagline {
        max-width: 180px;
    }

    .header-nav-link {
        padding-left: 0.53rem !important;
        padding-right: 0.53rem !important;
        font-size: 0.79rem;
    }

    .header-contact-button {
        display: none;
    }
}

/* =========================================================
   TABLETS
========================================================= */

@media (max-width: 1199.98px) {
    .header-navbar {
        min-height: 74px;
        padding: 0.55rem 0;
    }

    .header-brand {
        max-width: calc(100% - 150px);
        margin-right: 0;
    }

    .header-brand-emblem {
        width: 47px;
        height: 47px;
        flex-basis: 47px;
        border-radius: 15px;
        font-size: 0.77rem;
    }

    .header-brand-name {
        font-size: 1.12rem;
    }

    .header-brand-tagline {
        max-width: 220px;
        font-size: 0.63rem;
    }
}

/* =========================================================
   MOBILE DEVICES
========================================================= */

@media (max-width: 767.98px) {
    .site-header {
        box-shadow:
            0 1px 0 rgba(15, 23, 42, 0.05),
            0 5px 20px rgba(15, 23, 42, 0.07);
    }

    .header-navbar {
        min-height: 70px;
    }

    .header-brand {
        max-width: calc(100% - 112px);
        gap: 0.65rem;
    }

    .header-brand-tagline {
        display: none;
    }

    .breaking-news-wrapper {
        min-height: 43px;
        gap: 0.65rem;
    }

    .breaking-news-label {
        padding: 0.32rem 0.58rem;
        font-size: 0.61rem;
    }

    .breaking-news-track {
        gap: 2rem;
        animation-duration: 32s;
    }

    .breaking-news-track a {
        font-size: 0.77rem;
    }
}

/* =========================================================
   SMALL MOBILE DEVICES
========================================================= */

@media (max-width: 575.98px) {
    .header-navbar .container,
    .breaking-news-bar .container {
        padding-right: 0.85rem;
        padding-left: 0.85rem;
    }

    .header-navbar {
        min-height: 66px;
        padding: 0.45rem 0;
    }

    .header-brand {
        max-width: calc(100% - 98px);
    }

    .header-brand-emblem {
        width: 41px;
        height: 41px;
        flex-basis: 41px;
        border-radius: 13px;
        font-size: 0.68rem;
    }

    .header-brand-name {
        max-width: 160px;
        font-size: 0.98rem;
    }

    .header-mobile-donate {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        padding: 0;
        border-radius: 0.72rem;
    }

    .header-menu-button {
        width: 40px;
        height: 40px;
        font-size: 1.35rem;
    }

    .header-offcanvas {
        width: 94vw !important;
    }

    .header-offcanvas-header {
        min-height: 76px;
        padding: 0.9rem 1rem;
    }

    .header-offcanvas-body {
        padding-right: 0.9rem;
        padding-left: 0.9rem;
    }

    .breaking-news-label {
        border-radius: 0.55rem;
    }

    .breaking-news-viewport {
        mask-image: none;
        -webkit-mask-image: none;
    }
}

/* =========================================================
   VERY SMALL MOBILE DEVICES
========================================================= */

@media (max-width: 380px) {
    .header-brand {
        max-width: calc(100% - 92px);
        gap: 0.5rem;
    }

    .header-brand-name {
        max-width: 118px;
        font-size: 0.88rem;
    }

    .header-brand-emblem {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        border-radius: 11px;
        font-size: 0.63rem;
    }

    .header-mobile-donate,
    .header-menu-button {
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
    }
}

/* =========================================================
   LANDSCAPE MOBILE
========================================================= */

@media (max-height: 500px) and (orientation: landscape) {
    .header-offcanvas-header {
        min-height: 65px;
        padding-top: 0.65rem;
        padding-bottom: 0.65rem;
    }

    .mobile-menu-link {
        min-height: 42px;
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
    }

    .mobile-menu-actions {
        margin-top: 0.9rem;
        padding-top: 0.9rem;
    }

    .mobile-contact-box {
        margin-top: 0.9rem;
    }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
    .breaking-news-track {
        animation: none;
    }

    .header-nav-link,
    .mobile-menu-link,
    .header-donate-button,
    .header-socials a,
    .mobile-social-links a {
        transition: none;
    }
}