/* ============================================================
   NEXORA HUB – Header Stylesheet
   File: nexora-header.css  (enqueue via functions.php)
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
    --nhub-blue:       #1565C0;
    --nhub-blue-dark:  #0d47a1;
    --nhub-red:        #e53935;
    --nhub-black:      #111111;
    --nhub-white:      #ffffff;
    --nhub-gray:       #f5f5f5;
    --nhub-border:     #e0e0e0;
    --nhub-text:       #222222;
    --nhub-text-light: #555555;
    --nhub-ticker-h:   38px;
    --nhub-header-h:   70px;
    --nhub-font:       'Barlow', sans-serif;
    --nhub-shadow:     0 2px 16px rgba(0,0,0,.10);
    --nhub-radius:     6px;
    --nhub-transition: .22s cubic-bezier(.4,0,.2,1);
}

/* ---------- Reset helpers ---------- */
.nhub-ticker-bar *, .nhub-header *, .nhub-search-overlay *,
.nhub-sidebar * { box-sizing: border-box; margin: 0; padding: 0; }

/* ============================================================
   TOP TICKER / NEWS BAR
   ============================================================ */
.nhub-ticker-bar {
    background: var(--nhub-blue);
    color: var(--nhub-white);
    height: var(--nhub-ticker-h);
    font-family: var(--nhub-font);
    font-size: 13px;
    font-weight: 500;
    position: relative;
    z-index: 1001;
}

.nhub-ticker-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nhub-ticker-icon {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,.18);
    border-radius: 50%;
    padding: 4px;
    flex-shrink: 0;
}

.nhub-ticker-link {
    color: var(--nhub-white);
    text-decoration: none;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    letter-spacing: .01em;
    transition: opacity var(--nhub-transition);
}
.nhub-ticker-link:hover { opacity: .85; }

.nhub-ticker-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    margin-left: auto;
    font-size: 12.5px;
}

.nhub-date {
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: .92;
}

.nhub-follow-label { opacity: .85; }

.nhub-social-icons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nhub-social-icons a {
    color: var(--nhub-white);
    display: flex;
    align-items: center;
    opacity: .85;
    transition: opacity var(--nhub-transition), transform var(--nhub-transition);
}
.nhub-social-icons a:hover { opacity: 1; transform: translateY(-1px); }

/* ============================================================
   MAIN HEADER
   ============================================================ */
.nhub-header {
    background: var(--nhub-white);
    border-bottom: 1px solid var(--nhub-border);
    height: var(--nhub-header-h);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 8px rgba(0,0,0,.07);
    font-family: var(--nhub-font);
}

.nhub-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 28px;
    justify-content: space-between;
}

/* ---------- Logo ---------- */
.nhub-logo { flex-shrink: 0; }

.nhub-logo-text {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--nhub-black);
    font-size: 22px;
    font-weight: 800;
    font-family: var(--nhub-font);
    letter-spacing: -.02em;
    line-height: 1;
}

.nhub-logo-text strong { font-weight: 800; }
.nhub-logo-text em { font-style: italic; color: var(--nhub-red); }

/* WordPress custom logo override */
.nhub-logo .custom-logo-link img {
    height: 42px;
    width: auto;
    display: block;
}

/* ---------- Desktop Nav ---------- */
.nhub-nav { flex: 1; }

.nhub-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2px;
}

.nhub-menu li a {
    display: block;
    padding: 6px 13px;
    font-family: var(--nhub-font);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--nhub-text);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    transition: color var(--nhub-transition);
}

.nhub-menu li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 13px;
    right: 13px;
    height: 2px;
    background: var(--nhub-red);
    transform: scaleX(0);
    transition: transform var(--nhub-transition);
    transform-origin: left;
}

.nhub-menu li a:hover,
.nhub-menu li.current-menu-item > a { color: var(--nhub-red); }

.nhub-menu li.current-menu-item > a::after,
.nhub-menu li a:hover::after { transform: scaleX(1); }

/* ---------- Actions ---------- */
.nhub-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.nhub-search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--nhub-text);
    display: flex;
    align-items: center;
    border-radius: 50%;
    transition: background var(--nhub-transition), color var(--nhub-transition);
}
.nhub-search-btn:hover { background: var(--nhub-gray); color: var(--nhub-blue); }

