/* ============================================================
   BSC KU — navbar.css  (shared across all pages)
   ============================================================ */

/* Reset */
*, *::before, *::after { box-sizing: border-box; }

/* ── Navbar container ── */
.navbar {
  position: sticky; top: 0; z-index: 9999;
  padding: 0 4%;
  height: 64px;
  background: rgba(16,16,16,.96);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  transition: height .3s, background .3s;
}

/* ── Brand ── */
.brand {
  display: flex; align-items: center; gap: 11px;
  flex-shrink: 0; text-decoration: none; color: inherit;
}
.brand img {
  height: 44px; width: auto; object-fit: contain;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 12px rgba(99,102,241,.6)) brightness(1.2);
  transition: filter .3s;
}
.brand-text strong {
  display: block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem; font-weight: 900;
  background: linear-gradient(90deg, #a5b4fc, #818cf8, #c4b5fd);
  background-size: 200%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmerText 4s linear infinite;
  white-space: nowrap;
}
@keyframes shimmerText { 0% { background-position: 200% center } 100% { background-position: -200% center } }
.brand-text span { display: block; font-size: .65rem; color: var(--muted); font-weight: 500; }

/* ── Nav links (desktop) ── */
.nav-links {
  display: flex; align-items: center; gap: .1rem;
  flex-wrap: nowrap; overflow: visible;
}
.nav-links a {
  position: relative;
  padding: .32rem .52rem;
  font-size: .75rem; font-weight: 700;
  color: var(--muted);
  border-radius: 8px;
  transition: color .2s, background .2s;
  white-space: nowrap; text-decoration: none;
}
.nav-links a::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(135deg, var(--ink, #6366f1), var(--ink2, #8b5cf6));
  opacity: 0; transition: opacity .25s; z-index: -1;
}
.nav-links a:hover::before, .nav-links a.active::before { opacity: 1; }
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a.active {
  background: linear-gradient(135deg, rgba(99,102,241,.28), rgba(139,92,246,.2));
  border: 1px solid rgba(99,102,241,.35);
}

/* ── Utility bar ── */
.nav-utils { display: flex; align-items: center; gap: .45rem; flex-shrink: 0; }

/* ── KU Dropdown ── */
.ku-dropdown { position: relative; }
.ku-btn {
  display: flex; align-items: center; gap: .35rem;
  padding: .35rem .75rem;
  background: rgba(255,255,255,.06); border: 1px solid var(--border);
  border-radius: 8px; color: var(--muted);
  font-size: .75rem; font-weight: 700; cursor: pointer;
  font-family: 'Tajawal', sans-serif; transition: all .2s; white-space: nowrap;
}
.ku-btn:hover { color: #fff; background: rgba(99,102,241,.15); border-color: rgba(99,102,241,.3); }
.ku-menu {
  position: absolute; top: calc(100% + 8px);
  /* RTL: open to the right; LTR: open to the left */
  right: 0;
  background: rgba(18,18,18,.98); backdrop-filter: blur(24px);
  border: 1px solid var(--border2); border-radius: 14px;
  padding: .5rem; min-width: 230px;
  display: none; flex-direction: column; gap: .25rem;
  z-index: 9999; box-shadow: 0 16px 48px rgba(0,0,0,.4);
}
.ku-menu.open { display: flex; animation: fadeDown .2s ease; }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-8px) } to { opacity: 1; transform: none } }
.ku-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem .85rem; border-radius: 10px;
  transition: background .2s; text-decoration: none; color: var(--text);
}
.ku-item:hover { background: rgba(99,102,241,.12); }
.ku-item-icon { font-size: 1.25rem; flex-shrink: 0; }
.ku-item strong { display: block; font-size: .82rem; font-weight: 700; color: var(--text); }
.ku-item span { display: block; font-size: .7rem; color: var(--muted); }

/* ── Language button ── */
.lang-btn {
  padding: .35rem .7rem;
  background: rgba(255,255,255,.06); border: 1px solid var(--border);
  border-radius: 8px; color: var(--muted);
  font-size: .75rem; font-weight: 800; cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif; transition: all .2s; letter-spacing: .04em;
}
.lang-btn:hover { color: #fff; background: rgba(16,185,129,.15); border-color: rgba(16,185,129,.3); }

/* ── Theme toggle ── */
#themeToggle {
  width: 34px; height: 34px;
  background: rgba(255,255,255,.06); border: 1px solid var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--muted); transition: all .25s; flex-shrink: 0;
}
#themeToggle:hover { color: var(--text); transform: scale(1.1); background: rgba(99,102,241,.15); }

