/* =============================================
   BGZ HEADER STYLES
   BossGamerz Custom Theme
   Prefix: bgz-
   Colors: Orange #F97316 | Blue #1E3A8A
   ============================================= */

:root {
    --bgz-orange:       #F97316;
    --bgz-orange-dark:  #EA6C00;
    --bgz-orange-light: #FFF7ED;
    --bgz-blue:         #1E3A8A;
    --bgz-blue-dark:    #1e3177;
    --bgz-white:        #ffffff;
    --bgz-gray-100:     #F3F4F6;
    --bgz-gray-200:     #E5E7EB;
    --bgz-gray-400:     #9CA3AF;
    --bgz-gray-600:     #4B5563;
    --bgz-gray-700:     #374151;
    --bgz-shadow-md:    0 4px 20px rgba(0,0,0,.08);
    --bgz-shadow-lg:    0 8px 30px rgba(0,0,0,.12);
    --bgz-radius-sm:    6px;
    --bgz-radius-md:    8px;
    --bgz-radius-lg:    12px;
    --bgz-transition:   all 0.2s ease;
    --bgz-header-h:     68px;
}

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--bgz-gray-700);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* TOPBAR */
.bgz-topbar {
    background: var(--bgz-blue);
    padding: 7px 0;
    font-size: 12px;
    color: var(--bgz-white);
}

.bgz-topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bgz-topbar-left {
    opacity: .9;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: .2px;
}

.bgz-topbar-social { display: flex; gap: 6px; }

.bgz-topbar-social a {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: rgba(255,255,255,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bgz-white);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    transition: var(--bgz-transition);
}

.bgz-topbar-social a:hover { background: var(--bgz-orange); }

/* HEADER */
.bgz-header {
    background: var(--bgz-white);
    border-bottom: 1px solid var(--bgz-gray-200);
    position: sticky;
    top: 0;
    z-index: 9999;
    transition: box-shadow .3s ease;
    will-change: box-shadow;
}

.bgz-header.bgz-is-sticky { box-shadow: var(--bgz-shadow-md); }

.bgz-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--bgz-header-h);
    gap: 24px;
}

/* LOGO */
.bgz-logo-wrap {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    flex-shrink: 0;
}

.bgz-logo-img {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bgz-logo-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.bgz-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.bgz-logo-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--bgz-blue);
    letter-spacing: -.4px;
}

.bgz-logo-name .bgz-logo-accent { color: var(--bgz-orange); }

.bgz-logo-tagline {
    font-size: 10px;
    color: var(--bgz-gray-400);
    letter-spacing: .6px;
    text-transform: uppercase;
    font-weight: 500;
}

/* NAVIGATION */
.bgz-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
}

.bgz-nav li { position: relative; }

.bgz-nav li a {
    display: block;
    color: var(--bgz-gray-700);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 13px;
    border-radius: var(--bgz-radius-sm);
    transition: var(--bgz-transition);
    white-space: nowrap;
    position: relative;
}

.bgz-nav li a:hover,
.bgz-nav li a:focus {
    color: var(--bgz-orange);
    background: var(--bgz-orange-light);
    outline: none;
}

.bgz-nav li.bgz-current-item > a { color: var(--bgz-orange); }

.bgz-nav li.bgz-current-item > a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 13px;
    right: 13px;
    height: 2px;
    background: var(--bgz-orange);
    border-radius: 2px;
}

/* Dropdown arrow */
.bgz-nav li.bgz-has-dropdown > a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    margin-left: 5px;
    vertical-align: middle;
    opacity: .6;
    transition: transform .2s;
    position: static;
    background: none;
}

.bgz-nav li.bgz-has-dropdown:hover > a::after {
    transform: rotate(180deg);
}

/* Dropdown menu */
.bgz-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: var(--bgz-white);
    border: 1px solid var(--bgz-gray-200);
    border-radius: var(--bgz-radius-lg);
    padding: 8px;
    min-width: 190px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all .2s ease;
    box-shadow: var(--bgz-shadow-lg);
    z-index: 100;
    list-style: none;
}

.bgz-nav li.bgz-has-dropdown:hover .bgz-dropdown,
.bgz-nav li.bgz-has-dropdown:focus-within .bgz-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.bgz-dropdown li a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--bgz-gray-700);
    font-weight: 400;
    white-space: nowrap;
}

.bgz-dropdown li a:hover {
    background: var(--bgz-orange-light);
    color: var(--bgz-orange);
}

