/* ==========================================================================
   FLOATING GLASSMORPHISM NAVBAR - NINOH WILD SAFARIS
   Modern African Luxury Safari Experience
   ========================================================================== */

:root {
  --nav-gold: #c9a66b;
  --nav-gold-light: #dfb87a;
  --nav-gold-glow: rgba(201, 166, 107, 0.35);
  --nav-glass-bg: rgba(6, 21, 13, 0.72);
  --nav-glass-bg-scrolled: rgba(6, 21, 13, 0.88);
  --nav-glass-border: rgba(201, 166, 107, 0.28);
  --nav-glass-border-scrolled: rgba(201, 166, 107, 0.45);
  --nav-text: #f4f7f5;
  --nav-text-muted: #b9cfc3;
  --nav-dark: #06150d;
}

/* ==========================================================================
   1. FIXED FLOATING WRAPPER
   ========================================================================== */

.floating-header-wrapper {
  position: fixed;
  top: 20px;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1050;
  pointer-events: none; /* Let clicks outside the navbar pass through */
  padding: 0 16px;
  transition: top 0.35s cubic-bezier(0.16, 1, 0.3, 1), padding 0.35s ease;
}

/* ==========================================================================
   2. PILL-SHAPED GLASS NAVBAR
   ========================================================================== */

.hero-navbar.floating-glass-navbar {
  pointer-events: auto;
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  
  /* Dimensions per user specifications */
  width: 90vw !important;
  max-width: 1400px !important;
  height: 72px !important;
  border-radius: 9999px !important;
  padding: 0 28px !important;
  margin: 0 auto !important;
  
  /* Flexbox Layout */
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px;
  box-sizing: border-box !important;
  
  /* Glassmorphism Effect */
  background: var(--nav-glass-bg) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid var(--nav-glass-border) !important;
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.52),
              0 0 0 1px rgba(255, 255, 255, 0.06) inset,
              0 1px 2px rgba(255, 255, 255, 0.12) inset !important;
  
  transition: background 0.35s ease,
              border-color 0.35s ease,
              box-shadow 0.35s ease,
              height 0.35s ease,
              transform 0.35s ease !important;
}

/* Scrolled Active State: slightly more compact and opaque for legibility over content */
.floating-header-wrapper.scrolled .floating-glass-navbar,
.floating-glass-navbar.scrolled {
  background: var(--nav-glass-bg-scrolled) !important;
  border-color: var(--nav-glass-border-scrolled) !important;
  box-shadow: 0 20px 48px -6px rgba(0, 0, 0, 0.68),
              0 0 24px rgba(201, 166, 107, 0.16),
              0 0 0 1px rgba(255, 255, 255, 0.08) inset !important;
  height: 68px !important;
}

/* ==========================================================================
   3. LEFT: BRAND LOGO
   ========================================================================== */

.nav-brand-container {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 100%;
}

.nav-brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  height: 100%;
}

.nav-brand-logo {
  height: 46px;
  width: auto;
  max-width: 175px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.55));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.3s ease;
}

.nav-brand-link:hover .nav-brand-logo,
.nav-brand-link:focus-visible .nav-brand-logo {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 14px rgba(201, 166, 107, 0.45));
}

/* ==========================================================================
   4. CENTER: DESKTOP NAVIGATION LINKS
   ========================================================================== */

.nav-links-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.3vw, 22px);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-grow: 1;
  min-width: 0;
}

.nav-item {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-link-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--nav-text);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 9999px;
  border: 1px solid transparent;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-link-item:hover,
.nav-link-item:focus-visible {
  color: #ffffff;
  background: rgba(201, 166, 107, 0.16);
  border-color: rgba(201, 166, 107, 0.3);
  box-shadow: 0 0 14px rgba(201, 166, 107, 0.22);
  transform: translateY(-1px);
}

/* Active Navigation Page Indicator */
.nav-link-item.active {
  color: var(--nav-gold-light);
  background: rgba(201, 166, 107, 0.18);
  border-color: rgba(201, 166, 107, 0.38);
  font-weight: 600;
}

.nav-link-item.active::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 2px;
  background: var(--nav-gold);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--nav-gold);
}

/* ==========================================================================
   5. RIGHT: ACTIONS & MOBILE TOGGLE
   ========================================================================== */

.nav-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  height: 100%;
  margin-left: auto;
}

/* Primary "Book Your Safari" Action Button */
.nav-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #c9a66b 0%, #dfb87a 50%, #b89155 100%);
  color: #06150d !important;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-decoration: none;
  padding: 10px 22px;
  height: 44px;
  border-radius: 9999px;
  box-shadow: 0 4px 18px rgba(201, 166, 107, 0.32);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  box-sizing: border-box;
  flex-shrink: 0;
}

/* Responsive CTA Text Spans */
.nav-cta-text-full {
  display: inline !important;
}

.nav-cta-text-short {
  display: none !important;
}

