/**
 * Header CSS - Header, Navigation, and Logo Styles
 * 
 * This file contains styles for:
 * - Header layout and positioning
 * - Navigation dropdown menu
 * - Header content container
 * - Logo and branding elements
 * - Hero button
 * 
 * Extracted from index.php during section compartmentalization refactoring
 */

/* ============================================
   Main Navbar - Fixed at top, always visible
   ============================================ */
.main-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(27, 32, 39, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  border-bottom: 4px solid #38dbef;
}

.navbar-content {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: clamp(8px, 1.5vw, 10px) clamp(15px, 2.5vw, 20px);
  gap: clamp(15px, 2.5vw, 20px);
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.navbar-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin: 0;
}

.navbar-logo {
  width: 50px;
  height: auto;
  display: block;
  margin: 0;
}

/* ============================================
   Header Layout - Hero Section
   ============================================ */
header { 
  padding-top: clamp(40px, 6vw, 60px); 
  padding-bottom: clamp(30px, 5vw, 50px);
  text-align: center; 
  position: relative;
  margin-bottom: 0;
  margin-top: var(--navbar-height, 70px); /* Space for fixed navbar */
  min-height: fit-content;
}

/* Navbar dropdown - hidden on desktop, shown on mobile */
.navbar-dropdown {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}

