/* Liquid Floating Navbar - High Interaction Design */
:root {
  --nav-height: 72px;
  --nav-bg: #ffffff;
  --nav-border: rgba(255, 255, 255, 0.5);
  --nav-glow: rgba(5, 199, 242, 0.15);
}

.navbar-custom {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1600px;
  height: var(--nav-height);
  background: var(--nav-bg);
  border: 1px solid var(--nav-border);
  border-radius: 100px;
  z-index: 2000;
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.03),
    inset 0 0 20px rgba(255, 255, 255, 0.2);
  padding: 0 10px 0 25px !important;
  display: flex;
  align-items: center;
}

.navbar-custom.scrolled {
  top: 15px;
  width: 94%;
  height: 64px;
  background: #ffffff;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.1);
}

/* Nav Container for Sliding Effect */
.navbar-nav-container {
  position: relative;
  display: flex;
  align-items: center;
}

/* The "Mazza" Factor: Liquid Highlighter */
.nav-highlight {
  position: absolute;
  height: 40px;
  background: var(--brand-primary-alt);
  border-radius: 30px;
  z-index: 0;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 4px 15px var(--nav-glow);
}

.navbar-nav {
  position: relative;
  z-index: 1;
  gap: 5px !important;
}

.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--gray-700) !important;
  padding: 10px 14px !important;
  border-radius: 30px;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--white) !important;
}

.nav-link.active {
  color: var(--white) !important;
}

/* Logic to make active link dark when another link is hovered (highlight moves away) */
.navbar-nav:hover .nav-link:not(:hover) {
  color: var(--gray-700) !important;
}

/* Ensure the link being hovered is always white because the highlight is under it */
.nav-link:hover {
  color: var(--white) !important;
}

/* Logo Animation */
.nav-logo {
  height: 38px;
  width: auto !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Innovative Search Bar */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
  margin-right: 15px;
}

.search-bar-custom {
  width: 45px;
  height: 45px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 50px;
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  align-items: center;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid transparent;
}

.search-bar-custom:hover {
  background: rgba(0, 0, 0, 0.07);
}

.search-bar-custom.expanded {
  width: 280px;
  background: var(--white);
  border-color: var(--brand-primary-alt);
  box-shadow: 0 10px 25px rgba(5, 199, 242, 0.1);
}

.search-icon {
  min-width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition: color 0.3s;
}

.search-bar-custom.expanded .search-icon {
  color: var(--brand-primary-alt);
}

.search-input {
  border: none;
  background: transparent;
  width: 0;
  padding: 0;
  font-size: 14px;
  outline: none;
  transition:
    width 0.4s ease,
    padding 0.4s ease;
}

.search-bar-custom.expanded .search-input {
  width: 200px;
  padding: 0 10px;
}

/* Premium "Get Started" Button */
.btn-premium {
  background: linear-gradient(
    135deg,
    var(--brand-primary-alt),
    var(--brand-primary)
  );
  color: var(--white) !important;
  border: none;
  border-radius: 50px;
  padding: 10px 20px !important;
  font-weight: 600;
  font-size: 14px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-premium::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: 0.5s;
}

.btn-premium:hover::before {
  left: 100%;
}

/* User Profile Icon */
.user-profile {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  transition: all 0.3s;
  border: 2px solid transparent;
}

.user-profile:hover {
  background: var(--white);
  border-color: var(--brand-primary-alt);
  color: var(--brand-primary-alt);
}

/* ========================================
   MOBILE MENU - Clean Modern Design
   ======================================== */

/* Hamburger Toggle Button */
.mobile-menu-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  background: var(--gray-100);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.3s ease;
  z-index: 2100;
}

.mobile-menu-toggle:active {
  transform: scale(0.95);
  background: var(--gray-200);
}

.hamburger-line {
  width: 20px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 10px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger-line.line-2 {
  width: 14px;
}

/* Hamburger to X animation */
.mobile-menu-toggle.active .line-1 {
  transform: translateY(7px) rotate(45deg);
  background: var(--brand-primary);
}

.mobile-menu-toggle.active .line-2 {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-toggle.active .line-3 {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--brand-primary);
}

/* Floating Dropdown Mobile Menu Backdrop */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 2050;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Menu Content - Floating Dropdown Panel */
.mobile-menu-content {
  position: fixed;
  top: 80px;
  /* Positions it nicely below the floating navbar */
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  width: 94%;
  max-width: 100vw;
  height: auto;
  max-height: calc(85vh);
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  z-index: 2100;
}

.mobile-menu-overlay.active .mobile-menu-content {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Menu Header - Minimal in Dropdown */
.mobile-menu-header {
  display: none;
  /* Logo is already in the main navbar above */
}

.mobile-logo img {
  height: 32px;
  width: auto;
}

/* Mobile Navigation Links */
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: transparent;
  border: none;
  border-radius: 12px;
  text-decoration: none;
  color: var(--gray-700);
  font-weight: 500;
  font-size: 15px;
  transition: all 0.2s ease;

  /* Staggered animation - Gentle Slide Up */
  opacity: 0;
  transform: translateY(10px);
}

.mobile-menu-overlay.active .mobile-nav-link {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.4s ease;
  transition-delay: var(--delay);
}

.mobile-nav-link:active {
  background: var(--gray-100);
}

.mobile-nav-link .nav-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  border-radius: 10px;
  color: var(--brand-primary);
  font-size: 14px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.mobile-nav-link:active .nav-icon {
  background: var(--brand-primary);
  color: white;
}

.mobile-nav-link .nav-text {
  flex: 1;
}

.mobile-nav-link .nav-arrow {
  color: var(--gray-400);
  font-size: 11px;
  transition: all 0.2s ease;
}

/* Mobile CTA Button */
.mobile-cta {
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(15px);
}

.mobile-menu-overlay.active .mobile-cta {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.4s ease;
  transition-delay: var(--delay);
}

.mobile-book-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  background: var(--brand-primary);
  color: white !important;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
}

.mobile-book-btn:active {
  transform: scale(0.98);
  background: var(--brand-primary-dark);
}

.mobile-book-btn i {
  font-size: 14px;
}

/* Mobile Adjustments for Navbar */
@media (max-width: 991px) {
  .navbar-custom {
    height: 60px;
    border-radius: 16px;
    top: 10px;
    width: 94%;
    padding: 8px 10px 8px 18px !important;
    background: rgba(255, 255, 255, 0.98);
  }

  .nav-logo {
    height: 30px;
  }

  .navbar-collapse {
    display: none !important;
  }

  .nav-highlight {
    display: none;
  }
}

/* Small mobile adjustments */
@media (max-width: 400px) {
  .navbar-custom {
    top: 8px;
    width: 96%;
  }

  .mobile-menu-content {
    width: 100%;
    padding: 6px;
  }

  .mobile-nav-link {
    padding: 12px 14px;
    font-size: 14px;
    gap: 12px;
  }

  .mobile-nav-link .nav-icon {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .mobile-book-btn {
    padding: 12px 18px;
    font-size: 13px;
  }
}