.nav-cta-btn:hover,
.nav-cta-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(201, 166, 107, 0.52);
  background: linear-gradient(135deg, #dfb87a 0%, #edd2a4 50%, #c9a66b 100%);
  color: #06150d !important;
}

.nav-cta-btn:active {
  transform: translateY(0);
}

.nav-cta-arrow {
  font-size: 15px;
  transition: transform 0.25s ease;
  display: inline-flex;
  align-items: center;
}

.nav-cta-btn:hover .nav-cta-arrow {
  transform: translateX(3px) translateY(-1px);
}

/* Mobile Hamburger Toggle Button (Hidden on Desktop) */
.nav-mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(201, 166, 107, 0.38);
  cursor: pointer;
  padding: 0;
  color: #ffffff;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  flex-shrink: 0 !important;
  margin: 0 !important;
  box-sizing: border-box;
}

.nav-mobile-toggle:hover,
.nav-mobile-toggle:focus-visible {
  background: rgba(201, 166, 107, 0.25);
  border-color: var(--nav-gold);
  box-shadow: 0 0 14px rgba(201, 166, 107, 0.4);
}

.nav-toggle-icon {
  width: 20px;
  height: 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #f4f7f5;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
}

/* Hamburger to X morphing animation */
.nav-mobile-toggle.active .bar-1 {
  transform: translateY(6px) rotate(45deg);
  background-color: var(--nav-gold-light);
}

.nav-mobile-toggle.active .bar-2 {
  opacity: 0;
  transform: scaleX(0);
}

.nav-mobile-toggle.active .bar-3 {
  transform: translateY(-6px) rotate(-45deg);
  background-color: var(--nav-gold-light);
}

/* ==========================================================================
   6. MOBILE GLASSMORPHISM DROPDOWN MENU
   ========================================================================== */

.mobile-glass-dropdown {
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px) scale(0.98);
  width: 90vw;
  max-width: 480px;
  margin-top: 12px;
  border-radius: 28px;
  background: rgba(6, 21, 13, 0.94);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid rgba(201, 166, 107, 0.3);
  box-shadow: 0 24px 60px -10px rgba(0, 0, 0, 0.8),
              0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  overscroll-behavior: contain;
  max-height: calc(100vh - 90px);
  max-height: calc(100dvh - 90px);
}

.mobile-glass-dropdown.show {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.mobile-glass-content {
  padding: 18px 20px 24px 20px;
  overflow-y: auto;
  max-height: calc(100vh - 100px);
  max-height: calc(100dvh - 100px);
  -webkit-overflow-scrolling: touch;
}

.mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 14px;
  color: var(--nav-text);
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus-visible,
.mobile-nav-link.active {
  background: rgba(201, 166, 107, 0.16);
  color: var(--nav-gold-light);
  border-color: rgba(201, 166, 107, 0.35);
  transform: translateX(4px);
}

.mobile-link-icon {
  width: 28px;
  color: var(--nav-gold);
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.mobile-link-text {
  flex-grow: 1;
}

.mobile-chevron {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  transition: transform 0.25s ease, color 0.25s ease;
}

.mobile-nav-link:hover .mobile-chevron {
  color: var(--nav-gold-light);
  transform: translateX(3px);
}

.mobile-dropdown-footer {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(201, 166, 107, 0.2);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mobile-dropdown-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #c9a66b, #dfb87a);
  color: #06150d !important;
  font-weight: 600;
  font-size: 14px;
  padding: 13px 20px;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(201, 166, 107, 0.35);
  transition: all 0.3s ease;
}

.mobile-dropdown-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201, 166, 107, 0.5);
  color: #06150d !important;
}

.mobile-dropdown-contacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-contact-item {
  color: var(--nav-text-muted);
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.mobile-contact-item i {
  color: var(--nav-gold);
  font-size: 14px;
}

.mobile-contact-item:hover {
  color: var(--nav-gold-light);
  background: rgba(201, 166, 107, 0.08);
}

/* Backdrop for Mobile Dropdown */
.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1040;
}

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

/* ==========================================================================
   7. RESPONSIVE MEDIA QUERIES
   ========================================================================== */

/* Large Desktop (> 1400px) */
@media (min-width: 1400px) {
  .hero-navbar.floating-glass-navbar {
    width: 90vw !important;
    max-width: 1400px !important;
  }
}

/* Laptop / Desktop Intermediate (1161px - 1380px) */
@media (max-width: 1380px) and (min-width: 1161px) {
  .hero-navbar.floating-glass-navbar {
    width: 92vw !important;
    padding: 0 18px !important;
    gap: 12px !important;
  }
  
  .nav-brand-logo {
    height: 40px !important;
    max-width: 140px !important;
  }

  .nav-links-center {
    gap: clamp(6px, 1.1vw, 12px) !important;
  }
  
  .nav-link-item {
    font-size: 13px !important;
    padding: 6px 10px !important;
  }
  
  .nav-cta-btn {
    padding: 8px 14px !important;
    font-size: 12px !important;
    height: 38px !important;
    gap: 4px !important;
  }
}