/* HEADER RIGHT */
.bgz-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.bgz-search-btn {
    width: 38px;
    height: 38px;
    border: 1px solid var(--bgz-gray-200);
    border-radius: var(--bgz-radius-md);
    background: var(--bgz-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bgz-gray-600);
    transition: var(--bgz-transition);
    flex-shrink: 0;
}

.bgz-search-btn:hover {
    border-color: var(--bgz-orange);
    color: var(--bgz-orange);
    background: var(--bgz-orange-light);
}

.bgz-search-btn svg { width: 16px; height: 16px; pointer-events: none; }

.bgz-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bgz-orange);
    color: var(--bgz-white);
    text-decoration: none;
    padding: 9px 18px;
    border-radius: var(--bgz-radius-md);
    font-size: 14px;
    font-weight: 600;
    transition: var(--bgz-transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.bgz-cta-btn:hover {
    background: var(--bgz-orange-dark);
    transform: translateY(-1px);
    color: var(--bgz-white);
    text-decoration: none;
}

/* HAMBURGER */
.bgz-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 9px;
    border: 1px solid var(--bgz-gray-200);
    border-radius: var(--bgz-radius-md);
    background: var(--bgz-white);
    transition: var(--bgz-transition);
}

.bgz-hamburger:hover {
    border-color: var(--bgz-orange);
    background: var(--bgz-orange-light);
}

.bgz-hamburger span {
    width: 20px;
    height: 2px;
    background: var(--bgz-gray-700);
    border-radius: 2px;
    display: block;
    transition: all .3s ease;
}

.bgz-hamburger.bgz-is-open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.bgz-hamburger.bgz-is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.bgz-hamburger.bgz-is-open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* MOBILE OVERLAY */
.bgz-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9998;
    opacity: 0;
    transition: opacity .3s ease;
}
.bgz-mobile-overlay.bgz-is-open { display: block; opacity: 1; }

/* MOBILE DRAWER */
.bgz-mobile-menu {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 290px;
    max-width: 85vw;
    background: var(--bgz-white);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform .3s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,.12);
    overflow-y: auto;
}
.bgz-mobile-menu.bgz-is-open { transform: translateX(0); }

.bgz-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--bgz-gray-200);
    background: var(--bgz-blue);
    flex-shrink: 0;
}
.bgz-drawer-brand { font-size: 18px; font-weight: 700; color: var(--bgz-white); letter-spacing: -.3px; }
.bgz-drawer-brand span { color: var(--bgz-orange); }
.bgz-drawer-close {
    width: 32px; height: 32px;
    border: none;
    background: rgba(255,255,255,.15);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bgz-white);
    transition: var(--bgz-transition);
}
.bgz-drawer-close:hover { background: rgba(255,255,255,.28); }

.bgz-mobile-menu > ul { list-style: none; padding: 8px 0; flex: 1; }
.bgz-mobile-menu > ul li { position: relative; }
.bgz-mobile-menu > ul li > a {
    display: flex;
    align-items: center;
    justify-content: left;
    padding: 13px 20px;
    color: var(--bgz-gray-700);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-bottom: 1px solid var(--bgz-gray-100);
    transition: var(--bgz-transition);
    gap: 12px;
}
.bgz-mobile-menu > ul li:last-child > a { border-bottom: none; }
.bgz-mobile-menu > ul li > a:hover {
    color: var(--bgz-orange);
    background: var(--bgz-orange-light);
    padding-left: 26px;
}

.bgz-mobile-arrow {
    width: 28px; height: 28px;
    border-radius: 6px;
    background: var(--bgz-gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--bgz-transition);
    margin-left: auto;
}
.bgz-mobile-arrow svg { width: 14px; height: 14px; color: var(--bgz-gray-600); transition: transform .2s; }
.bgz-mobile-has-sub.bgz-sub-open > a .bgz-mobile-arrow { background: var(--bgz-orange-light); }
.bgz-mobile-has-sub.bgz-sub-open > a .bgz-mobile-arrow svg { transform: rotate(180deg); color: var(--bgz-orange); }

.bgz-mobile-sub { display: none; background: var(--bgz-gray-100); list-style: none; }
.bgz-mobile-has-sub.bgz-sub-open .bgz-mobile-sub { display: block; }
.bgz-mobile-sub li a {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 11px 20px 11px 36px !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: var(--bgz-gray-600) !important;
    border-bottom: 1px solid var(--bgz-gray-200) !important;
    transition: var(--bgz-transition);
}
.bgz-mobile-sub li:last-child a { border-bottom: none !important; }
.bgz-mobile-sub li a:hover { color: var(--bgz-orange) !important; background: var(--bgz-orange-light) !important; padding-left: 40px !important; }
.bgz-mobile-sub li a::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--bgz-orange); flex-shrink: 0; }

