/*
 * ====================================================================
 * GPURATED.COM — SLEEK, COMPACT, NON-MERGED HEADER SYSTEM (LIGHT MODE)
 * Standalone · Mobile & iOS Safari Rock-Solid · High-Performance
 * Zero Overlap Guaranteed Across All Screen Sizes
 * ====================================================================
 */

/* ===== 1. SITE HEADER CONTAINER ===== */
.site-header {
  position: relative;
  width: 100%;
  z-index: 1040;
  background: #ffffff;
}

/* ===== 2. TOPBAR (COMPACT 32px) ===== */
.topbar {
  background: #0b0f19;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 1041;
}

.topbar .container-xxl,
.topbar .container-fluid {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cbd5e1;
}

.topbar-pulse {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.topbar a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.15s ease;
}

.topbar a:hover {
  color: #10b981;
}

.topbar-social {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8 !important;
  font-size: 13px;
  transition: all 0.2s ease;
}

.topbar-social:hover {
  background: #10b981;
  color: #fff !important;
  transform: translateY(-1px);
}

.topbar-sep {
  color: rgba(255, 255, 255, 0.18);
  margin: 0 6px;
}

.topbar-signup {
  padding: 3px 10px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 6px;
  font-weight: 700;
  color: #fff !important;
  font-size: 0.75rem;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
}

.topbar-signup:hover {
  background: #059669;
  transform: translateY(-1px);
}

/* ===== 3. MAIN NAVBAR (STANDALONE, NEVER MERGED) ===== */
.main-nav {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
  padding: 0;
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1035 !important;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.main-nav.scrolled {
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08) !important;
  border-bottom-color: #cbd5e1 !important;
}

.nav-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  box-sizing: border-box;
}

/* Brand Logo */
.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 18px;
}

.navbar-brand .brand-logo-img {
  height: 32px !important;
  max-width: 195px !important;
  width: auto !important;
  object-fit: contain !important;
  image-rendering: -webkit-optimize-contrast;
  display: block;
  transition: transform 0.2s ease;
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.05));
}

.navbar-brand:hover .brand-logo-img {
  transform: scale(1.02);
}

/* Desktop Navigation Menu (Zero Overlap) */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}

.nav-menu .nav-item {
  position: relative;
  flex-shrink: 0;
}

.nav-menu .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  color: #334155;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.15s ease;
  border: 0;
  background: transparent;
  cursor: pointer;
  white-space: nowrap !important;
  flex-shrink: 0;
  line-height: 1.4;
}

.nav-menu .nav-link:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.nav-menu .nav-link.active {
  background: #ecfdf5;
  color: #059669;
  font-weight: 700;
}

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

.nav-menu .nav-link .chev {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
  margin-left: 2px;
}

.nav-menu .nav-item:hover .chev {
  transform: rotate(180deg);
}

/* Nav Badges */
.nav-badge-gpu {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  line-height: 1.2;
}

.nav-badge-hot {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
}

/* Dropdown Mega Menu */
.nav-menu .mega-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.02);
  padding: 14px;
  width: 520px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
  pointer-events: none;
  z-index: 1050;
}

/* Invisible Hover Bridge - Eliminates the dead zone gap so menu never disappears */
.nav-menu .mega-menu::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 20px;
  background: transparent;
  display: block;
}

.nav-menu .nav-item:hover .mega-menu,
.nav-menu .nav-item.mega-active .mega-menu,
.nav-menu .nav-item.mega-open .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-menu .nav-item:hover .chev,
.nav-menu .nav-item.mega-active .chev,
.nav-menu .nav-item.mega-open .chev {
  transform: rotate(180deg);
}

.nav-menu .nav-item:hover > .nav-link,
.nav-menu .nav-item.mega-active > .nav-link,
.nav-menu .nav-item.mega-open > .nav-link {
  background: #f1f5f9;
  color: #0f172a;
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.mega-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: #0f172a;
  transition: all 0.15s ease;
}

.mega-item:hover {
  background: #f8fafc;
  transform: translateX(2px);
}

.mega-item .mega-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
}

.mega-item strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.mega-item small {
  display: block;
  font-size: 0.76rem;
  color: #64748b;
  margin-top: 1px;
}

/* ===== 4. RIGHT ACTIONS ===== */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.btn-nav-search-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  text-decoration: none;
  font-size: 0.92rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-nav-search-icon:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

.btn-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: 9px;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.22);
  transition: all 0.2s ease;
  white-space: nowrap !important;
  flex-shrink: 0;
}

.btn-nav-cta:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(16, 185, 129, 0.32);
}

.nav-mobile-toggle {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  color: #0f172a;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  -webkit-tap-highlight-color: transparent;
}

.nav-mobile-toggle:hover,
.nav-mobile-toggle:active {
  background: #f1f5f9;
  border-color: #059669;
  color: #059669;
}

/* Responsive Desktop vs Mobile Breakpoint */
@media (max-width: 1023px) {
  .nav-menu {
    display: none !important;
  }
  /* Crucial: Hide CTA on mobile topbar so hamburger toggle never gets pushed off screen */
  .btn-nav-cta {
    display: none !important;
  }
  .nav-mobile-toggle {
    display: inline-flex !important;
  }
  .nav-container {
    padding: 0 16px;
    height: 60px;
  }
  .navbar-brand .brand-logo-img {
    height: 30px !important;
    max-width: 165px !important;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 12px;
    height: 56px;
  }
  .navbar-brand {
    margin-right: 8px;
  }
  .navbar-brand .brand-logo-img {
    height: 28px !important;
    max-width: 140px !important;
  }
  .btn-nav-search-icon {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
  }
  .nav-mobile-toggle {
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .nav-menu {
    display: flex !important;
  }
  .nav-mobile-toggle {
    display: none !important;
  }
}

@media (min-width: 1024px) and (max-width: 1220px) {
  .nav-menu {
    gap: 1px !important;
  }
  .nav-menu .nav-link {
    padding: 6px 7px !important;
    font-size: 0.81rem !important;
    gap: 4px !important;
  }
}

/* ===== 5. MOBILE DRAWER (IOS SAFARI ROCK-SOLID) ===== */
.mobile-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100%;
  height: 100dvh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-backdrop.open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 330px;
  max-width: 86vw;
  height: 100%;
  height: 100dvh;
  background: #ffffff;
  z-index: 99999;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 18px 16px 36px;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 36px rgba(15, 23, 42, 0.2);
  transform: translateX(105%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s;
  visibility: hidden;
  pointer-events: none;
  border-left: 1px solid #e2e8f0;
}

.mobile-menu.open {
  transform: translateX(0) !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

body.mobile-nav-locked {
  overflow: hidden !important;
  touch-action: none !important;
  -webkit-overflow-scrolling: auto !important;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
}

.mobile-menu-close {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}

.mobile-menu-close:hover,
.mobile-menu-close:active {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

/* Primary Find Best Host CTA in Drawer */
.mobile-menu-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.28);
  transition: all 0.2s ease;
  margin-bottom: 12px;
}

.mobile-menu-cta:hover,
.mobile-menu-cta:active {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
}

.mobile-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin: 16px 0 8px;
  padding-left: 8px;
}

.mobile-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #1e293b;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.mobile-link:hover, .mobile-link.active {
  background: #f1f5f9;
  color: #059669;
}

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