/* ============================================================
   NEXTGEN ALYGN - PATTERN COMPONENT STYLES 2 (Phase 5-cont)
   Navigation (stepper, nav bar, breadcrumb, language switcher),
   cards (article, partner-clinic, dentist), testimonial, proof
   block, loading/empty states. Token-driven, WCAG 2.2 AA.
   ============================================================ */

/* ---------------- JOURNEY STEPPER ---------------- */
.ngx-stepper { display: flex; list-style: none; margin: 0; padding: 0; gap: 0; }
.ngx-stepper--vertical { flex-direction: column; gap: 0; }
.ngx-stepper__step { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.ngx-stepper--vertical .ngx-stepper__step { flex: none; align-items: flex-start; }
.ngx-stepper__marker { flex: none; width: 36px; height: 36px; border-radius: var(--radius-pill); display: flex; align-items: center; justify-content: center; font-size: var(--text-body-sm); font-weight: var(--weight-bold); box-shadow: inset 0 0 0 1.5px var(--border-default); color: var(--text-muted-accessible); background: var(--surface-card); }
.ngx-stepper__step--done .ngx-stepper__marker { background: var(--accent-action); box-shadow: none; color: #fff; }
.ngx-stepper__step--current .ngx-stepper__marker { box-shadow: inset 0 0 0 2px var(--accent-action); color: var(--accent-text-light); }
.ngx-stepper__labels { display: flex; flex-direction: column; min-width: 0; }
.ngx-stepper__title { font-size: var(--text-body-sm); font-weight: var(--weight-bold); color: var(--text-primary); letter-spacing: var(--tracking-tight); }
.ngx-stepper__step--upcoming .ngx-stepper__title { color: var(--text-muted-accessible); font-weight: var(--weight-medium); }
.ngx-stepper__desc { font-size: var(--text-caption); color: var(--text-muted-accessible); }
.ngx-stepper__line { flex: 1; height: 2px; background: var(--border-default); margin: 0 8px; min-width: 16px; }
.ngx-stepper__step--done .ngx-stepper__line { background: var(--accent-action); }
.ngx-stepper--vertical .ngx-stepper__line { width: 2px; height: auto; min-height: 20px; margin: 4px 0 4px 17px; flex: none; }
.ngx-stepper--vertical .ngx-stepper__connector { display: flex; }

/* ---------------- NAV BAR ---------------- */
.ngx-nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-8); height: var(--nav-height, 78px); padding-inline: var(--gutter); }
.ngx-nav--dark { background: var(--ng-obsidian); }
.ngx-nav__brand { display: inline-flex; align-items: center; flex: none; }
.ngx-nav__links { display: flex; align-items: center; gap: var(--space-6); list-style: none; margin: 0; padding: 0; }
.ngx-nav__link { font-size: var(--text-body-sm); font-weight: var(--weight-medium); color: var(--text-secondary); text-decoration: none; padding: 8px 4px; border-radius: 2px; display: inline-flex; align-items: center; gap: 5px; }
.ngx-nav--dark .ngx-nav__link { color: rgba(255,255,255,0.78); }
.ngx-nav__link:hover { color: var(--text-primary); }
.ngx-nav--dark .ngx-nav__link:hover { color: #fff; }
.ngx-nav__link[aria-current="page"] { color: var(--text-accent); font-weight: var(--weight-bold); }
.ngx-nav__link:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.ngx-nav__actions { display: flex; align-items: center; gap: var(--space-4); flex: none; }
.ngx-nav__toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; color: currentColor; }
.ngx-nav--dark .ngx-nav__toggle { color: #fff; }
@media (max-width: 940px) {
  .ngx-nav__links { display: none; }
  .ngx-nav__toggle { display: inline-flex; }
}

/* ---------------- BREADCRUMB ---------------- */
.ngx-breadcrumb { font-size: var(--text-body-sm); }
.ngx-breadcrumb__list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.ngx-breadcrumb__item { display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted-accessible); }
.ngx-breadcrumb__link { color: var(--text-secondary); text-decoration: none; }
.ngx-breadcrumb__link:hover { color: var(--text-accent); text-decoration: underline; text-underline-offset: 0.18em; }
.ngx-breadcrumb__link:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 2px; }
.ngx-breadcrumb__sep { color: var(--text-muted); }
.ngx-breadcrumb__current { color: var(--text-primary); font-weight: var(--weight-medium); }

