/* =========================================================================
   Dentora — Shared component styles
   -------------------------------------------------------------------------
   Rules for markup that is assembled from more than one place. The
   primary navigation is the case in point: most nav links sit in the
   header, and the services menu adds another, so those rules belong in a
   shared file rather than beside either one.

   Loaded before ui.css, so a component may still override anything here.

   Keep this file small. Anything used by a single component stays in that
   component's own <style> block.
   ========================================================================= */

/* ---------- Primary navigation (Header + ServicesDropdown) -------------- */

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__item {
  position: relative;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  /* Full-height comfortable target, matching the other header controls. */
  min-height: var(--touch-target);
  padding-inline: var(--space-3);
  color: var(--color-navy);
  font-size: var(--text-nav);
  font-weight: var(--weight-medium);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: var(--transition-color);
}

.nav__link:hover {
  color: var(--color-teal-700);
  text-decoration: none;
}

/* Active item: teal text AND an underline bar, so the current page is
   never signalled by colour alone (WCAG 1.4.1). */
.nav__link[aria-current='page'] {
  color: var(--color-teal-700);
  font-weight: var(--weight-semibold);
}

.nav__link[aria-current='page']::after {
  content: '';
  position: absolute;
  inset-inline: var(--space-3);
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background-color: var(--color-teal);
}

/* At 1024–1140px the five links plus the CTA get tight; trimming the
   horizontal padding avoids wrapping without hiding anything. */
@media (min-width: 1024px) and (max-width: 1140px) {
  .nav {
    gap: 0;
  }

  .nav__link {
    padding-inline: var(--space-2);
  }

  .nav__link[aria-current='page']::after {
    inset-inline: var(--space-2);
  }
}