/* Desktop: Show navbar-menu, hide dropdown */
@media (min-width: 1201px) {
  .navbar-menu {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  
  .navbar-dropdown {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/* Mobile: Hide navbar-menu, show dropdown */
@media (max-width: 1200px) {
  .navbar-menu {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  
  .navbar-dropdown {
    display: block !important;
    visibility: visible !important;
    pointer-events: auto !important;
    margin-left: auto;
    flex-shrink: 0;
  }
}

/* ============================================
   Navigation Dropdown
   ============================================ */
.nav-dropdown {
  position: relative;
  z-index: 1000;
}

/* Navbar dropdown in main navbar */
.main-navbar .nav-dropdown {
  position: relative;
  top: auto;
  right: auto;
}

.nav-toggle {
  background: var(--btn-bg);
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-toggle:hover {
  background: var(--btn-hover);
  box-shadow: 0 0 10px rgba(63,224,249,0.3);
}

.nav-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--btn-bg);
  border: 2px solid var(--accent);
  border-radius: 8px;
  min-width: 200px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  margin-top: 5px;
}

.nav-dropdown.open .nav-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu a {
  display: block;
  padding: 12px 16px;
  color: #9ca3af; /* gray-300 equivalent */
  text-decoration: none;
  border-bottom: 1px solid rgba(63,224,249,0.1);
  transition: all 0.2s ease;
  position: relative;
}

.nav-menu a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(to right, rgba(6, 182, 212, 0.1), rgba(63, 224, 249, 0.1));
  transition: width 0.3s ease;
}

.nav-menu a:hover {
  background: rgba(31, 41, 55, 0.5); /* gray-800/50 */
  color: #06b6d4; /* cyan-400 */
  padding-left: 20px;
  text-shadow: 0 0 8px rgba(6, 182, 212, 0.3);
}

.nav-menu a:hover::before {
  width: 3px;
}

.nav-menu a:last-child {
  border-bottom: none;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hamburger span {
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: all 0.3s;
}

.nav-dropdown.open .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-dropdown.open .hamburger span:nth-child(2) {
  opacity: 0;
}

.nav-dropdown.open .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Tablet and Mobile styles - handled in main navbar media queries above */

@media (max-width: 768px) {
  .nav-dropdown {
    top: 10px;
    right: 10px;
  }
  
  .nav-toggle {
    padding: 8px 12px;
    font-size: clamp(12px, 3vw, 14px);
    min-height: 44px; /* Better touch target */
  }
  
  .nav-menu {
    min-width: 180px;
    max-width: calc(100vw - 40px);
  }
  
  header {
    padding-top: clamp(30px, 8vw, 60px);
  }
  
  .header-content {
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .site-logo {
    width: clamp(100px, 30vw, 150px);
  }
  
  header h1 {
    font-size: clamp(1.5em, 6vw, 2em);
  }
  
  header p {
    font-size: clamp(0.85em, 3vw, 1em);
  }
}

/* ============================================
   Header Content - Transforms into navbar
   ============================================ */
.header-content {
  position: relative;
  /* keep header content aligned with the page container */
  padding: clamp(15px, 2.5vw, 20px) clamp(12px, 2vw, 16px);
  margin: 0 auto;
  background: linear-gradient(180deg, 
    rgba(63,224,249,0.03) 0%,
    rgba(17,17,17,0.5) 50%,
    rgba(63,224,249,0.03) 100%
  );
  border: clamp(2px, 0.3vw, 3px) solid #43dfeb;
  border-radius: clamp(12px, 1.5vw, 16px);
  backdrop-filter: blur(5px);
  box-shadow: 0 0 24px rgba(146,151,155,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1.5vw, 12px);
  text-align: center;
  /* No transition - instant change to prevent odd feeling */
  transition: none;
  max-width: 100%; /* Changed from 1000px to prevent overflow */
  width: calc(100% - clamp(20px, 5vw, 40px));
  box-sizing: border-box;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  .header-content {
    width: calc(100% - 24px);
    padding: 15px 12px;
  }
}

header h1 { 
  font-size: clamp(1.8em, 5vw, 2.5em); 
  color: #2bd3ee; 
  margin: 0;
  opacity: 1;
  transform: scale(1);
  max-height: 200px;
  overflow: hidden;
}

header p { 
  font-size: clamp(0.95em, 2.5vw, 1.1em); 
  margin: 0;
  opacity: 1;
  max-height: 100px;
  overflow: hidden;
  padding: 0 clamp(10px, 2vw, 20px);
}

/* ============================================
   Branding & Logo
   ============================================ */
.brand { 
  display: block; 
  margin: 0 auto; 
  text-align: center;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Brand always in hero mode */

.site-logo { 
  width: clamp(120px, 25vw, 200px);  /* Adjust this value to make the logo bigger or smaller */
  height: auto;
  max-width: 100%;
  display: block;
  margin: 0 auto;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Site logo always in hero size */

/* Simple DD logo sizing (no morph animation) */
.dd-logo {
  width: 84px;
  height: auto;
  display: block;
  margin: 0 auto;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  max-height: 100px;
  overflow: hidden;
}

/* DD logo always visible */

/* ============================================
   Hero Button
   ============================================ */
.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: clamp(8px, 1.4vw, 10px) clamp(16px, 2.8vw, 20px);
  background: linear-gradient(135deg, rgba(63, 224, 249, 0.9) 0%, rgba(67, 223, 235, 0.9) 100%);
  color: #ffffff;
  border: 2px solid #000000;
  border-radius: clamp(12px, 2vw, 16px);
  font-size: clamp(0.85em, 1.8vw, 1em);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  text-align: center;
  position: relative;
  z-index: 10;
  min-height: 36px;
  margin: 0 auto;
  opacity: 1;
  max-height: 100px;
  overflow: hidden;
  text-decoration: none;
}

.hero-button-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(1.2) drop-shadow(0 0 2px rgba(255, 255, 255, 0.5));
  transition: all 0.3s ease;
}

.hero-button:hover .hero-button-logo {
  filter: brightness(1.4) drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
  transform: scale(1.1);
}

/* Hero button always visible */

.hero-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, rgba(63, 224, 249, 1) 0%, rgba(67, 223, 235, 1) 100%);
}

/* Fractions Live button */
#fractions-live-btn {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  max-height: 100px;
  overflow: hidden;
}

/* Fractions button always visible */

/* ============================================
   CTA Pack - Join the Pack button in hero
   ============================================ */
.header-content .cta-pack {
  margin-top: clamp(8px, 1.5vw, 12px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  max-height: 200px;
  overflow: hidden;
}

/* CTA pack always visible */

.header-content .cta-pack .join-pack-wrapper {
  display: inline-flex;
  align-items: center;
  gap: clamp(6px, 1vw, 8px);
}

.header-content .cta-pack .join-pack-btn {
  display: inline-flex;
  align-items: center;
  padding: clamp(8px, 1.4vw, 10px) clamp(16px, 2.8vw, 20px);
  background: linear-gradient(135deg, rgba(63, 224, 249, 0.9) 0%, rgba(67, 223, 235, 0.9) 100%);
  color: #ffffff;
  border: 2px solid #000000;
  border-radius: clamp(12px, 2vw, 16px);
  font-size: clamp(0.85em, 1.8vw, 1em);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  min-height: 36px;
}

.header-content .cta-pack .join-pack-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, rgba(63, 224, 249, 1) 0%, rgba(67, 223, 235, 1) 100%);
}

.header-content .cta-pack .cta-logo {
  width: clamp(100px, 20vw, 140px);
  height: clamp(100px, 20vw, 140px);
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(1.3) drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
  transition: all 0.3s ease;
}

.header-content .cta-pack .join-pack-wrapper:hover .cta-logo {
  filter: brightness(1.5) drop-shadow(0 0 6px rgba(255, 255, 255, 0.9));
  transform: scale(1.1);
}

/* Electric border trim - matches header-content size */
.header-content .electric-border-trim {
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  pointer-events: none;
  border-radius: 16px;
  border: 3px solid #38dbef;
  filter: url(#turbulent-displace);
  z-index: 2;
  transform: scale(1.01);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  box-sizing: border-box;
}

/* Navbar menu - always visible in main navbar */
.navbar-menu {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 20px);
  flex-wrap: nowrap;
  opacity: 1;
  transform: translateY(0);
  transition: none;
  visibility: visible;
  pointer-events: auto;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}