/* ---------------- LANGUAGE SWITCHER ---------------- */
.ngx-lang { position: relative; display: inline-block; }
.ngx-lang__button { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 8px 12px; background: none; border: 1px solid var(--border-default); border-radius: var(--radius-sm); cursor: pointer; font-family: var(--font-sans); font-size: var(--text-body-sm); font-weight: var(--weight-medium); color: var(--text-primary); }
.ngx-nav--dark .ngx-lang__button, .ngx-lang--on-dark .ngx-lang__button { color: #fff; border-color: rgba(255,255,255,0.24); }
.ngx-lang__button:hover { border-color: var(--border-strong); }
.ngx-lang__button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.ngx-lang__menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 190px; background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 6px; list-style: none; margin: 0; z-index: var(--z-overlay, 90); }
.ngx-lang__option { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; min-height: 44px; background: none; border: 0; border-radius: var(--radius-xs); cursor: pointer; font-family: var(--font-sans); font-size: var(--text-body-sm); color: var(--text-primary); text-align: left; }
.ngx-lang__option:hover { background: var(--surface-sunken); }
.ngx-lang__option:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.ngx-lang__option[aria-current="true"] { font-weight: var(--weight-bold); color: var(--text-accent); }
.ngx-lang__native { color: var(--text-muted-accessible); font-size: var(--text-caption); }

/* ---------------- ARTICLE CARD ---------------- */
.ngx-article { display: flex; flex-direction: column; background: var(--surface-card); border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--hairline); text-decoration: none; color: inherit; transition: box-shadow var(--duration) var(--ease-standard), transform var(--duration) var(--ease-standard); height: 100%; }
a.ngx-article:hover { box-shadow: var(--shadow-md); }
a.ngx-article:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.ngx-article__media { position: relative; aspect-ratio: 3 / 2; background: var(--ng-carbon); overflow: hidden; }
.ngx-article__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.ngx-article__cat { position: absolute; top: 12px; left: 12px; }
.ngx-article__body { display: flex; flex-direction: column; gap: 8px; padding: var(--space-5); flex: 1; }
.ngx-article__title { font-size: var(--text-h4); font-weight: var(--weight-bold); letter-spacing: var(--tracking-tight); line-height: 1.2; color: var(--text-primary); }
a.ngx-article:hover .ngx-article__title { color: var(--text-accent); }
.ngx-article__excerpt { font-size: var(--text-body-sm); color: var(--text-secondary); line-height: 1.5; }
.ngx-article__meta { margin-top: auto; padding-top: 12px; font-size: var(--text-caption); color: var(--text-muted-accessible); display: flex; gap: 10px; }

/* ---------------- PARTNER-CLINIC CARD ---------------- */
.ngx-clinic { display: flex; flex-direction: column; gap: var(--space-3); background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-card); padding: var(--space-5); }
.ngx-clinic__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ngx-clinic__name { font-size: var(--text-h5); font-weight: var(--weight-bold); color: var(--text-primary); letter-spacing: var(--tracking-tight); }
.ngx-clinic__city { font-size: var(--text-body-sm); color: var(--text-muted-accessible); display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; }
.ngx-clinic__meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: var(--text-body-sm); color: var(--text-secondary); }
.ngx-clinic__meta span { display: inline-flex; align-items: center; gap: 6px; }
.ngx-clinic__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.ngx-clinic__dist { font-size: var(--text-caption); color: var(--text-muted-accessible); }

