/* ============================================
   CONSOLIDATED HEADER & NAVIGATION STYLES
   Single source of truth - no cascade conflicts
   ============================================ */

@import url("./footer-consolidated.css");

/* Root Variables */
:root {
  --primary-color: #46bbe5;
  --text-primary: #1f2937;
  --bg-primary: #fff;
  --header-height: 70px;
  --transition-speed: 0.3s ease;
}

/* Reset & Defaults */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  margin: 0;
}

/* Header Container */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  height: var(--header-height);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

header .container {
  height: 100%;
  padding: 0 1rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Navbar Layout */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  gap: 2rem;
}

/* Logo */
.logo-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
}

.logo-image {
  width: 40px;
  height: 40px;
  display: block;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Navigation Links */
.nav-links {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  max-width: 600px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all var(--transition-speed);
  white-space: nowrap;
}

.nav-link:hover {
  background: rgba(70, 187, 229, 0.1);
  color: var(--primary-color);
}

.nav-link i {
  font-size: 1.1rem;
}

/* Dropdown Menus */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  flex-direction: column;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  z-index: 1001;
  margin-top: 0.5rem;
}

.nav-item:hover .dropdown {
  display: flex;
}

.dropdown-item {
  padding: 0.75rem 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-speed);
  border-left: 3px solid transparent;
}

.dropdown-item:hover {
  background: rgba(70, 187, 229, 0.1);
  color: var(--primary-color);
  border-left-color: var(--primary-color);
}

.dropdown-item i {
  font-size: 0.95rem;
}

/* Controls Section */
.controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.control-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--primary-color);
  color: white;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-speed);
  text-decoration: none;
  gap: 0.4rem;
}

.control-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(70, 187, 229, 0.3);
}

.control-btn.theme-toggle {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.control-btn.theme-toggle:hover {
  background: rgba(70, 187, 229, 0.1);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Mobile Toggle Button */
.mobile-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: var(--primary-color);
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet & Desktop (640px+) */
@media (min-width: 640px) {
  .nav-links {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    max-height: none !important;
    transform: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  .mobile-toggle {
    display: none !important;
  }

  .nav-item {
    position: relative;
  }

  .dropdown {
    display: none;
  }

  .nav-item:hover .dropdown {
    display: flex;
  }
}

/* Mobile (< 640px) */
@media (max-width: 639px) {
  .navbar {
    gap: 1rem;
  }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    gap: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-speed);
  }

  .nav-links.active {
    max-height: 500px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-item {
    width: 100%;
    flex-direction: column;
  }

  .nav-link {
    width: 100%;
    padding: 1rem;
    border-radius: 0;
  }

  .dropdown {
    position: static;
    display: none;
    background: rgba(70, 187, 229, 0.05);
    border: none;
    box-shadow: none;
    min-width: auto;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
  }

  .nav-item.mobile-open .dropdown {
    display: flex;
  }

  .dropdown-item {
    padding: 0.75rem 2rem;
  }

  .mobile-toggle {
    display: flex !important;
  }

  .logo-text {
    display: none;
  }

  .logo-image {
    width: 32px;
    height: 32px;
  }

  .nav-link {
    font-size: 1rem;
  }

  .controls {
    gap: 0.5rem;
  }

  .control-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
}

/* Extra Small Mobile (< 480px) */
@media (max-width: 479px) {
  .logo-image {
    width: 28px;
    height: 28px;
  }

  .nav-link {
    padding: 0.75rem;
    font-size: 0.85rem;
  }

  .control-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.7rem;
  }
}

/* Large Desktop (1025px+) */
@media (min-width: 1025px) {
  .navbar {
    gap: 3rem;
  }

  .nav-links {
    gap: 0.75rem;
  }

  .nav-link {
    padding: 0.7rem 1.2rem;
  }

  .control-btn {
    padding: 0.7rem 1.5rem;
  }
}

/* ============================================
   BODY PADDING (Account for fixed header)
   ============================================ */

body {
  padding-top: var(--header-height);
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */

body.dark-mode {
  --text-primary: #f3f4f6;
  --text-secondary: #cbd5e1;
  --bg-primary: #070b14;
  --bg-secondary: #0b1220;
  --bg-tertiary: #111827;
  --border-color: #1f2937;
  background-color: #070b14 !important;
  color: #f3f4f6;
}

html.dark-mode body {
  background: #070b14 !important;
  color: #f3f4f6 !important;
}

body.dark-mode header {
  background: rgba(7, 11, 20, 0.97);
  border-bottom-color: rgba(70, 187, 229, 0.22);
}

body.dark-mode .nav-link:hover {
  background: rgba(70, 187, 229, 0.2);
}

body.dark-mode .dropdown {
  background: #2a2a2a;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

body.dark-mode .dropdown-item:hover {
  background: rgba(70, 187, 229, 0.2);
}

body.dark-mode .control-btn {
  border-color: rgba(255, 255, 255, 0.2);
}

/* Print Styles */
@media print {
  header {
    position: static;
    background: transparent;
    border: none;
  }

  .mobile-toggle {
    display: none;
  }

  body {
    padding-top: 0;
  }
}
