/* Navbar Styles */
.navbar {
  padding: 0.25rem 0;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  min-height: 50px;
}

.navbar > .container {
  align-items: center;
}

.navbar-collapse {
  align-items: center;
}

.navbar-brand {
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
}

.navbar.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.95);
}

.logo-container {
  position: relative;
}

.navbar-logo {
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
  height: 28px !important;
  width: auto;
}

.navbar-logo:hover {
  transform: scale(1.05) rotate(1deg);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.brand-text {
  line-height: 1;
}

.brand-name {
  font-weight: 700;
  font-size: 0.75rem;
  color: #1f2937;
  margin-bottom: -1px;
  transition: all 0.3s ease;
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.navbar-brand:hover .brand-name {
  color: #3b82f6;
  transform: translateX(1px);
}

.brand-tagline {
  font-size: 0.65rem;
  color: #6b7280;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.navbar-nav .nav-link {
  font-weight: 600;
  color: #374151 !important;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  position: relative;
  margin: 0 0.05rem;
  display: flex;
  align-items: center;
  margin-top: 2px;
}

.navbar-nav .nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.navbar-nav .nav-link:hover {
  color: #3b82f6 !important;
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.navbar-nav .nav-link:hover::before {
  width: 70%;
}

.navbar-nav .nav-link.active {
  color: #3b82f6 !important;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}

.dropdown-menu {
  border-radius: 8px;
  padding: 0.5rem;
  margin-top: 0.3rem;
  min-width: 200px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  animation: slideDown 0.3s ease;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.98);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dropdown-item {
  border-radius: 6px;
  padding: 0.5rem 0.8rem;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  color: #4b5563;
  font-weight: 500;
  margin: 0.05rem 0;
}

.dropdown-item:hover {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  color: #3b82f6;
  transform: translateX(3px);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.1);
}

.dropdown-item.active {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #3b82f6;
  font-weight: 600;
}

.dropdown-item i {
  font-size: 0.8rem;
  width: 16px;
  text-align: center;
  margin-right: 0.4rem;
}

.dropdown-header {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.4rem 0.8rem;
  margin-top: 0.2rem;
}

.dropdown-header:first-child {
  margin-top: 0;
}

.btn {
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  margin-top: 2px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: 1px solid #3b82f6;
  color: white;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: none;
  color: white;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
  position: relative;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.btn-outline-primary {
  border: 2px solid #e5e7eb;
  color: #6b7280;
  background: transparent;
  backdrop-filter: blur(10px);
}

.btn-outline-primary:hover {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  border-color: #9ca3af;
  color: #4b5563;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.navbar-toggler {
  border: 2px solid #e5e7eb;
  padding: 0.4rem;
  border-radius: 6px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.navbar-toggler:hover {
  border-color: #3b82f6;
  background: #eff6ff;
  transform: rotate(90deg);
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Enhanced pulse animation for franchise button */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(245, 158, 11, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

.pulse-animation {
  animation: pulse 2.5s infinite;
}

@media (max-width: 991px) {
  .navbar {
    padding: 0.4rem 0;
  }
  
  .navbar-nav {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
  }
  
  .navbar-nav .nav-link {
    padding: 0.5rem 0.7rem;
    margin-bottom: 0.1rem;
    font-size: 0.85rem;
    margin-top: 0;
    white-space: nowrap;
  }
  
  .d-flex.gap-2 {
    margin-top: 0.5rem;
    justify-content: center;
    gap: 0.4rem !important;
    flex-wrap: wrap;
  }
  
  .btn {
    font-size: 0.8rem;
    padding: 0.35rem 0.7rem;
    margin-top: 0;
  }
  
  .navbar-logo {
    height: 26px !important;
  }
  
  .brand-name {
    font-size: 0.65rem;
  }
  
  .brand-tagline {
    font-size: 0.55rem;
  }
}

@media (max-width: 576px) {
  .navbar {
    padding: 0.3rem 0;
  }
  
  .navbar-logo {
    height: 24px !important;
  }
  
  .brand-name {
    font-size: 0.6rem;
  }
  
  .brand-tagline {
    font-size: 0.5rem;
  }
  
  .btn {
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
  }
}

/* Remove excessive animations */
* {
  animation: none !important;
}

/* Keep only essential hover effects */
.logo-circle,
.nav-link,
.dropdown-item,
.btn {
  animation: none !important;
}

/* Nested Dropdown Styles */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu .dropdown-toggle::after {
  transform: rotate(-90deg);
  transition: transform 0.2s ease;
}

.dropdown-submenu:hover .dropdown-toggle::after {
  transform: rotate(0deg);
}

.dropdown-submenu .submenu {
  position: absolute;
  top: 0;
  left: 100%;
  margin-top: 0;
  margin-left: 0.125rem;
  display: none;
  min-width: 200px;
  z-index: 1000;
}

.dropdown-submenu:hover .submenu {
  display: block;
}

.submenu .dropdown-item {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  white-space: nowrap;
}

.submenu .dropdown-item i {
  font-size: 0.75rem;
  width: 14px;
}

/* Adjust main dropdown width for submenus */
.dropdown-menu {
  min-width: 240px;
}

/* Mobile adjustments for nested dropdowns */
@media (max-width: 991px) {
  .dropdown-submenu .submenu {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    background: #f1f5f9;
    margin-left: 1rem;
    border-radius: 4px;
  }
  
  .dropdown-submenu:hover .submenu,
  .dropdown-submenu.show .submenu {
    display: block;
  }
  
  .dropdown-submenu .dropdown-toggle::after {
    transform: rotate(0deg);
  }
  
  .dropdown-submenu:hover .dropdown-toggle::after,
  .dropdown-submenu.show .dropdown-toggle::after {
    transform: rotate(90deg);
  }
}