/* ---------------- DENTIST-PROFILE CARD ---------------- */
.ngx-dentist { display: flex; gap: var(--space-4); background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-card); padding: var(--space-5); align-items: center; }
.ngx-dentist__photo { flex: none; width: 72px; height: 72px; border-radius: var(--radius-pill); object-fit: cover; background: var(--ng-carbon); filter: grayscale(1); }
.ngx-dentist__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ngx-dentist__name { font-size: var(--text-h5); font-weight: var(--weight-bold); color: var(--text-primary); }
.ngx-dentist__role { font-size: var(--text-body-sm); color: var(--accent-text-light); font-weight: var(--weight-medium); }
.ngx-dentist__clinic { font-size: var(--text-body-sm); color: var(--text-muted-accessible); display: inline-flex; align-items: center; gap: 5px; }

/* ---------------- TESTIMONIAL ---------------- */
.ngx-testimonial { display: flex; flex-direction: column; gap: var(--space-5); }
.ngx-testimonial__quote { font-family: var(--font-display); font-size: var(--text-h3); font-weight: var(--weight-medium); line-height: 1.32; letter-spacing: var(--tracking-tight); color: var(--text-primary); }
.ngx-testimonial__quote em { font-style: normal; color: var(--text-accent); }
.ngx-testimonial__person { display: flex; align-items: center; gap: 14px; }
.ngx-testimonial__photo { width: 48px; height: 48px; border-radius: var(--radius-pill); object-fit: cover; filter: grayscale(1); background: var(--ng-carbon); flex: none; }
.ngx-testimonial__name { font-size: var(--text-body-sm); font-weight: var(--weight-bold); color: var(--text-primary); }
.ngx-testimonial__meta { font-size: var(--text-caption); color: var(--text-muted-accessible); }
.ngx-testimonial__consent { font-size: var(--text-caption); color: var(--text-muted-accessible); font-style: italic; }

/* ---------------- PROOF BLOCK ---------------- */
.ngx-proof { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-6); border: 1px solid var(--border-subtle); border-radius: var(--radius-card); background: var(--surface-card); }
.ngx-proof__icon { color: var(--text-accent); }
.ngx-proof__title { font-size: var(--text-body-sm); font-weight: var(--weight-bold); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--text-primary); }
.ngx-proof__text { font-size: var(--text-body-sm); color: var(--text-secondary); line-height: 1.55; }
.ngx-proof__source { font-size: var(--text-caption); color: var(--text-muted-accessible); margin-top: 2px; }
.ngx-proof--flag { border-style: dashed; border-color: var(--warning); background: var(--warning-surface); }
.ngx-proof--flag .ngx-proof__text { color: var(--warning); font-weight: var(--weight-medium); }

/* ---------------- LOADING / SKELETON ---------------- */
.ngx-skeleton { background: linear-gradient(100deg, var(--surface-sunken) 30%, var(--ng-mist) 50%, var(--surface-sunken) 70%); background-size: 200% 100%; border-radius: var(--radius-xs); animation: ngx-shimmer 1.4s ease-in-out infinite; }
@keyframes ngx-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .ngx-skeleton { animation: none; } }
.ngx-spinner { display: inline-block; width: 22px; height: 22px; border: 2.5px solid var(--border-default); border-top-color: var(--accent-action); border-radius: 50%; animation: ngx-spin 0.7s linear infinite; }
@keyframes ngx-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ngx-spinner { animation-duration: 2.4s; } }

/* ---------------- EMPTY STATE ---------------- */
.ngx-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-4); padding: var(--space-16) var(--space-8); max-width: 42ch; margin-inline: auto; }
.ngx-empty__icon { color: var(--text-muted); }
.ngx-empty__title { font-size: var(--text-h4); font-weight: var(--weight-bold); color: var(--text-primary); letter-spacing: var(--tracking-tight); }
.ngx-empty__text { font-size: var(--text-body); color: var(--text-secondary); line-height: 1.55; }