.nhub-subscribe-btn {
    background: var(--nhub-black);
    color: var(--nhub-white);
    font-family: var(--nhub-font);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 10px 20px;
    border-radius: var(--nhub-radius);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background var(--nhub-transition), transform var(--nhub-transition);
    white-space: nowrap;
}
.nhub-subscribe-btn:hover { background: #333; transform: translateY(-1px); }

.nhub-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 6px;
    width: 38px;
    height: 38px;
    border-radius: var(--nhub-radius);
    transition: background var(--nhub-transition);
}
.nhub-hamburger:hover { background: var(--nhub-gray); }
.nhub-hamburger span {
    display: block;
    height: 2px;
    background: var(--nhub-black);
    border-radius: 2px;
    transition: transform var(--nhub-transition), opacity var(--nhub-transition);
}
.nhub-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nhub-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nhub-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   SEARCH MODAL / OVERLAY
   ============================================================ */
.nhub-search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s ease;
    backdrop-filter: blur(3px);
}
.nhub-search-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.nhub-search-modal {
    background: var(--nhub-white);
    width: 100%;
    max-width: 680px;
    margin: 0 20px;
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(0,0,0,.18);
    overflow: hidden;
    transform: translateY(-20px);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.nhub-search-overlay.open .nhub-search-modal { transform: translateY(0); }

.nhub-search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--nhub-border);
}

.nhub-search-label {
    font-family: var(--nhub-font);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--nhub-text-light);
}

.nhub-search-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--nhub-text);
    display: flex;
    align-items: center;
    padding: 4px;
    border-radius: 50%;
    transition: background var(--nhub-transition), color var(--nhub-transition);
}
.nhub-search-close:hover { background: var(--nhub-gray); color: var(--nhub-red); }

.nhub-search-form { padding: 16px 20px 0; }

.nhub-search-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid var(--nhub-border);
    border-radius: var(--nhub-radius);
    padding: 10px 14px;
    transition: border-color var(--nhub-transition);
}
.nhub-search-input-wrap:focus-within { border-color: var(--nhub-blue); }

.nhub-search-input-icon { color: var(--nhub-text-light); flex-shrink: 0; }

.nhub-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: var(--nhub-font);
    font-size: 17px;
    font-weight: 500;
    color: var(--nhub-text);
    background: transparent;
    caret-color: var(--nhub-blue);
}
.nhub-search-input::placeholder { color: #aaa; }

.nhub-search-submit {
    background: var(--nhub-blue);
    color: var(--nhub-white);
    border: none;
    cursor: pointer;
    padding: 7px 10px;
    border-radius: var(--nhub-radius);
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: background var(--nhub-transition);
}
.nhub-search-submit:hover { background: var(--nhub-blue-dark); }

/* Live Results Dropdown */
.nhub-live-results {
    border: 1px solid var(--nhub-border);
    border-top: none;
    border-radius: 0 0 var(--nhub-radius) var(--nhub-radius);
    max-height: 320px;
    overflow-y: auto;
    display: none;
    background: var(--nhub-white);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.nhub-live-results.active { display: block; }

.nhub-live-results .nhub-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    text-decoration: none;
    color: var(--nhub-text);
    transition: background var(--nhub-transition);
    border-bottom: 1px solid var(--nhub-border);
}
.nhub-live-results .nhub-result-item:last-child { border-bottom: none; }
.nhub-live-results .nhub-result-item:hover { background: var(--nhub-gray); }

.nhub-live-results .nhub-result-item img {
    width: 48px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.nhub-live-results .nhub-result-placeholder {
    width: 48px;
    height: 40px;
    background: var(--nhub-gray);
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

.nhub-live-results .nhub-result-text { flex: 1; overflow: hidden; }
.nhub-live-results .nhub-result-title {
    font-family: var(--nhub-font);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nhub-live-results .nhub-result-cat {
    font-size: 11.5px;
    color: var(--nhub-text-light);
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 600;
}

.nhub-live-results .nhub-loading,
.nhub-live-results .nhub-no-results {
    padding: 16px 14px;
    font-size: 14px;
    color: var(--nhub-text-light);
    text-align: center;
    font-family: var(--nhub-font);
}

.nhub-live-results .nhub-view-all {
    display: block;
    padding: 11px 14px;
    text-align: center;
    font-family: var(--nhub-font);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--nhub-blue);
    text-decoration: none;
    background: var(--nhub-gray);
    transition: background var(--nhub-transition);
}
.nhub-live-results .nhub-view-all:hover { background: #e8eaf6; }

/* Popular searches */
.nhub-search-popular {
    padding: 14px 20px 18px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-family: var(--nhub-font);
    font-size: 12.5px;
}
.nhub-search-popular span {
    color: var(--nhub-text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.nhub-search-popular a {
    background: var(--nhub-gray);
    color: var(--nhub-text);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    text-decoration: none;
    border: 1px solid var(--nhub-border);
    transition: background var(--nhub-transition), color var(--nhub-transition), border-color var(--nhub-transition);
}
.nhub-search-popular a:hover { background: var(--nhub-blue); color: var(--nhub-white); border-color: var(--nhub-blue); }

/* ============================================================
   MOBILE SIDEBAR
   ============================================================ */
.nhub-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1500;
    transition: opacity .28s ease;
    opacity: 0;
    backdrop-filter: blur(2px);
}
.nhub-sidebar-overlay.open { display: block; opacity: 1; }

.nhub-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    background: var(--nhub-white);
    z-index: 1600;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 32px rgba(0,0,0,.15);
    transform: translateX(100%);
    transition: transform .32s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
}
.nhub-sidebar.open { transform: translateX(0); }

.nhub-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--nhub-border);
    background: var(--nhub-white);
    position: sticky;
    top: 0;
    z-index: 2;
}

.nhub-sidebar-logo {
    font-size: 18px;
}

.nhub-sidebar-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--nhub-text);
    display: flex;
    align-items: center;
    padding: 5px;
    border-radius: 50%;
    transition: background var(--nhub-transition), color var(--nhub-transition);
}
.nhub-sidebar-close:hover { background: var(--nhub-gray); color: var(--nhub-red); }

