/* ═══════════════════════════════════════════════════════════════
   Header Dropdown Navigation Styles
   Add this after style.css in your layout
   ═══════════════════════════════════════════════════════════════ */

/* ── Dropdown Container ── */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

/* ── Dropdown Button ── */
.nav-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #1e293b);
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-dropdown-btn:hover {
  background: var(--hover, rgba(0,0,0,.05));
  color: var(--primary, #0d6efd);
}

.nav-dropdown.active .nav-dropdown-btn {
  background: var(--hover, rgba(0,0,0,.05));
  color: var(--primary, #0d6efd);
  font-weight: 700;
}

/* Arrow icon rotation */
.nav-dropdown-btn svg {
  transition: transform 0.2s;
  opacity: 0.6;
}

.nav-dropdown:hover .nav-dropdown-btn svg,
.nav-dropdown-btn[aria-expanded="true"] svg {
  transform: rotate(-180deg);
}

/* ── Dropdown Menu ── */
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  background: white;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  padding: 6px;

  /* Hidden by default */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  z-index: 100;
}

/* Show on hover */
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Dropdown Menu Items */
.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text, #1e293b);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  background: var(--hover, rgba(13,110,253,0.08));
  color: var(--primary, #0d6efd);
}

.nav-dropdown-menu a.active {
  background: var(--hover, rgba(13,110,253,0.1));
  color: var(--primary, #0d6efd);
  font-weight: 700;
}

.nav-dropdown-menu a span {
  display: inline-flex;
  align-items: center;
  justify-content: left;
  width: 20px;
  height: 20px;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

/* ── Dark mode support (if needed) ── */
@media (prefers-color-scheme: dark) {
  .nav-dropdown-menu {
    background: #1e293b;
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  }

  .nav-dropdown-btn {
    color: #f1f5f9;
  }

  .nav-dropdown-menu a {
    color: #f1f5f9;
  }

  .nav-dropdown-menu a:hover {
    background: rgba(59,130,246,0.15);
  }
}

/* ── Mobile Responsive ── */
@media (max-width: 980px) {
  /* On mobile, hide dropdown and show in mobile drawer instead */
  .nav-dropdown {
    display: none;
  }

  /* Ensure mobile drawer displays properly */
  .mobile-drawer {
    display: block !important;
  }

  .mobile-drawer.open {
    display: flex !important;
    flex-direction: column;
  }
}

/* ── Accessibility ── */
.nav-dropdown-btn:focus-visible {
  outline: 2px solid var(--primary, #0d6efd);
  outline-offset: 2px;
}

.nav-dropdown-menu a:focus-visible {
  outline: 2px solid var(--primary, #0d6efd);
  outline-offset: -2px;
}

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

.nav-dropdown:hover .nav-dropdown-menu {
  animation: slideDown 0.2s ease-out;
}

/* ══════════════════════════════════════════════════════════════
   Mobile Drawer Groups
   ══════════════════════════════════════════════════════════════ */

.mobile-group {
  margin: 10px 0;
}

.mobile-group-header {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted, #64748b);
  padding: 8px 16px;
  margin-bottom: 4px;
  letter-spacing: 0.05em;
}

.mobile-group a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 12px 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text, #1e293b);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}

.mobile-group a:hover,
.mobile-group a:active {
  background: var(--hover, rgba(13,110,253,0.08));
  border-left-color: var(--primary, #0d6efd);
  color: var(--primary, #0d6efd);
}

.mobile-group a span {
  display: inline-flex;
  align-items: center;
  justify-content: left;
  width: 20px;
  height: 20px;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}
