/* Header — modern professional design */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1035;
  padding-top: env(safe-area-inset-top);
  background: #fff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

/* Top bar — teal (#173B45) to match footer */
.header-topbar {
  background: #173B45;
  color: rgba(255, 255, 255, 0.9);
}

.header-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}

.header-topbar__nav {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 2px;
  padding: 2px 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.header-topbar__nav::-webkit-scrollbar {
  display: none;
}

.header-topbar__link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.header-topbar__link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.header-topbar__link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
}

.header-topbar__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.header-topbar__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.header-topbar__btn--primary {
  background: var(--brand-primary);
  color: #fff;
  border: none;
}

.header-topbar__btn--primary:hover {
  color: #fff;
  opacity: 0.95;
  transform: translateY(-1px);
}

.header-topbar__btn--outline {
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.header-topbar__btn--outline:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.header-topbar__icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.header-topbar__icon:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.header-topbar__icon .bi {
  font-size: 1rem;
}

/* Main nav */
.header-nav {
  display: flex;
  align-items: center;
  min-height: 60px;
  width: 100%;
}

.header-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header-nav__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.header-nav__logo img {
  display: block;
  max-height: 38px;
  width: auto;
}

.header-nav__menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.header-nav__item {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.78);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.header-nav__item:hover {
  color: rgba(15, 23, 42, 0.95);
  background: rgba(15, 23, 42, 0.05);
}

.header-nav__item.active {
  color: var(--brand-primary);
  background: rgba(var(--brand-primary-rgb), 0.1);
}

.header-dropdown {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
  padding: 12px;
  min-width: 200px;
}

.header-dropdown .dropdown-item {
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.9rem;
}

.header-dropdown .dropdown-item:hover {
  background: rgba(15, 23, 42, 0.05);
}

/* Mobile actions */
.header-nav__actions {
  align-items: center;
  gap: 8px;
}

.header-nav__action {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(15, 23, 42, 0.75);
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.header-nav__action:hover {
  background: rgba(15, 23, 42, 0.1);
  color: rgba(15, 23, 42, 0.9);
}

.header-nav__action .bi {
  font-size: 1.2rem;
}

.header-nav__action-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.header-nav__action--primary {
  width: auto;
  padding: 0 16px;
  background: var(--brand-primary);
  color: #fff;
  border-color: transparent;
}

.header-nav__action--primary:hover {
  background: rgba(var(--brand-primary-rgb), 0.9);
  color: #fff;
  border-color: transparent;
}

/* Legacy support */
.site-navbar { min-height: 60px; }
.site-brand { display: inline-flex; align-items: center; text-decoration: none; }
.site-links .nav-link { padding: 0.5rem 0.9rem; font-weight: 600; }
.site-header-actions { display: flex; align-items: center; gap: 8px; }