/* Tablet & Compact Screens (<= 1160px) */
@media (max-width: 1160px) {
  .hero-navbar.floating-glass-navbar {
    width: 92vw !important;
    height: 64px !important;
    padding: 0 20px 0 22px !important;
  }
  
  .nav-links-center {
    display: none !important;
  }
  
  .nav-mobile-toggle {
    display: flex !important;
  }
  
  .mobile-glass-dropdown {
    width: 92vw !important;
  }
  
  .nav-brand-logo {
    height: 40px;
  }
}

/* Tablet Portrait & Mobile Landscape (<= 768px) */
@media (max-width: 768px) {
  .floating-header-wrapper {
    top: 14px;
    padding: 0 12px;
  }

  .hero-navbar.floating-glass-navbar {
    width: calc(100vw - 24px) !important;
    max-width: 95vw !important;
    height: 60px !important;
    padding: 0 16px 0 18px !important;
    gap: 10px !important;
  }

  /* Concise "Book" text on mobile to avoid overcrowding and navbar overflow */
  .nav-cta-text-full {
    display: none !important;
  }
  .nav-cta-text-short {
    display: inline !important;
  }

  .nav-cta-btn {
    padding: 7px 14px !important;
    height: 38px !important;
    font-size: 13px !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
  }

  .nav-brand-container {
    max-width: 145px !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
  }

  .nav-brand-logo {
    height: 36px !important;
    max-width: 140px !important;
    object-fit: contain !important;
  }

  .nav-actions-right {
    gap: 8px !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
  }

  .nav-mobile-toggle {
    display: flex !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
  }
}

/* Mobile Screens (<= 576px) */
@media (max-width: 576px) {
  .floating-header-wrapper {
    top: 10px;
    padding: 0 8px;
  }
  
  .hero-navbar.floating-glass-navbar {
    width: calc(100vw - 16px) !important;
    max-width: 96vw !important;
    height: 56px !important;
    padding: 0 14px 0 16px !important;
    gap: 8px !important;
    border-radius: 9999px !important;
  }
  
  .nav-brand-container {
    max-width: 130px !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
  }

  .nav-brand-logo {
    height: 32px !important;
    max-width: 125px !important;
    object-fit: contain !important;
  }
  
  .nav-cta-text-full {
    display: none !important;
  }

  .nav-cta-text-short {
    display: inline !important;
  }

  .nav-cta-btn {
    padding: 6px 12px !important;
    height: 35px !important;
    font-size: 12px !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 10px rgba(201, 166, 107, 0.28) !important;
  }

  .nav-cta-arrow {
    font-size: 13px !important;
  }

  .nav-actions-right {
    gap: 8px !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
  }

  .nav-mobile-toggle {
    display: flex !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    border: 1px solid rgba(201, 166, 107, 0.45) !important;
    background: rgba(255, 255, 255, 0.12) !important;
  }
  
  .nav-toggle-icon {
    width: 16px !important;
    height: 12px !important;
  }

  .nav-toggle-bar {
    height: 2px !important;
  }
  
  .mobile-glass-dropdown {
    width: calc(100vw - 16px) !important;
    max-width: 96vw !important;
    border-radius: 22px;
    margin-top: 8px;
  }
  
  .mobile-glass-content {
    padding: 16px 16px 20px 16px;
  }
  
  .mobile-nav-link {
    padding: 10px 14px;
    font-size: 14px;
  }
}

/* Small Mobile (<= 380px) */
@media (max-width: 380px) {
  .floating-header-wrapper {
    top: 8px;
    padding: 0 6px;
  }

  .hero-navbar.floating-glass-navbar {
    width: calc(100vw - 12px) !important;
    max-width: 98vw !important;
    height: 52px !important;
    padding: 0 12px 0 14px !important;
    gap: 6px !important;
  }
  
  .nav-brand-container {
    max-width: 105px !important;
  }

  .nav-brand-logo {
    height: 28px !important;
    max-width: 100px !important;
  }
  
  .nav-cta-btn {
    padding: 5px 9px !important;
    height: 32px !important;
    font-size: 11px !important;
    gap: 3px !important;
  }
  
  .nav-cta-arrow {
    display: none !important;
  }

  .nav-actions-right {
    gap: 6px !important;
  }

  .nav-mobile-toggle {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
  }

  .nav-toggle-icon {
    width: 15px !important;
    height: 11px !important;
  }
}

/* Hero section comfortable clearance so fixed navbar never occludes titles */
.about-hero,
.tours-hero,
.contact-hero {
  min-height: 480px;
}

@media (max-width: 768px) {
  .about-hero,
  .tours-hero,
  .contact-hero {
    min-height: 400px;
    padding-top: 90px;
  }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .floating-glass-navbar,
  .nav-brand-logo,
  .nav-link-item,
  .nav-cta-btn,
  .nav-mobile-toggle,
  .nav-toggle-bar,
  .mobile-glass-dropdown,
  .mobile-menu-backdrop {
    transition: none !important;
    animation: none !important;
  }
}
