/* Updated Header Styles */

/* Glassmorphism Header */
header {
  background-color: rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
  transition: all 0.4s ease !important;
}

header.scrolled {
  background-color: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}

/* Navigation Links Spacing */
.nav-links {
  gap: 5px !important;
  /* Increased gap for better breathing room */
}

/* Navigation Menu Items */
nav ul li a,
.nav-links a,
.dropdown-toggle {
  color: var(--dark-gray) !important;
  font-weight: 500 !important;
  font-size: 0.95rem !important;
  /* Slightly larger for readability */
  padding: 8px 16px !important;
  transition: all 0.3s ease !important;
}

/* Hover Effects */
nav ul li a:hover,
.nav-links a:hover,
.dropdown-toggle:hover {
  color: #27ae60 !important;
  background-color: rgba(39, 174, 96, 0.08) !important;
  transform: translateY(-1px);
}

/* Active State */
nav ul li a.active,
.nav-links a.active {
  color: #27ae60 !important;
  background-color: rgba(39, 174, 96, 0.12) !important;
  font-weight: 600 !important;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  color: var(--dark-gray) !important;
  font-size: 1.5rem;
  padding: 5px;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: none;
}

.mobile-menu-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: #27ae60 !important;
}

/* Show mobile menu button in tablet portrait mode */
@media (max-width: 992px) {
  .mobile-menu-btn {
    display: block !important;
  }
}

/* Dropdown Menu Styles */
.dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.dropdown-toggle {
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  border-radius: 999px !important;
}

.dropdown-toggle i {
  font-size: 0.75em;
  transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle i {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 16px !important;
  padding: 8px !important;
  min-width: 240px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06) !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), visibility 0.2s ease !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  z-index: 1000;
}

/* small arrow pointer */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-left: 1px solid rgba(0,0,0,0.08);
  border-top: 1px solid rgba(0,0,0,0.08);
  rotate: 45deg;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Suppress the ↗ external-link pseudo-element inside dropdown */
.dropdown-menu a::after,
.dropdown-menu a::before {
  display: none !important;
  content: none !important;
}

.dropdown-menu a.dropdown-item {
  display: flex !important;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 10px 14px !important;
  border-radius: 10px;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  color: #374151 !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease !important;
  white-space: nowrap;
  text-decoration: none;
  transform: none !important;
}

.dropdown-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(39, 174, 96, 0.10);
  color: #27ae60;
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: background 0.18s ease;
}

.dropdown-item-label {
  flex: 1;
}

.dropdown-menu a.dropdown-item:hover {
  background: rgba(39, 174, 96, 0.08) !important;
  color: #27ae60 !important;
  transform: translateX(3px) !important;
}

.dropdown-menu a.dropdown-item:hover .dropdown-item-icon {
  background: rgba(39, 174, 96, 0.2);
}