/* ================================================
   NAVBAR.CSS — Xtreme Fitness Studio
   Responsive: Desktop, Tablet, Mobile
================================================ */

/* ---- Base Navbar ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(5, 5, 5, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--primary-color);
  z-index: 100;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(230, 0, 0, 0.3);
}

.navbar-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.navbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--navbar-height, 64px);
  gap: 1rem;
}

/* ---- Logo ---- */
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--primary-color);
  cursor: pointer;
  transition: all 0.3s ease;
  text-shadow: 0 0 15px rgba(230, 0, 0, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
  text-decoration: none;
}

.navbar-logo:hover {
  text-shadow: 0 0 25px rgba(230, 0, 0, 0.9);
  transform: scale(1.03);
  color: var(--primary-color);
}

.logo-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(230, 0, 0, 0.5));
  flex-shrink: 0;
}

.logo-text {
  letter-spacing: 0.05em;
  color: var(--primary-color);
  font-weight: 900;
  line-height: 1;
}

/* ---- Desktop Navigation Menu ---- */
.navbar-menu {
  display: flex;
  gap: 1.5rem;
  flex: 1;
  justify-content: center;
  flex-wrap: nowrap;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  position: relative;
  transition: all 0.3s ease;
  padding-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  text-decoration: none;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
  box-shadow: 0 0 8px rgba(230, 0, 0, 0.6);
}

.nav-link:hover {
  color: var(--primary-color);
  text-shadow: 0 0 10px rgba(230, 0, 0, 0.5);
}

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

.nav-link.active {
  color: var(--primary-color);
  text-shadow: 0 0 10px rgba(230, 0, 0, 0.5);
}

/* ---- CTA Button (Desktop) ---- */
.navbar-cta-link {
  flex-shrink: 0;
  text-decoration: none;
}

.navbar-cta {
  padding: 0.5rem 1.1rem;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 0 15px rgba(230, 0, 0, 0.5);
  font-family: var(--font-sans);
}

.navbar-cta:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(230, 0, 0, 0.8);
}

/* ---- Hamburger Button (Mobile) ---- */
.mobile-menu-btn {
  display: none;
  width: 34px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  position: relative;
}

.hamburger-line {
  display: block;
  height: 2.5px;
  width: 100%;
  background-color: var(--primary-color);
  border-radius: 2px;
  transition: all 0.35s ease;
  transform-origin: center;
}

/* Hamburger → X animation */
.mobile-menu-btn.is-open .hamburger-line:nth-child(1) {
  transform: translateY(10.5px) rotate(45deg);
}

.mobile-menu-btn.is-open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-btn.is-open .hamburger-line:nth-child(3) {
  transform: translateY(-10.5px) rotate(-45deg);
}

/* ---- Mobile Dropdown Menu ---- */
.mobile-menu {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid rgba(230, 0, 0, 0.3);
  background-color: rgba(8, 8, 8, 0.99);
  animation: slideDown 0.3s ease-out;
}

.mobile-menu.hidden {
  display: none;
}

.mobile-menu-link {
  padding: 0.9rem 0;
  color: var(--text-tertiary);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.25s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.mobile-menu-link:hover,
.mobile-menu-link:active {
  color: var(--primary-color);
  text-shadow: 0 0 10px rgba(230, 0, 0, 0.5);
  padding-left: 0.5rem;
}

.mobile-menu-cta {
  width: 100%;
  padding: 0.875rem;
  margin-top: 1rem;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 0 15px rgba(230, 0, 0, 0.5);
  font-family: var(--font-sans);
}

.mobile-menu-cta:hover {
  background-color: var(--primary-light);
  box-shadow: 0 0 25px rgba(230, 0, 0, 0.7);
}

/* ---- Animation ---- */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================================================
   BREAKPOINTS — Navbar
================================================ */

/* Hide desktop menu & CTA on tablet/mobile */
@media (max-width: 900px) {
  .navbar-menu {
    display: none;
  }

  .navbar-cta-link {
    display: none;
  }

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

/* Large mobile / tablet adjustments */
@media (max-width: 768px) {
  .navbar-container {
    padding: 0 1rem;
  }

  .navbar-content {
    height: 60px;
  }

  .logo-text {
    font-size: 1.1rem;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .navbar-content {
    height: 54px;
  }

  .logo-text {
    font-size: 1rem;
  }

  .logo-img {
    width: 28px;
    height: 28px;
  }

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

  .mobile-menu-link {
    padding: 0.85rem 0;
    font-size: 0.9rem;
  }
}

/* Very small screens */
@media (max-width: 360px) {
  .logo-text {
    font-size: 0.9rem;
    letter-spacing: 0.03em;
  }

  .logo-img {
    width: 24px;
    height: 24px;
  }
}
