/* Dr. Alireza Amini clinic — main stylesheet (RTL, mobile first) */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-wght.f6d31671339d.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Noto Naskh Arabic";
  src: url("../fonts/NotoNaskhArabic-wght.c4cd81c18e91.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

:root {
  /* base */
  --porcelain: #F3F5F4;
  --surface: #FFFFFF;
  --ink: #1D2733;
  --ink-2: #4E5966;
  --line: #D5DBDE;
  /* shade-guide tones (A1, A2, A3.5) */
  --a1: #F1EBDD;
  --a2: #E4D5B7;
  --a35: #CBAE86;
  /* articulating-paper blue and red */
  --cobalt: #2747B8;
  --cobalt-ink: #1A3490;
  --cobalt-tint: #E4E9F8;
  --gum: #B5485A;
  --gum-tint: #F7E6E9;

  --font-body: "Vazirmatn", Tahoma, sans-serif;
  --font-display: "Noto Naskh Arabic", "Vazirmatn", serif;

  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 10px;
  --header-h: 72px;
  --gutter: 16px;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--porcelain);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.85;
  font-feature-settings: "ss01";
  overflow-x: hidden;
}
@media (min-width: 720px) { body { font-size: 1.0625rem; } }
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--cobalt); text-underline-offset: 0.3em; text-decoration-thickness: 1px; }
a:hover { color: var(--cobalt-ink); }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 4px; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }

h1, h2, h3, .svc-title, .footer-name, .brand-name, .step-title {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.45;
  margin: 0 0 0.4em;
  color: var(--ink);
}
h1 { font-size: clamp(2.4rem, 5.6vw, 4rem); line-height: 1.35; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.4rem; }

[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 28px; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--r-sm); }
.skip:focus { top: 12px; }
.muted { color: var(--ink-2); }
.pending { color: var(--ink-2); border-bottom: 1px dashed var(--a35); }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 44px; padding: 0.45em 1.2em;
  border-radius: 999px; border: 1.5px solid transparent;
  font: inherit; font-weight: 600; font-size: 0.95rem; line-height: 1.4;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-lg { min-height: 52px; padding-inline: 1.6em; font-size: 1rem; }
.btn-primary { background: var(--cobalt); color: #fff; }
.btn-primary:hover { background: var(--cobalt-ink); color: #fff; }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.text-link { font-weight: 600; }

/* ---------- header and nav */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--porcelain) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-inline-end: auto; }
.brand-mark { width: 34px; height: 34px; color: var(--cobalt); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-size: 1.2rem; margin: 0; line-height: 1.5; }
.brand-sub { font-size: 0.78rem; color: var(--ink-2); }

.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: transform .2s; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; inset-inline-start: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

.main-nav { display: none; }
.nav-list { list-style: none; }
.nav-list > li > a:not(.btn) {
  display: flex; align-items: center; gap: 4px;
  padding: 10px 12px; color: var(--ink); text-decoration: none; font-weight: 500; border-radius: var(--r-sm);
}
.nav-list > li > a:not(.btn):hover, .nav-list > li > a[aria-current="page"] { color: var(--cobalt); }
.chev { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform .2s; }

/* mobile drawer */
.nav-open .main-nav {
  display: block; position: fixed; inset: var(--header-h) 0 0 0; z-index: 49;
  background: var(--porcelain); overflow-y: auto; padding: 12px var(--gutter) 40px;
}
.nav-open { overflow: hidden; }
.nav-open .nav-list > li { border-bottom: 1px solid var(--line); }
.nav-open .nav-list > li > a:not(.btn) { padding: 14px 4px; font-size: 1.1rem; }
.nav-open .nav-book { border: 0 !important; padding-top: 18px; }
.nav-open .nav-book .btn { width: 100%; min-height: 52px; }

/* price menu (popover on desktop, accordion on mobile) */
.price-menu { display: none; }
.has-menu.is-open > .price-menu { display: block; }
.has-menu.is-open .chev { transform: rotate(180deg); }
.pm-list { list-style: none; }
.pm-head { display: flex; align-items: center; gap: 10px; padding: 9px 10px; text-decoration: none; color: var(--ink); border-radius: var(--r-sm); font-weight: 500; line-height: 1.5; }
.pm-icon { width: 26px; height: 26px; flex: none; color: var(--cobalt); }
.pm-sub { list-style: none; display: none; }
.pm-sub a { display: flex; justify-content: space-between; gap: 16px; padding: 8px 10px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); font-size: 0.92rem; }
.pm-sub a:hover, .pm-head:hover { background: var(--cobalt-tint); color: var(--ink); }
.pm-amount { color: var(--ink-2); white-space: nowrap; font-size: 0.85rem; }
.pm-all a { color: var(--cobalt); font-weight: 600; }
.pm-footer { display: block; padding: 10px; font-weight: 600; font-size: 0.92rem; text-decoration: none; }

