/* =========================================
   HEADER.CSS — Navy Gradient Top Nav
   inspired by existing spring-app header
   ========================================= */

#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, var(--navy-light) 100%);
  z-index: 1000;
  overflow: hidden;
}

/* Diagonal stripe overlay — exactly like spring-app */
#site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    175deg,
    transparent 0px,
    transparent 18px,
    rgba(255,255,255,0.025) 18px,
    rgba(255,255,255,0.025) 36px
  );
  pointer-events: none;
}

/* Large watermark text */
#site-header::after {
  content: 'KBO';
  position: absolute;
  right: 12px;
  bottom: -10px;
  font-size: 72px;
  font-weight: 900;
  color: rgba(255,255,255,0.04);
  letter-spacing: -2px;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

.header-inner {
  position: relative;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0;
  z-index: 1;
}

/* ── Logo ─────────────────────────────── */
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 28px;
}

.header-logo-icon {
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.04em;
  backdrop-filter: blur(4px);
  flex-shrink: 0;
}

.header-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 2px;
}

.header-logo-main {
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.05em;
}

.header-logo-sub {
  font-size: 10px;
  font-weight: 500;
  color: #FCD34D;
  letter-spacing: 0.06em;
}

/* ── Nav Links ────────────────────────── */
.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.nav-link:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.nav-link.active {
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-weight: 700;
}

/* Live dot */
.nav-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  animation: pulse-live 1.4s ease-in-out infinite;
  flex-shrink: 0;
}

/* ── Right Controls ───────────────────── */
.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Search */
.header-search { position: relative; }

.header-search-input {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 7px 12px 7px 32px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  width: 190px;
  transition: all var(--transition);
  outline: none;
}

.header-search-input:focus {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.4);
  width: 240px;
}

.header-search-input::placeholder { color: rgba(255,255,255,0.45); }

.header-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.45);
  pointer-events: none;
}

/* Date button */
.header-date-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.header-date-btn:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.35);
  color: #fff;
}

/* Mobile menu button */
.header-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
}

/* ── Mobile Drawer ──────────────────────── */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.mobile-nav-overlay.open { opacity: 1; }

.mobile-nav-drawer {
  position: fixed;
  top: 0; left: 0;
  width: 260px;
  height: 100%;
  background: var(--navy);
  border-right: 1px solid rgba(255,255,255,0.1);
  z-index: 1001;
  padding: 80px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateX(-100%);
  transition: transform var(--transition-slow);
}

.mobile-nav-drawer.open { transform: translateX(0); }

.mobile-nav-drawer .nav-link {
  padding: 11px 14px;
  font-size: 14px;
  border-radius: 8px;
}

/* ── Responsive ─────────────────────────── */
@media (max-width: 1024px) {
  .header-inner { padding: 0 16px; }
  .header-search-input { width: 150px; }
  .header-logo { margin-right: 16px; }
}

@media (max-width: 768px) {
  .header-nav, .header-date-btn { display: none; }
  .header-menu-btn { display: flex; }
  .mobile-nav-overlay { display: block; }
}

@media (max-width: 480px) {
  .header-search { display: none; }
}