.nhub-sidebar-search {
    padding: 16px 20px;
    border-bottom: 1px solid var(--nhub-border);
}

.nhub-sidebar-search form {
    display: flex;
    align-items: center;
    border: 2px solid var(--nhub-border);
    border-radius: var(--nhub-radius);
    overflow: hidden;
    transition: border-color var(--nhub-transition);
}
.nhub-sidebar-search form:focus-within { border-color: var(--nhub-blue); }

.nhub-sidebar-search input {
    flex: 1;
    border: none;
    outline: none;
    padding: 9px 12px;
    font-family: var(--nhub-font);
    font-size: 14px;
    color: var(--nhub-text);
    background: transparent;
}

.nhub-sidebar-search button {
    background: var(--nhub-blue);
    border: none;
    cursor: pointer;
    padding: 9px 13px;
    color: var(--nhub-white);
    display: flex;
    align-items: center;
    transition: background var(--nhub-transition);
}
.nhub-sidebar-search button:hover { background: var(--nhub-blue-dark); }

.nhub-sidebar-nav { flex: 1; padding: 8px 0; }

.nhub-sidebar-menu { list-style: none; }
.nhub-sidebar-menu li a {
    display: block;
    padding: 13px 24px;
    font-family: var(--nhub-font);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--nhub-text);
    text-decoration: none;
    border-bottom: 1px solid var(--nhub-border);
    transition: background var(--nhub-transition), color var(--nhub-transition), padding-left var(--nhub-transition);
}
.nhub-sidebar-menu li a:hover,
.nhub-sidebar-menu li.active a,
.nhub-sidebar-menu li.current-menu-item a {
    background: var(--nhub-gray);
    color: var(--nhub-red);
    padding-left: 30px;
}

.nhub-sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--nhub-border);
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.nhub-sidebar-footer a:hover, .nhub-subscribe-btn, .nhub-ticker-link{
color:#fff!important;
}

.nhub-subscribe-sidebar {
    display: block;
    text-align: center;
    font-size: 13px;
    padding: 12px 20px;
}

.nhub-sidebar-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}
.nhub-sidebar-social a {
    color: var(--nhub-text-light);
    display: flex;
    transition: color var(--nhub-transition), transform var(--nhub-transition);
}
.nhub-sidebar-social a:hover { color: var(--nhub-blue); transform: translateY(-2px); }

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Tablet: hide some ticker meta */
@media (max-width: 900px) {
    .nhub-ticker-meta .nhub-date { display: none; }
    .nhub-menu li a { padding: 6px 10px; font-size: 12.5px; }
}

/* Mobile: show hamburger, hide desktop nav */
@media (max-width: 768px) {
    .nhub-ticker-bar { display: none; }

    .nhub-nav { display: none; }
    .nhub-hamburger { display: flex; }
    .nhub-subscribe-btn:not(.nhub-subscribe-sidebar) { display: none; }

    .nhub-header-inner { gap: 12px; }
    .nhub-logo-text { font-size: 19px; }
}

@media (max-width: 480px) {
    .nhub-logo-text { font-size: 17px; }
    .nhub-logo-icon svg { width: 22px; height: 22px; }
    .nhub-search-modal { margin: 0 10px; }
    .nhub-search-input { font-size: 15px; }
}

/* Body scroll lock when sidebar/search is open */
body.nhub-no-scroll { overflow: hidden; }