@media (max-width: 1023px) {
  .price-menu { padding: 0 0 10px; }
  .pm-item.is-active > .pm-sub { display: block; padding-inline-start: 36px; }
}

@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .main-nav { display: block; }
  .nav-list { display: flex; align-items: center; gap: 2px; }
  .nav-book { margin-inline-start: 10px; }
  .has-menu { position: relative; }
  .price-menu {
    position: absolute; top: calc(100% + 10px); inset-inline-start: -220px; z-index: 60;
    width: 700px; padding: 10px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
    box-shadow: 0 18px 50px -18px rgba(29, 39, 51, .35);
  }
  /* hover bridge so the pointer can travel from the trigger to the panel */
  .price-menu::before { content: ""; position: absolute; inset-inline: 0; top: -12px; height: 12px; }
  .pm-list { display: grid; grid-template-columns: 290px 1fr; grid-template-rows: repeat(7, auto) 1fr; column-gap: 10px; position: relative; min-height: 330px; }
  .pm-item { grid-column: 1; }
  .pm-item.is-active > .pm-head { background: var(--cobalt-tint); }
  .pm-item.is-active > .pm-sub {
    display: block; position: absolute; inset-block: 0; inset-inline-start: 300px; inset-inline-end: 0;
    padding: 6px 12px; border-inline-start: 1px solid var(--line);
  }
  .pm-footer { border-top: 1px solid var(--line); margin-top: 6px; }
}

/* ---------- hero */
.hero { padding: 28px 0 56px; }
.hero-grid { display: grid; gap: 28px; align-items: center; }
.hero-role { font-size: 1.15rem; color: var(--ink-2); margin-bottom: 1.2em; }
.hero-lead { font-size: 1.12rem; max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 18px; }
.hero-trust { font-size: 0.9rem; color: var(--ink-2); }
.hero-media { margin: 0; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 11; background: var(--a1); }
.hero-media img, .hero-media video { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) {
  .hero { padding: 56px 0 88px; }
  .hero-grid { grid-template-columns: 5fr 7fr; gap: 56px; }
}

