/* ==========================================================================
   PeopleNetWorth - 3-Row Editorial & Political Data Header Architecture
   Zero-CLS Sticky Behavior, Dropdowns, Global Search, and Mobile Drawer
   ========================================================================== */

html {
    scroll-padding-top: 145px;
}

.pnw-header-placeholder {
    position: relative;
    width: 100%;
    z-index: 999;
}

.pnw-site-header {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    z-index: 999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: box-shadow 0.2s ease;
}

.pnw-site-header.is-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
}

body.admin-bar .pnw-site-header.is-fixed {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .pnw-site-header.is-fixed {
        top: 46px;
    }
}

.pnw-header-inner {
    width: min(1320px, 94%);
    margin: 0 auto;
    box-sizing: border-box;
}

/* ==========================================================================
   ROW 1: UTILITY BAR
   ========================================================================== */
.pnw-utility-bar {
    background: #08172c;
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1.4;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    max-height: 44px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}

.pnw-site-header.is-compact .pnw-utility-bar {
    max-height: 0;
    opacity: 0;
    border-bottom-color: transparent;
}

.pnw-utility-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 34px;
}

.pnw-utility-left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #e2e8f0;
    font-weight: 500;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.pnw-utility-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #38bdf8;
    display: inline-block;
    flex-shrink: 0;
}

.pnw-utility-right {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.pnw-utility-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 18px;
}

.pnw-utility-right a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: color 0.15s ease;
    white-space: nowrap;
}

.pnw-utility-right a:hover,
.pnw-utility-right a:focus-visible {
    color: #ffffff;
    text-decoration: underline;
    outline: none;
}

/* ==========================================================================
   ROW 2: BRAND HEADER
   ========================================================================== */
.pnw-brand-bar {
    background: #ffffff;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    transition: padding 0.2s ease;
}

.pnw-site-header.is-compact .pnw-brand-bar {
    padding: 8px 0;
}

.pnw-brand-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.pnw-brand-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.pnw-brand-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.pnw-brand-logo-link img {
    height: 40px;
    width: auto;
    display: block;
    transition: height 0.2s ease;
}

.pnw-site-header.is-compact .pnw-brand-logo-link img {
    height: 34px;
}

.pnw-brand-identity {
    display: flex;
    flex-direction: column;
    border-left: 1px solid #e2e8f0;
    padding-left: 14px;
    min-width: 0;
}

.pnw-brand-domain {
    font-size: 13px;
    font-weight: 800;
    color: #08172c;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.pnw-brand-tagline {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pnw-brand-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Global Search Input (Row 2 Desktop) */
.pnw-header-search {
    position: relative;
    width: 340px;
    max-width: 34vw;
}

.pnw-search-form {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.pnw-search-icon-prefix {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 13px;
    pointer-events: none;
}

.pnw-header-search input[type="text"],
.pnw-header-search input[type="search"],
.pnw-mobile-search-panel input[type="text"],
.pnw-drawer-search input[type="text"] {
    width: 100%;
    height: 40px;
    padding: 0 36px 0 38px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 13.5px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.pnw-site-header.is-compact .pnw-header-search input[type="text"],
.pnw-site-header.is-compact .pnw-header-search input[type="search"] {
    height: 36px;
}

.pnw-header-search input:focus,
.pnw-mobile-search-panel input:focus,
.pnw-drawer-search input:focus {
    outline: none;
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.pnw-search-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    font-size: 11px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.pnw-search-clear-btn.is-visible {
    display: inline-flex;
}

.pnw-search-clear-btn:hover {
    background: #cbd5e1;
    color: #0f172a;
}

/* Explore CTA Button */
.pnw-header-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    background: #08172c;
    color: #ffffff !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    white-space: nowrap;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.pnw-site-header.is-compact .pnw-header-cta {
    height: 36px;
    padding: 0 14px;
}

.pnw-header-cta:hover,
.pnw-header-cta:focus-visible {
    background: #1d4ed8;
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

/* Mobile Action Buttons (Hidden on Desktop) */
.pnw-mobile-controls {
    display: none;
    align-items: center;
    gap: 8px;
}

.pnw-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    color: #08172c;
    font-size: 17px;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pnw-icon-btn:hover,
.pnw-icon-btn:focus-visible {
    background: #f1f5f9;
    border-color: #cbd5e1;
    outline: none;
}

/* ==========================================================================
   ROW 3: MAIN NAVIGATION BAR
   ========================================================================== */
.pnw-nav-bar {
    background: #f8fafc;
    border-top: 1px solid #eef2f6;
}

.pnw-main-nav {
    position: relative;
}

.pnw-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.pnw-nav-item {
    position: relative;
    flex-shrink: 0;
}

.pnw-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 11px 10px;
    color: #1e293b;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.2;
    position: relative;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.pnw-nav-caret {
    font-size: 10px;
    color: #64748b;
    transition: transform 0.18s ease, color 0.15s ease;
}

.pnw-nav-item:hover > .pnw-nav-link,
.pnw-nav-item.is-open > .pnw-nav-link,
.pnw-nav-item.is-active > .pnw-nav-link,
.pnw-nav-link:focus-visible {
    color: #1d4ed8;
    outline: none;
}

.pnw-nav-item.is-active > .pnw-nav-link::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 0;
    height: 2.5px;
    background: #1d4ed8;
    border-radius: 2px 2px 0 0;
}

.pnw-nav-item.is-open > .pnw-nav-link .pnw-nav-caret,
.pnw-nav-item:hover > .pnw-nav-link .pnw-nav-caret {
    transform: rotate(180deg);
    color: #1d4ed8;
}

/* Dropdown Panels */
.pnw-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 256px;
    max-width: 310px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.16), 0 4px 12px rgba(15, 23, 42, 0.06);
    list-style: none;
    margin: 0;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
    z-index: 1050;
}

/* Align rightmost dropdowns inward so they never clip at viewport edge */
.pnw-nav-item:nth-last-child(-n+2) > .pnw-dropdown-menu {
    left: auto;
    right: 0;
}

.pnw-nav-item.has-dropdown:hover > .pnw-dropdown-menu,
.pnw-nav-item.has-dropdown.is-open > .pnw-dropdown-menu,
.pnw-nav-item.has-dropdown:focus-within > .pnw-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.pnw-dropdown-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    color: #334155;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    line-height: 1.35;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.pnw-dropdown-link:hover,
.pnw-dropdown-link:focus-visible {
    background: #eff6ff;
    color: #1d4ed8;
    outline: none;
}

.pnw-nav-pill {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 6px;
    border-radius: 4px;
    background: #e0f2fe;
    color: #0369a1;
    flex-shrink: 0;
}

.pnw-nav-pill.is-soon {
    background: #fef3c7;
    color: #b45309;
}

.pnw-nav-pill.is-live {
    background: #dcfce7;
    color: #15803d;
}

/* ==========================================================================
   MOBILE EXPANDABLE SEARCH PANEL & FULL-HEIGHT DRAWER
   ========================================================================== */
.pnw-mobile-search-panel {
    display: none;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 10px 0 12px;
}

.pnw-mobile-search-panel.is-open {
    display: block;
}

.pnw-mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(380px, 88vw);
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    z-index: 10050;
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 30px rgba(15, 23, 42, 0.18);
    visibility: hidden;
}

