/* ==========================================
   RESPONSIVE HEADER - Works on all devices
   ========================================== */

/* Base Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(11,15,26,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

/* Header Container - Full width matching hero */
.header-inner {
  width: min(900px, 92%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  gap: 1rem;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.logo span {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

/* Desktop Navigation - Default visible */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.nav-desktop a {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.9);
  transition: all 0.2s ease;
  white-space: nowrap;
}

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

.nav-desktop a.active {
  background: rgba(16,185,129,0.2);
  color: #10b981;
}

/* Icons */
.nav-ico {
  display: flex;
  align-items: center;
}

.nav-ico svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* Buttons */
.nav-desktop .btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-desktop .btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  color: #fff;
}

.nav-desktop .btn:not(.btn-primary) {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
}

/* Auth */
.auth-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.5rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
}

.auth-user .muted {
  color: rgba(255,255,255,0.7);
  font-size: 0.75rem;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mobile Toggle - Hidden by default */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  cursor: pointer;
  z-index: 1001;
}

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

/* Backdrop */
.mobile-menu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Body padding for fixed header */
body {
  padding-top: 60px;
}

.hero-enhanced {
  min-height: calc(85vh - 60px);
}

/* ==========================================
   TABLET (768px - 1024px) - Simplified nav
   ========================================== */
@media (max-width: 1024px) and (min-width: 769px) {
  .header-inner {
    width: min(900px, 95%);
  }
  
  .nav-desktop a {
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
  }
  
  .nav-desktop a span:last-child {
    display: none; /* Hide text, show only icons */
  }
  
  .nav-ico svg {
    width: 18px;
    height: 18px;
  }
}

/* ==========================================
   MOBILE (below 768px) - Hamburger menu
   ========================================== */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: rgba(255,255,255,0.3);
  }
  
  .nav-desktop {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(6,78,59,0.98) 0%, rgba(5,150,105,0.95) 100%);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    gap: 0.25rem;
    transform: translateX(100%);
    visibility: hidden;
    opacity: 0;
    transition: transform 0.3s ease, visibility 0.3s ease, opacity 0.3s ease;
    margin-left: 0;
    z-index: 999;
    overflow-y: auto;
    pointer-events: none;
    border-left: 3px solid #10b981;
  }
  
  .nav-desktop.active {
    transform: translateX(0);
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }
  
  .nav-desktop a {
    padding: 1rem;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    border-radius: 0;
    color: rgba(255,255,255,0.95);
  }
  
  .nav-desktop a:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
  }
  
  .nav-desktop a.active {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border-left: 3px solid #34d399;
    padding-left: calc(1rem - 3px);
  }
  
  .nav-desktop a:last-of-type {
    border-bottom: none;
  }
  
  .nav-desktop .btn {
    justify-content: center;
    padding: 1rem;
    margin-top: 0.5rem;
    border-radius: 8px;
  }
  
  .nav-desktop .btn-primary {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    box-shadow: 0 4px 15px rgba(16,185,129,0.4);
  }
  
  .auth-user {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
  }
  
  .auth-user .muted {
    max-width: none;
    text-align: center;
  }
  
  .mobile-menu-backdrop {
    display: block;
  }
}

/* ==========================================
   SMALL MOBILE (below 480px)
   ========================================== */
@media (max-width: 480px) {
  .header-inner {
    padding: 0.5rem 0;
  }
  
  .logo span {
    font-size: 1rem;
  }
  
  .logo-img {
    width: 28px;
    height: 28px;
  }
  
  .nav-desktop {
    top: 52px;
  }
}

/* ==========================================
   THEME COLORS
   ========================================== */
.theme-blue .nav-desktop a.active {
  background: rgba(91,140,255,0.2);
  color: #5b8cff;
}

.theme-blue .nav-desktop .btn-primary {
  background: linear-gradient(135deg, #5b8cff 0%, #3d6df0 100%);
}

.theme-gold .nav-desktop a.active {
  background: rgba(245,158,11,0.2);
  color: #f59e0b;
}

.theme-gold .nav-desktop .btn-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.theme-purple .nav-desktop a.active {
  background: rgba(139,92,246,0.2);
  color: #8b5cf6;
}

.theme-purple .nav-desktop .btn-primary {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.theme-rose .nav-desktop a.active {
  background: rgba(244,63,94,0.2);
  color: #f43f5e;
}

.theme-rose .nav-desktop .btn-primary {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
}

.theme-teal .nav-desktop a.active {
  background: rgba(20,184,166,0.2);
  color: #14b8a6;
}

.theme-teal .nav-desktop .btn-primary {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}