/* ── Hamburger ── */
.hamburger {
  display: none; flex-direction: column; gap: 4px; padding: .45rem;
  background: rgba(255,255,255,.06); border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer;
}
.hamburger span { display: block; width: 18px; height: 2px; background: var(--muted); border-radius: 2px; transition: all .25s; }
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Mobile Menu ── */
.mobile-menu {
  display: none; position: fixed; inset: 0; top: 64px;
  background: rgba(16,16,16,.98); backdrop-filter: blur(24px);
  z-index: 9998; overflow-y: auto; padding: 1.5rem 5%;
}
.mobile-menu.open { display: block; animation: mSlide .25s ease; }
@keyframes mSlide { from { opacity: 0; transform: translateY(-12px) } to { opacity: 1; transform: none } }
.mobile-nav { display: flex; flex-direction: column; gap: .25rem; }
.mobile-nav a {
  padding: .85rem 1rem; font-size: 1rem; font-weight: 700;
  color: var(--muted); border-radius: 12px;
  transition: all .2s; text-decoration: none; border: 1px solid transparent;
}
.mobile-nav a:hover, .mobile-nav a.active { color: #fff; background: rgba(99,102,241,.15); border-color: rgba(99,102,241,.25); }
.mobile-divider { height: 1px; background: var(--border); margin: .5rem 0; }

/* ── Light mode overrides ── */
[data-theme="light"] .navbar { background: rgba(255,255,255,.96) !important; border-bottom-color: rgba(99,102,241,.12) !important; box-shadow: 0 1px 20px rgba(99,102,241,.08); }
[data-theme="light"] .nav-links a { color: #64748b !important; }
[data-theme="light"] .nav-links a:hover, [data-theme="light"] .nav-links a.active { color: #fff !important; }
[data-theme="light"] .ku-btn, [data-theme="light"] .lang-btn { background: #f1f5f9 !important; border-color: rgba(99,102,241,.18) !important; color: #475569 !important; }
[data-theme="light"] .ku-btn:hover, [data-theme="light"] .lang-btn:hover { background: rgba(99,102,241,.1) !important; color: #4f46e5 !important; }
[data-theme="light"] .ku-menu { background: rgba(255,255,255,.99) !important; border-color: rgba(99,102,241,.15) !important; }
[data-theme="light"] .ku-item:hover { background: rgba(99,102,241,.07) !important; }
[data-theme="light"] .mobile-menu { background: rgba(255,255,255,.98) !important; }
[data-theme="light"] .mobile-nav a:hover, [data-theme="light"] .mobile-nav a.active { background: rgba(99,102,241,.08) !important; color: #4f46e5 !important; }
[data-theme="light"] #themeToggle { background: #f1f5f9 !important; border-color: rgba(99,102,241,.18) !important; color: #64748b !important; }
[data-theme="light"] .brand img { mix-blend-mode: multiply !important; filter: drop-shadow(0 0 8px rgba(99,102,241,0.3)) brightness(0.9) !important; }

/* ── Responsive ── */
@media (max-width: 1280px) {
  .nav-links { display: none !important; }
  .hamburger { display: flex !important; }
}
@media (max-width: 600px) {
  .brand-text { display: none; }
  .navbar { padding: 0 4%; }
}

/* ── Top Banner ── */
.top-banner {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  padding: .55rem 5%; position: relative; z-index: 10000; overflow: hidden;
}
.top-banner::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
  animation: bannerShimmer 3s linear infinite;
}
@keyframes bannerShimmer { 0% { transform: translateX(-100%) } 100% { transform: translateX(100%) } }
.banner-inner { display: flex; align-items: center; justify-content: center; gap: .75rem; position: relative; }
.banner-dot { width: 6px; height: 6px; background: #fff; border-radius: 50%; animation: blink 1.5s infinite; flex-shrink: 0; }
@keyframes blink { 0%,100% { opacity:1 } 50% { opacity:.3 } }
.banner-text { font-size: .78rem; font-weight: 600; color: rgba(255,255,255,.95); text-align: center; line-height: 1.4; }
.banner-close { position: absolute; left: 0; background: none; border: none; color: rgba(255,255,255,.7); font-size: 1.1rem; cursor: pointer; padding: .2rem .5rem; line-height: 1; transition: color .2s; }
.banner-close:hover { color: #fff; }
[data-theme="light"] .top-banner { background: linear-gradient(135deg, #4f46e5, #6366f1); }
[data-theme="light"] .banner-text { color: rgba(255,255,255,.95) !important; }