/* ---------- before/after band */
.ba { padding: 64px 0 72px; background: var(--ink); color: #E9EDF0; }
.ba h2 { color: #fff; }
.ba-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: 32px; }
.ba-head p { max-width: 40em; color: #BFC7CF; margin: 0; }
.ba-toggle { font: inherit; font-size: 0.9rem; color: #fff; background: transparent; border: 1px solid #5B6673; border-radius: 999px; padding: 8px 18px; min-height: 44px; cursor: pointer; }
.ba-toggle:hover { border-color: #fff; }
.ba-toggle-play { display: none; }
.ba.is-paused .ba-toggle-play { display: inline; }
.ba.is-paused .ba-toggle-pause { display: none; }

.ba-viewport { position: relative; overflow: hidden; padding-block: 2px; }
.ba-viewport::before, .ba-viewport::after { content: ""; position: absolute; top: 0; bottom: 0; width: 8vw; z-index: 2; pointer-events: none; }
.ba-viewport::before { right: 0; background: linear-gradient(to left, var(--ink), transparent); }
.ba-viewport::after { left: 0; background: linear-gradient(to right, var(--ink), transparent); }
.ba-track {
  --col: 300px; --gap: 12px;
  list-style: none; display: flex; gap: var(--gap); width: max-content;
  animation: ba-flow 80s linear infinite;
}
.ba:hover .ba-track, .ba:focus-within .ba-track, .ba.is-paused .ba-track { animation-play-state: paused; }
@keyframes ba-flow { from { transform: translateX(0); } to { transform: translateX(calc(50% + var(--gap) / 2)); } }
.ba-col { flex: none; width: var(--col); }
.ba-col a { display: grid; gap: var(--gap); text-decoration: none; position: relative; border-radius: var(--r-sm); }
.ba-col img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: var(--r-sm); }
.ba-cap {
  position: absolute; inset-inline-start: 10px; bottom: 10px;
  background: rgba(29, 39, 51, .78); color: #fff; font-size: 0.82rem; line-height: 1.5;
  padding: 3px 10px; border-radius: 999px;
}
.ba-col a:hover img { filter: brightness(1.06); }
.ba-rowlabel {
  position: absolute; inset-inline-start: var(--gutter); z-index: 3;
  background: var(--porcelain); color: var(--ink); font-weight: 700; font-size: 0.85rem;
  padding: 2px 12px; border-radius: 999px;
}
.ba-rowlabel-top { top: 12px; }
.ba-rowlabel-bottom { top: calc(50% + 12px); background: var(--cobalt); color: #fff; }
@media (min-width: 720px) { .ba-track { --col: 400px; --gap: 16px; } }
@media (prefers-reduced-motion: reduce) {
  .ba-track { animation: none; }
  .ba-viewport { overflow-x: auto; scroll-snap-type: x mandatory; }
  .ba-col { scroll-snap-align: start; }
  .ba-col[aria-hidden="true"] { display: none; }
  .ba-toggle { display: none; }
}

/* ---------- section heads */
.section-head { max-width: 44em; margin-bottom: 36px; }
.section-head p { color: var(--ink-2); }

/* ---------- services grid */
.services { padding: 80px 0; }
.svc-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.svc-card {
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  transition: border-color .15s;
}
a.svc-card:hover { border-color: var(--cobalt); color: var(--ink); }
a.svc-card:hover .svc-more { text-decoration: underline; }
.svc-media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--a1); }
.svc-media img { width: 100%; height: 100%; object-fit: cover; }
.svc-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 22px; flex: 1; }
.svc-icon-wrap { width: 52px; height: 52px; margin-top: -44px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--cobalt); position: relative; }
.svc-icon { width: 34px; height: 34px; }
.svc-title { display: block; font-size: 1.3rem; margin: 6px 0 0; }
.svc-text { display: block; color: var(--ink-2); font-size: 0.95rem; line-height: 1.8; }
.svc-more { margin-top: auto; padding-top: 8px; color: var(--cobalt); font-weight: 600; font-size: 0.92rem; }
.svc-card-feature { background: var(--a1); border-color: var(--a2); }
.svc-card-feature .svc-icon-wrap { background: var(--a1); border-color: var(--a2); }
.svc-card-help { padding: 26px; background: transparent; border-style: dashed; border-color: var(--a35); justify-content: center; gap: 4px; }
.svc-card-help .btn { align-self: flex-start; margin-top: 12px; }

@media (min-width: 640px) {
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .svc-card-feature { grid-column: span 2; }
  .svc-card-feature .svc-media { aspect-ratio: 16 / 9; }
}
@media (min-width: 1024px) {
  .svc-grid { grid-template-columns: repeat(4, 1fr); }
  .svc-card-feature { grid-column: span 2; grid-row: span 2; }
  .svc-card-feature .svc-media { aspect-ratio: auto; flex: 1; min-height: 340px; }
  .svc-card-feature .svc-body { flex: none; }
  .svc-card-feature .svc-title { font-size: 1.8rem; }
  .svc-card-help { grid-column: span 2; }
}

/* ---------- doctor teaser */
.doc-teaser { padding: 72px 0; background: var(--surface); border-block: 1px solid var(--line); }
.doc-teaser-grid { display: grid; gap: 28px; align-items: center; }
.doc-photo, .dr-photo { margin: 0; width: 180px; border-radius: 90px 90px var(--r-md) var(--r-md); overflow: hidden; background: var(--a1); border: 6px solid var(--a1); }
.doc-photo img, .dr-photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.doc-role { color: var(--ink-2); }
.doc-teaser p:not(.doc-role) { max-width: 40em; }
@media (min-width: 720px) { .doc-teaser-grid { grid-template-columns: auto 1fr; gap: 48px; } }

/* ---------- booking */
.booking { padding: 80px 0; }
.bk-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 20px; font-size: 0.9rem; color: var(--ink-2); }
.bk-legend li { display: flex; align-items: center; gap: 8px; }
.bk-key { width: 12px; height: 12px; border-radius: 50%; }
.bk-key-free { background: var(--cobalt); }
.bk-key-taken { border: 2px solid var(--a35); }
.bk-key-closed { background: var(--line); }

