/* ============================================================
   KnowBox — Floating Island Header
   ============================================================ */

.floating-header {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  transition: top 0.3s ease, opacity 0.3s ease;
}

.floating-header.hidden {
  top: -100px;
  opacity: 0;
  pointer-events: none;
}

.header-island {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 20px;
  height: 56px;
  background: rgba(9, 9, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5), 0 0 0 1px rgba(99,102,241,0.05);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.floating-header.scrolled .header-island {
  background: rgba(9, 9, 15, 0.95);
  box-shadow: 0 8px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(99,102,241,0.1);
}

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

.logo-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.logo-wordmark {
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.01em;
}
.logo-wordmark span {
  color: #6366f1;
}

/* ── Nav ── */
.island-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 auto;
}

.island-link {
  position: relative;
  padding: 6px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #94a3b8;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
}
.island-link:hover {
  color: #f1f5f9;
  background: rgba(99,102,241,0.08);
}
.island-link.active {
  color: #f1f5f9;
}

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

.island-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 9px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 12px rgba(99,102,241,0.4);
}
.island-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(99,102,241,0.5);
}
.island-cta svg { flex-shrink: 0; }

/* ── Mobile burger ── */
.island-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.island-burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #94a3b8;
  border-radius: 2px;
  transition: 0.2s;
}

/* ── Mobile drawer ── */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
}
.mobile-overlay.open { display: block; opacity: 1; }

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background: #0d0d16;
  border-left: 1px solid rgba(99,102,241,0.15);
  z-index: 1001;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  padding: 24px;
}
.mobile-drawer.open { right: 0; }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.drawer-close {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.drawer-link {
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #94a3b8;
  border-radius: 10px;
  transition: color 0.2s, background 0.2s;
}
.drawer-link:hover {
  color: #f1f5f9;
  background: rgba(99,102,241,0.08);
}

.drawer-footer { padding-top: 24px; border-top: 1px solid rgba(99,102,241,0.1); }

.drawer-cta {
  display: block;
  text-align: center;
  padding: 12px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-weight: 600;
  border-radius: 10px;
}

@media (max-width: 768px) {
  .island-nav { display: none; }
  .island-burger { display: flex; }
  .island-cta { display: none; }
}
