/* ===================================================
   SABR ENTERPRISES - GLOBAL NAVBAR STYLES
   Premium, Glassmorphic, Responsive Navigation
   =================================================== */

/* Navbar Container */
.global-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 12, 41, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slideDown 0.6s ease-out;
}

body.light-theme .global-navbar {
  background: rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Navbar scrolled state */
.global-navbar.scrolled {
  background: rgba(15, 12, 41, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  padding: 0.5rem 0;
}

body.light-theme .global-navbar.scrolled {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Navbar Container */
.navbar-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  transition: height 0.3s ease;
}

.global-navbar.scrolled .navbar-content {
  height: 70px;
}

/* Logo */
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  transition: all 0.3s ease;
  position: relative;
  z-index: 10;
}

.logo-icon {
  font-size: 1.875rem;
  filter: drop-shadow(0 0 12px rgba(106, 17, 203, 0.5));
  transition: all 0.3s ease;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    filter: drop-shadow(0 0 12px rgba(106, 17, 203, 0.5));
  }

  50% {
    filter: drop-shadow(0 0 20px rgba(106, 17, 203, 0.8));
  }
}

.navbar-logo:hover .logo-icon {
  transform: scale(1.1) rotate(-10deg);
  filter: drop-shadow(0 0 20px rgba(106, 17, 203, 0.8));
}

.logo-highlight {
  background: linear-gradient(135deg, #6A11CB, #00C9FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-logo:hover {
  transform: translateY(-2px);
}

/* Navigation Menu */
.navbar-menu {
  display: flex;
  align-items: center;
  gap: 3rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  position: relative;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.5rem 0;
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #6A11CB, #00C9FF);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  transform: translateY(-2px);
}

.nav-link:hover::before,
.nav-link.active::before {
  width: 100%;
}

.nav-link.active {
  color: #6A11CB;
  font-weight: 600;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 28px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
  position: relative;
}

.hamburger-line {
  width: 100%;
  height: 2.5px;
  background: var(--text);
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.mobile-menu-toggle:hover .hamburger-line {
  background: #6A11CB;
}

/* Hamburger Animation */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Global Theme Toggle (Bottom Right) */
.global-theme-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(106, 17, 203, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(106, 17, 203, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.5rem;
  z-index: 999;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 32px rgba(106, 17, 203, 0.3);
  animation: float 3s ease-in-out infinite;
}

body.light-theme .global-theme-toggle {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(106, 17, 203, 0.4);
  box-shadow: 0 8px 32px rgba(106, 17, 203, 0.2);
}

.global-theme-toggle:hover {
  transform: scale(1.15) rotate(15deg);
  box-shadow: 0 12px 48px rgba(106, 17, 203, 0.5);
  border-color: #6A11CB;
  background: rgba(106, 17, 203, 0.25);
}

body.light-theme .global-theme-toggle:hover {
  background: rgba(106, 17, 203, 0.1);
}

.theme-icon {
  transition: transform 0.4s ease;
}

.global-theme-toggle:hover .theme-icon {
  transform: rotate(180deg);
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* Slide down animation */
@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar-container {
    padding: 0 1.5rem;
  }

  .navbar-content {
    height: 70px;
  }

  .navbar-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--glass-bg);
    /* Use global glass */
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 2rem 1.5rem;
    gap: 0;
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  body.light-theme .navbar-menu {
    /* Glass variables handle the light theme colors automatically now */
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  }

  .navbar-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .navbar-menu li {
    width: 100%;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
  }

  body.light-theme .navbar-menu li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  .navbar-menu.active li {
    animation: fadeInUp 0.5s ease forwards;
  }

  .navbar-menu.active li:nth-child(1) {
    animation-delay: 0.1s;
  }

  .navbar-menu.active li:nth-child(2) {
    animation-delay: 0.15s;
  }

  .navbar-menu.active li:nth-child(3) {
    animation-delay: 0.2s;
  }

  .navbar-menu.active li:nth-child(4) {
    animation-delay: 0.25s;
  }

  .navbar-menu.active li:nth-child(5) {
    animation-delay: 0.3s;
  }

  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav-link {
    display: block;
    padding: 1rem 0;
    font-size: 1rem;
  }

  .nav-link::before {
    bottom: 0.75rem;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .navbar-logo {
    font-size: 1.25rem;
  }

  .logo-icon {
    font-size: 1.5rem;
  }

  .global-theme-toggle {
    width: 50px;
    height: 50px;
    bottom: 1.5rem;
    right: 1.5rem;
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .global-theme-toggle {
    bottom: 1rem;
    right: 1rem;
  }
}

/* Stagger animation for nav items on load */
.navbar-menu li {
  animation: navItemFadeIn 0.6s ease forwards;
  opacity: 0;
}

.navbar-menu li:nth-child(1) {
  animation-delay: 0.1s;
}

.navbar-menu li:nth-child(2) {
  animation-delay: 0.2s;
}

.navbar-menu li:nth-child(3) {
  animation-delay: 0.3s;
}

.navbar-menu li:nth-child(4) {
  animation-delay: 0.4s;
}

.navbar-menu li:nth-child(5) {
  animation-delay: 0.5s;
}

@keyframes navItemFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .navbar-menu li {
    animation: none;
    opacity: 1;
  }
}