.bgz-mobile-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--bgz-orange);
    color: var(--bgz-white);
    text-decoration: none;
    padding: 14px 20px;
    font-weight: 600;
    font-size: 15px;
    margin: 16px;
    border-radius: var(--bgz-radius-md);
    transition: var(--bgz-transition);
    flex-shrink: 0;
}
.bgz-mobile-cta:hover { background: var(--bgz-orange-dark); color: var(--bgz-white); }

/* RESPONSIVE */
@media (max-width: 900px) {
    .bgz-nav { display: none; }
    .bgz-header-right .bgz-search-btn,
    .bgz-header-right .bgz-cta-btn { display: none; }
    .bgz-hamburger { display: flex; }
}

@media (max-width: 480px) {
    .bgz-topbar-left { display: none; }
    .bgz-logo-tagline { display: none; }
    .bgz-logo-name { font-size: 18px; }
}

/* ==============================================
   SEARCH MODAL
   ============================================== */
.bgz-search-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
}
.bgz-search-modal[hidden] { display: none !important; }

.bgz-search-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15,30,74,.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.bgz-search-box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 620px;
    margin: 0 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0,0,0,.25);
    overflow: hidden;
}

.bgz-search-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #F1F5F9;
}

.bgz-search-ico { flex-shrink: 0; color: #94A3B8; }

.bgz-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    font-family: inherit;
    color: #0F172A;
    background: transparent;
}
.bgz-search-input::placeholder { color: #CBD5E1; }

.bgz-search-close {
    flex-shrink: 0;
    width: 30px; height: 30px;
    border: 1px solid #E2E8F0;
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748B;
    transition: all .15s;
}
.bgz-search-close:hover { background: #F1F5F9; color: #0F172A; }

.bgz-search-results {
    max-height: 360px;
    overflow-y: auto;
    display: none;
}

.bgz-search-footer {
    padding: 10px 18px;
    font-size: 12px;
    color: #94A3B8;
    border-top: 1px solid #F1F5F9;
    background: #F8FAFC;
}
.bgz-search-footer kbd {
    background: #E2E8F0;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 11px;
    font-family: monospace;
}

/* Search result items */
.bgz-sr-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 18px;
    text-decoration: none;
    border-bottom: 1px solid #F8FAFC;
    transition: background .12s;
}
.bgz-sr-item:hover { background: #F8FAFC; }

.bgz-sr-thumb {
    flex-shrink: 0;
    width: 48px; height: 36px;
    border-radius: 6px;
    object-fit: cover;
}
.bgz-sr-thumb-ph {
    background: #F1F5F9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bgz-sr-meta { flex: 1; min-width: 0; }
.bgz-sr-cat {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 600;
    color: #C2410C;
    background: #FFF7ED;
    border-radius: 4px;
    padding: 1px 6px;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.bgz-sr-title {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: #0F172A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bgz-sr-view-all {
    display: block;
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #1E3A8A;
    text-decoration: none;
    border-top: 1px solid #F1F5F9;
    background: #F8FAFC;
    transition: background .12s;
}
.bgz-sr-view-all:hover { background: #EFF6FF; }

.bgz-sr-loading {
    padding: 20px 18px;
    font-size: 13.5px;
    color: #94A3B8;
    display: flex;
    align-items: center;
    gap: 10px;
}
.bgz-sr-spinner {
    width: 16px; height: 16px;
    border: 2px solid #E2E8F0;
    border-top-color: #F97316;
    border-radius: 50%;
    animation: bgzSpin .6s linear infinite;
    flex-shrink: 0;
}
@keyframes bgzSpin { to { transform: rotate(360deg); } }

.bgz-sr-empty {
    padding: 20px 18px;
    font-size: 13.5px;
    color: #94A3B8;
    text-align: center;
}

/* Mobile search bar */
.bgz-mobile-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--bgz-gray-200);
    background: var(--bgz-gray-100);
}
.bgz-mobile-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    color: var(--bgz-gray-700);
}
.bgz-mobile-search-input::placeholder { color: #CBD5E1; }

.bgz-mobile-search-results {
    display: none;
    border-bottom: 2px solid var(--bgz-gray-200);
}
.bgz-mobile-search-results .bgz-sr-item { padding: 10px 16px; }
.bgz-mobile-search-results .bgz-sr-view-all { padding: 10px 16px; }

@media (max-width: 480px) {
    .bgz-search-modal { padding-top: 20px; align-items: center; }
    .bgz-search-box   { margin: 0 12px; border-radius: 12px; }
}