.pnw-mobile-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
}

.pnw-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
    background: #08172c;
    color: #ffffff;
    flex-shrink: 0;
}

.pnw-drawer-brand {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.pnw-drawer-close {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.pnw-drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px 18px 28px;
    -webkit-overflow-scrolling: touch;
}

.pnw-drawer-search {
    position: relative;
    margin-bottom: 16px;
}

.pnw-mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pnw-mobile-item {
    border-bottom: 1px solid #f1f5f9;
}

.pnw-mobile-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.pnw-mobile-link {
    display: block;
    flex: 1 1 auto;
    padding: 13px 4px;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
}

.pnw-mobile-item.is-active > .pnw-mobile-item-row .pnw-mobile-link {
    color: #1d4ed8;
}

.pnw-mobile-acc-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f8fafc;
    border-radius: 8px;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.pnw-mobile-acc-btn[aria-expanded="true"] i {
    transform: rotate(180deg);
    color: #1d4ed8;
}

.pnw-mobile-sublist {
    list-style: none;
    margin: 0 0 10px 0;
    padding: 4px 0 4px 12px;
    border-left: 2px solid #e2e8f0;
}

.pnw-mobile-sublink {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 8px;
    font-size: 13.5px;
    color: #475569;
    text-decoration: none;
    border-radius: 6px;
}

.pnw-mobile-sublink:hover {
    background: #f8fafc;
    color: #1d4ed8;
}

.pnw-drawer-utility {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.pnw-drawer-utility-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin: 0 0 10px 0;
}

.pnw-drawer-utility-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pnw-drawer-utility-links a {
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 6px;
}

.pnw-drawer-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    padding: 12px 16px;
    background: #08172c;
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    border-radius: 8px;
}

.pnw-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 10040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.pnw-drawer-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

body.pnw-drawer-open {
    overflow: hidden;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1220px) {
    .pnw-nav-link {
        font-size: 12.5px;
        padding: 11px 7px;
    }
    .pnw-header-search {
        width: 280px;
    }
}

@media (max-width: 1024px) {
    .pnw-nav-bar,
    .pnw-brand-right .pnw-header-search,
    .pnw-brand-right .pnw-header-cta {
        display: none;
    }
    .pnw-mobile-controls {
        display: flex;
    }
    .pnw-brand-identity {
        display: none;
    }
    .pnw-brand-bar {
        padding: 10px 0;
    }
    .pnw-brand-logo-link img {
        height: 36px;
        max-width: 200px;
    }
}

@media (max-width: 768px) {
    .pnw-utility-right {
        display: none;
    }
    .pnw-utility-flex {
        justify-content: center;
        min-height: 28px;
    }
    .pnw-utility-bar {
        font-size: 11px;
    }
}