.navbar-menu a {
  color: #9ca3af; /* gray-300 equivalent */
  text-decoration: none;
  padding: clamp(6px, 1vw, 8px) clamp(10px, 1.5vw, 16px);
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-size: clamp(12px, 1.5vw, 14px);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.navbar-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, #06b6d4, #3fe0f9); /* cyan to accent */
  transition: width 0.3s ease;
  transform: translateX(-50%);
}

.navbar-menu a:hover {
  color: #06b6d4; /* cyan-400 */
  text-shadow: 0 0 8px rgba(6, 182, 212, 0.3);
  background: transparent;
}

.navbar-menu a:hover::after,
.navbar-menu a.active::after {
  width: 80%;
}

.navbar-menu a.active {
  color: #06b6d4; /* cyan-400 */
  text-shadow: 0 0 8px rgba(6, 182, 212, 0.3);
}

/* ============================================
   Navbar Buttons - Join the Pack & Follow on X
   ============================================ */
/* Join the Pack button in navbar */
/* Join Pack Wrapper - Logo NEXT TO button */
.join-pack-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.navbar-menu .join-pack-btn,
.nav-menu .join-pack-btn {
  display: inline-flex;
  align-items: center;
  padding: clamp(4.8px, 0.8vw, 6.4px) clamp(9.6px, 1.6vw, 12.8px);
  background: linear-gradient(135deg, rgba(63, 224, 249, 0.9) 0%, rgba(67, 223, 235, 0.9) 100%);
  color: #ffffff;
  border: 2px solid #000000;
  border-radius: clamp(8px, 1.2vw, 11.2px);
  font-size: clamp(0.6em, 1.12vw, 0.68em);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  white-space: nowrap;
  min-height: 26px;
}

.navbar-menu .join-pack-btn:hover,
.nav-menu .join-pack-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, rgba(63, 224, 249, 1) 0%, rgba(67, 223, 235, 1) 100%);
  text-shadow: none;
}

.navbar-menu .join-pack-btn::after,
.nav-menu .join-pack-btn::after {
  display: none;
}

/* Follow on X button in navbar */
.navbar-menu .follow-x-btn,
.nav-menu .follow-x-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: clamp(4.8px, 0.8vw, 6.4px) clamp(9.6px, 1.6vw, 12.8px);
  background: linear-gradient(135deg, rgba(63, 224, 249, 0.9) 0%, rgba(67, 223, 235, 0.9) 100%);
  color: #ffffff;
  border: 2px solid #000000;
  border-radius: clamp(8px, 1.2vw, 11.2px);
  font-size: clamp(0.6em, 1.12vw, 0.68em);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  white-space: nowrap;
  min-height: 26px;
}

.navbar-menu .follow-x-btn:hover,
.nav-menu .follow-x-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, rgba(63, 224, 249, 1) 0%, rgba(67, 223, 235, 1) 100%);
  text-shadow: none;
}

.navbar-menu .follow-x-btn::after,
.nav-menu .follow-x-btn::after {
  display: none;
}

/* X logo icon */
.x-logo-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* CTA logo - OUTSIDE the button, NEXT TO it */
.navbar-menu .cta-logo,
.nav-menu .cta-logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(1.3) drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
  transition: all 0.3s ease;
}

.join-pack-wrapper:hover .cta-logo {
  filter: brightness(1.5) drop-shadow(0 0 6px rgba(255, 255, 255, 0.9));
  transform: scale(1.1);
}

/* Override nav-menu default styles for buttons */
.nav-menu .join-pack-btn,
.nav-menu .follow-x-btn {
  border-bottom: 2px solid #000000;
  padding: clamp(6px, 0.9vw, 8px) clamp(10px, 1.6vw, 14px);
  margin: 8px 12px;
  width: calc(100% - 24px);
  display: flex;
  justify-content: center;
  font-size: clamp(0.7em, 1.2vw, 0.8em);
  min-height: 28px;
}

.nav-menu .join-pack-btn:hover,
.nav-menu .follow-x-btn:hover {
  padding-left: clamp(10px, 1.6vw, 14px);
  margin: 8px 12px;
}

.nav-menu .x-logo-icon {
  width: 12px;
  height: 12px;
}

.nav-menu .join-pack-btn::before,
.nav-menu .follow-x-btn::before {
  display: none;
}

@keyframes flash-glow-strong {
  0% {
    filter: brightness(1.1) drop-shadow(0 0 16px #ffe154) drop-shadow(0 0 8px #3fe0f9);
  }
  100% {
    filter: brightness(1.35) drop-shadow(0 0 32px #ffe154) drop-shadow(0 0 16px #3fe0f9);
  }
}