.bk { display: grid; gap: 24px; }
.bk-week { margin-bottom: 18px; }
.bk-week-title { font-size: 0.9rem; color: var(--ink-2); margin-bottom: 8px; font-weight: 500; }
.bk-days { list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(88px, 1fr); gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; }
.bk-day { scroll-snap-align: start; }
/* each day is a shade tab: rounded top, tapered bottom */
.bk-tab {
  width: 100%; min-height: 150px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 6px 18px; font: inherit; color: var(--ink); cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 16px 16px 44px 44px;
  transition: background-color .15s, border-color .15s, transform .15s;
}
.bk-tab-wd { font-size: 0.85rem; color: var(--ink-2); }
.bk-tab-num { font-family: var(--font-display); font-size: 2rem; line-height: 1.3; font-weight: 700; }
.bk-tab-month { font-size: 0.8rem; color: var(--ink-2); }
.bk-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; max-width: 84px; margin-top: 6px; }
.bk-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cobalt); }
.bk-dot.is-taken { background: transparent; box-shadow: inset 0 0 0 1.5px var(--a35); }
.bk-tab-status { font-size: 0.75rem; margin-top: 6px; line-height: 1.4; }
.bk-tab.is-open { border-color: var(--cobalt); }
.bk-tab.is-open:hover { background: var(--cobalt-tint); transform: translateY(-2px); }
.bk-tab.is-open .bk-tab-status { color: var(--cobalt); font-weight: 600; }
.bk-tab.is-full .bk-tab-status { color: var(--gum); }
.bk-tab.is-closed, .bk-tab.is-past, .bk-tab.is-ended { background: transparent; color: #8A939D; border-style: dashed; cursor: default; }
.bk-tab.is-closed :is(.bk-tab-wd, .bk-tab-month), .bk-tab.is-past :is(.bk-tab-wd, .bk-tab-month), .bk-tab.is-ended :is(.bk-tab-wd, .bk-tab-month) { color: #8A939D; }
.bk-tab.is-today { box-shadow: 0 0 0 3px var(--a2); }
.bk-tab[aria-pressed="true"] { background: var(--cobalt); border-color: var(--cobalt); color: #fff; transform: translateY(-4px); }
.bk-tab[aria-pressed="true"] .bk-tab-wd, .bk-tab[aria-pressed="true"] .bk-tab-month, .bk-tab[aria-pressed="true"] .bk-tab-status { color: #fff; }
.bk-tab[aria-pressed="true"] .bk-dot { background: #fff; }
.bk-tab[aria-pressed="true"] .bk-dot.is-taken { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55); }
@media (min-width: 900px) { .bk-days { grid-template-columns: repeat(7, 1fr); grid-auto-flow: row; overflow: visible; } }

.bk-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; }
.bk-panel-title { font-size: 1.6rem; }
.bk-panel-title:focus { outline: none; }
.bk-slots { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.bk-slot {
  font: inherit; font-size: 0.95rem; min-height: 44px; min-width: 76px; padding: 6px 14px; cursor: pointer;
  border-radius: 999px; border: 1.5px solid var(--cobalt); background: var(--surface); color: var(--cobalt); font-weight: 600;
}
.bk-slot:hover { background: var(--cobalt-tint); }
.bk-slot[aria-pressed="true"] { background: var(--cobalt); color: #fff; }
.bk-slot:disabled { border-color: var(--line); color: #9AA3AD; text-decoration: line-through; cursor: not-allowed; background: transparent; }
.bk-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 14px; max-width: 520px; }
.bk-chosen { font-weight: 600; margin: 0; }
.field label { display: block; font-size: 0.92rem; font-weight: 600; margin-bottom: 4px; }
.field input, .field select {
  width: 100%; min-height: 48px; padding: 8px 14px; font: inherit; color: var(--ink);
  background: var(--porcelain); border: 1.5px solid var(--line); border-radius: var(--r-sm);
}
.field input:focus, .field select:focus { border-color: var(--cobalt); outline: none; box-shadow: 0 0 0 3px var(--cobalt-tint); }
.field input[aria-invalid="true"] { border-color: var(--gum); }
.field-error { color: var(--gum); font-size: 0.88rem; margin: 6px 0 0; }
.bk-form .btn { justify-self: start; }
.bk-done { padding: 18px; border-radius: var(--r-sm); background: var(--cobalt-tint); }
.bk-done:focus { outline: none; }
.bk-done p { margin: 0 0 0.5em; }
.bk-empty { color: var(--ink-2); margin: 0; }

/* ---------- address and contact */
.visit { padding: 80px 0; background: var(--surface); border-top: 1px solid var(--line); }
.visit-grid { display: grid; gap: 48px; }
.visit-addr { font-size: 1.1rem; }
.map-frame { border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--a1); aspect-ratio: 4 / 3; margin-bottom: 16px; }
.map-frame iframe { width: 100%; height: 100%; border: 0; }
.phone-big { display: inline-block; font-family: var(--font-body); letter-spacing: .02em; font-size: clamp(2.2rem, 6vw, 3.2rem); font-weight: 600; text-decoration: none; color: var(--ink); line-height: 1.3; margin: 8px 0 12px; }
.phone-big:hover { color: var(--cobalt); }
.visit-hours { color: var(--ink-2); }
@media (min-width: 900px) { .visit-grid { grid-template-columns: 7fr 5fr; gap: 64px; } .map-frame { aspect-ratio: 16 / 10; } }

/* ---------- footer */
.site-footer { background: var(--ink); color: #C5CDD5; padding: 56px 0 24px; font-size: 0.93rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; gap: 32px; }
.footer-name { color: #fff; font-size: 1.4rem; }
.footer-head { color: #fff; font-weight: 700; margin-bottom: 10px; }
.site-footer ul { list-style: none; display: grid; gap: 6px; }
.footer-phone { font-size: 1.3rem; font-weight: 600; }
.site-footer .pending { color: #C5CDD5; border-color: #6B7684; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 40px; padding-top: 18px; border-top: 1px solid #36424F; font-size: 0.85rem; }
.footer-bottom p { margin: 0; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }

/* ---------- service pages */
.crumbs { padding-top: 18px; font-size: 0.88rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; color: var(--ink-2); }
.crumbs li + li::before { content: "/"; margin-inline: 6px; color: var(--line); }
.crumbs a { color: var(--ink-2); }
.svc-hero { padding: 24px 0 56px; }
.svc-hero-grid { display: grid; gap: 28px; align-items: center; }
.svc-hero-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--a1); color: var(--cobalt); margin-bottom: 14px; }
.svc-hero-icon .svc-icon { width: 42px; height: 42px; }
.svc-hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
.svc-hero-media { margin: 0; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 3; background: var(--a1); }
.svc-hero-media img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .svc-hero-grid { grid-template-columns: 6fr 5fr; gap: 56px; } }

.svc-section { padding: 64px 0; }
.svc-section-tint { background: var(--surface); border-block: 1px solid var(--line); }
.prose p { max-width: 38em; }
.prose-narrow { max-width: 760px; }
.about-grid { display: grid; gap: 32px; align-items: start; }
@media (min-width: 960px) { .about-grid { grid-template-columns: 1fr 1fr; gap: 56px; } }

/* schematic drawings */
.schematic-wrap { margin: 0; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.schematic { width: 100%; height: auto; direction: ltr; font-family: var(--font-body); }
.schematic .s-bone { fill: var(--a2); stroke: #B99B6E; stroke-width: 1.2; opacity: .9; }
.schematic .s-gum { fill: #E7A6AE; stroke: #C77A86; stroke-width: 1.2; opacity: .92; }
.schematic .s-gum-sore { fill: #D9707F; stroke: #B5485A; stroke-width: 1.2; opacity: .92; }
.schematic .s-tooth { fill: #FCFBF7; stroke: var(--ink); stroke-width: 1.6; }
.schematic .s-faded { opacity: .45; }
.schematic .s-metal { fill: #8B96A1; stroke: #4F5A66; stroke-width: 1.2; }
.schematic .s-metal-2 { fill: #B4BDC6; stroke: #4F5A66; stroke-width: 1.2; }
.schematic .s-thread { stroke: #4F5A66; stroke-width: 2; }
.schematic .s-crown { fill: #FCFBF7; stroke: var(--cobalt); stroke-width: 2; }
.schematic .s-crown-cap { fill: var(--cobalt-tint); stroke: var(--cobalt); stroke-width: 2; }
.schematic .s-stump { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-dasharray: 5 4; }
.schematic .s-sinus { fill: #DCE6F3; }
.schematic .s-graft { fill: var(--a35); opacity: .8; }
.schematic .s-membrane { fill: none; stroke: var(--gum); stroke-width: 3; }
.schematic .s-bone-line { stroke: #B99B6E; stroke-width: 1.5; fill: none; }
.schematic .s-denture { fill: #E7A6AE; stroke: #C77A86; stroke-width: 1.2; }
.schematic .s-housing { fill: #fff; stroke: var(--cobalt); stroke-width: 2; }
.schematic .s-arrow { fill: none; stroke: var(--cobalt); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.schematic .s-dentin { fill: var(--a1); stroke: var(--ink); stroke-width: 1.6; }
.schematic .s-enamel { fill: #FCFBF7; stroke: none; }
.schematic .s-pulp { fill: var(--gum-tint); stroke: var(--gum); stroke-width: 1.2; }
.schematic .s-pulp-clean { fill: #fff; stroke: var(--ink); stroke-width: 1.2; }
.schematic .s-gp { fill: none; stroke: #D98A55; stroke-width: 6; stroke-linecap: round; }
.schematic .s-lesion { fill: rgba(181, 72, 90, .18); stroke: var(--gum); stroke-width: 1.5; stroke-dasharray: 4 3; }
.schematic .s-filling { fill: var(--cobalt-tint); stroke: var(--cobalt); stroke-width: 1.6; }
.schematic .s-cavity { fill: none; stroke: var(--cobalt); stroke-width: 2; }
.schematic .s-c1 { fill: #F7F1E4; }
.schematic .s-c2 { fill: var(--a2); }
.schematic .s-c3 { fill: var(--a35); }
.schematic .s-light { stroke: var(--cobalt); stroke-width: 2; stroke-dasharray: 4 5; stroke-linecap: round; }
.schematic .s-pocket { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.schematic .s-calculus { fill: #A88B4E; stroke: #7C6533; stroke-width: 1; }
.schematic .s-dot { fill: var(--cobalt); }
.schematic .s-lead { fill: none; stroke: var(--cobalt); stroke-width: 1.2; }
.schematic .s-label { font-size: 15px; fill: var(--ink); font-weight: 500; }
.schematic .s-caption { font-size: 16px; fill: var(--ink); font-weight: 700; }

/* steps: a real sequence, so numbered */
.steps { list-style: none; counter-reset: step; display: grid; gap: 14px; margin-top: 24px; }
.steps li { counter-increment: step; position: relative; padding: 18px 20px 14px; padding-inline-start: 72px; background: var(--porcelain); border-radius: var(--r-md); }
.steps li::before {
  content: counter(step, persian); position: absolute; inset-inline-start: 18px; top: 16px;
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--cobalt); color: #fff; font-weight: 700; font-size: 1.05rem;
}
.step-title { font-size: 1.2rem; margin: 0 0 2px; }
.steps p:last-child { margin: 0; color: var(--ink-2); }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(5, 1fr); } .steps li { padding: 64px 18px 18px; } .steps li::before { top: 16px; } }

.cand-grid { display: grid; gap: 32px; align-items: start; }
@media (min-width: 900px) { .cand-grid { grid-template-columns: 7fr 5fr; gap: 56px; } }
.checklist { list-style: none; display: grid; gap: 10px; margin-top: 16px; }
.checklist li { position: relative; padding-inline-start: 34px; }
.checklist li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 0.45em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--cobalt-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%232747B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.caution { padding: 22px; border-radius: var(--r-md); background: var(--gum-tint); }
.caution h3 { font-size: 1.35rem; }
.caution p:last-child { margin: 0; }

/* price tables */
.notice { padding: 12px 16px; border-radius: var(--r-sm); background: var(--a1); border-inline-start: 4px solid var(--a35); font-size: 0.92rem; max-width: 52em; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.price-table { width: 100%; border-collapse: collapse; min-width: 480px; }
.price-table th, .price-table td { padding: 14px 18px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
.price-table thead th { font-size: 0.85rem; color: var(--ink-2); font-weight: 500; background: var(--porcelain); }
.price-table tbody th { font-weight: 600; }
.price-table tr:last-child > * { border-bottom: 0; }
.pt-note { color: var(--ink-2); font-size: 0.9rem; }
.pt-amount { white-space: nowrap; font-weight: 700; font-size: 1.05rem; }
.pt-amount span { font-weight: 400; font-size: 0.85rem; color: var(--ink-2); }
.price-table tr:target { background: var(--cobalt-tint); }
.price-table tr:target th { color: var(--cobalt-ink); }
.price-table.credits { font-size: 0.85rem; }
.price-table.credits td { word-break: break-word; }

/* cases: before/after compare slider */
.case-grid { display: grid; gap: 24px; margin-top: 16px; }
@media (min-width: 900px) { .case-grid { grid-template-columns: 1fr 1fr; } }
.compare { margin: 0; }
.compare-stage { position: relative; border-radius: var(--r-md); overflow: hidden; direction: ltr; aspect-ratio: 2 / 1; background: var(--a1); }
.compare-stage > img, .compare-before img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; pointer-events: none; }
.compare-handle::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7l-5 5 5 5M15 7l5 5-5 5' fill='none' stroke='%231D2733' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 22px no-repeat;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.compare-range:focus-visible + * { outline: none; }
.compare-stage:has(.compare-range:focus-visible) { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.compare-tag { position: absolute; top: 10px; padding: 2px 12px; border-radius: 999px; font-size: 0.82rem; font-weight: 700; pointer-events: none; }
.compare-tag-before { left: 10px; background: var(--porcelain); color: var(--ink); }
.compare-tag-after { right: 10px; background: var(--cobalt); color: #fff; }
.compare figcaption { margin-top: 8px; font-weight: 600; }
.gal-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 24px; }
.gal-item { margin: 0; border-radius: var(--r-md); overflow: hidden; }
.gal-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.other-svcs { list-style: none; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-top: 18px; }
.other-svcs a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--porcelain); text-decoration: none; color: var(--ink); font-weight: 500; line-height: 1.5; }
.other-svcs a:hover { border-color: var(--cobalt); color: var(--ink); }
.mini-icon { width: 30px; height: 30px; flex: none; color: var(--cobalt); }

/* doctor page */
.dr-hero { padding: 40px 0 64px; }
.dr-grid { display: grid; gap: 32px; align-items: start; }
.dr-photo { width: 220px; }
.dr-facts { display: grid; gap: 0; margin: 20px 0; border-top: 1px solid var(--line); max-width: 560px; }
.dr-facts div { display: grid; grid-template-columns: 11em 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.dr-facts dt { color: var(--ink-2); font-size: 0.92rem; }
.dr-facts dd { margin: 0; font-weight: 600; }
@media (max-width: 480px) { .dr-facts div { grid-template-columns: 1fr; gap: 0; } }
@media (min-width: 800px) { .dr-grid { grid-template-columns: auto 1fr; gap: 56px; } .dr-photo { width: 280px; border-radius: 140px 140px var(--r-md) var(--r-md); } }

/* prices page */
.price-toc ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 40px; }
.price-toc a { display: inline-block; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); font-size: 0.9rem; }
.price-toc a:hover { border-color: var(--cobalt); }
.price-block { margin-bottom: 48px; }
.price-block h2 { display: flex; align-items: center; gap: 10px; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.price-block h2 a { color: inherit; text-decoration: none; }
.price-block h2 a:hover { color: var(--cobalt); }

/* the header's backdrop-filter would make it the containing block of the fixed drawer */
.nav-open .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--porcelain); }

/* keep schematic labels legible on phones: scroll the drawing sideways instead of shrinking it */
@media (max-width: 600px) {
  .schematic-wrap { overflow-x: auto; padding: 12px; }
  .schematic { min-width: 520px; }
}

/* ======================================================= dynamic site additions */
.narrow { max-width: 720px; }
.h-sm { font-size: 1.5rem; margin-top: 32px; }
.small { font-size: 0.85rem; }
.nowrap { white-space: nowrap; }
.btn-sm { min-height: 36px; padding: 0.2em 0.9em; font-size: 0.85rem; }
.btn-danger { background: transparent; color: var(--gum); border-color: var(--gum); }
.btn-danger:hover { background: var(--gum); color: #fff; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--cobalt); cursor: pointer; text-decoration: underline; text-underline-offset: 0.3em; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 6px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-size: 0.92rem; }
.chip input:checked + span { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--cobalt); outline-offset: 2px; }

/* messages */
.toasts { display: grid; gap: 8px; padding-top: 16px; }
.toast { margin: 0; padding: 12px 16px; border-radius: var(--r-sm); background: var(--cobalt-tint); border-inline-start: 4px solid var(--cobalt); }
.toast-error { background: var(--gum-tint); border-color: var(--gum); }
.toast-warning { background: var(--a1); border-color: var(--a35); }

/* forms */
.stack-form { display: grid; gap: 16px; }
.field { display: grid; gap: 4px; }
.field label { font-size: 0.92rem; font-weight: 600; }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .field select, .field textarea,
.filter-fields input, .filter-fields select, .inline-form input, .inline-form select, .fs-table input:not([type="checkbox"]), .fs-table select {
  width: 100%; min-height: 46px; padding: 8px 12px; font: inherit; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-sm);
}
.field textarea { min-height: 90px; resize: vertical; line-height: 1.8; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--cobalt); outline: none; box-shadow: 0 0 0 3px var(--cobalt-tint); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--gum); }
.field-check label { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.field-check input { width: 20px; height: 20px; accent-color: var(--cobalt); }
.field ul { list-style: none; display: grid; gap: 4px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.field ul label { font-weight: 400; display: flex; gap: 6px; align-items: center; }
.field-help { font-size: 0.85rem; color: var(--ink-2); margin: 0; }
.req { color: var(--gum); }
.form-errors { padding: 12px 16px; background: var(--gum-tint); border-radius: var(--r-sm); color: var(--gum); }
.form-errors p { margin: 0; }
.check-inline { display: inline-flex; gap: 6px; align-items: center; font-size: 0.92rem; }
.check-inline input { width: 18px; height: 18px; accent-color: var(--cobalt); }
.auth-links { margin-top: 18px; font-size: 0.95rem; }
.auth-split { display: grid; gap: 16px; margin-top: 24px; }
.auth-box { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.auth-box h2 { font-size: 1.4rem; }
@media (min-width: 720px) { .auth-split { grid-template-columns: 1fr 1fr; } }
.summary-card { padding: 4px 22px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); margin: 18px 0 24px; }
.two-col { display: grid; gap: 20px; margin-top: 20px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } }
.card-form { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); align-content: start; }

/* patient area */
.tabs { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.tabs a { text-decoration: none; color: var(--ink-2); padding: 6px 0; }
.tabs a[aria-current="page"] { color: var(--cobalt); font-weight: 700; box-shadow: inset 0 -2px 0 var(--cobalt); }
.tabs form { margin-inline-start: auto; }
.appt-list { display: grid; gap: 12px; margin-top: 12px; }
.appt-card { display: grid; gap: 12px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.appt-card p { margin: 0; }
.appt-when { display: flex; flex-direction: column; }
.appt-day { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; line-height: 1.5; }
.appt-time { color: var(--cobalt); font-weight: 700; }
.appt-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (min-width: 800px) { .appt-card { grid-template-columns: 220px 1fr auto; align-items: center; } }
.badge { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; line-height: 1.7; white-space: nowrap; }
.badge-ok { background: #E1F1E7; color: #1E6B3C; }
.badge-warn { background: var(--a1); color: #7A5A1E; }
.badge-muted { background: #E8ECEF; color: #5C6773; }
.badge-info { background: var(--cobalt-tint); color: var(--cobalt-ink); }
.badge-bad { background: var(--gum-tint); color: var(--gum); }
.empty-state { padding: 28px; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-md); }
.empty-state p { color: var(--ink-2); }

/* booking widget extras */
.bk-doctors { border: 0; padding: 0; margin: 0 0 18px; }
.bk-doctors legend { font-weight: 600; margin-bottom: 8px; }
.bk-form .field { max-width: 520px; }
.booking-page { padding-top: 40px; }

/* doctors list */
.doc-cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-top: 24px; }
.doc-card { display: grid; gap: 6px; justify-items: start; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--ink); }
.doc-card:hover { border-color: var(--cobalt); color: var(--ink); }
.doc-teaser-grid + .doc-teaser-grid { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--line); }

/* FAQ */
.faq { padding: 72px 0; background: var(--surface); border-top: 1px solid var(--line); }
.faq-wrap { max-width: 860px; }
.faq-list { display: grid; gap: 10px; margin-top: 20px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--porcelain); }
.faq-item summary { cursor: pointer; padding: 16px 20px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--cobalt); font-size: 1.3rem; line-height: 1; }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 20px 14px; color: var(--ink-2); }
.visit-map .chip-row { margin-top: 4px; }
.schematic-wrap > img { width: 100%; height: auto; }
