@import url("https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800;900&display=swap");

:root {
  --font-main: "Vazirmatn", "Yekan Bakh", "IRANSansX", "IRANSans", "Segoe UI", Tahoma, Arial, sans-serif;
  color-scheme: dark;
  --brand: #405070;
  --brand-2: #526487;
  --brand-3: #2c3854;
  --ink: #111827;
  --deep: #172238;
  --clinical: #edf3f7;
  --paper: #f6f8fb;
  --soft: #dce4ee;
  --muted: #aab6c6;
  --line: rgba(246, 248, 251, 0.16);
  --glass: rgba(246, 248, 251, 0.08);
  --shadow: 0 22px 70px rgba(17, 24, 39, 0.22);
  --radius: 8px;
  --scroll: 0;
  --banner-p: 0;
}

* {
  box-sizing: border-box;
  font-family: var(--font-main) !important;
}

*::before,
*::after {
  font-family: var(--font-main) !important;
}

html {
  font-family: var(--font-main);
  overflow-x: clip;
}

/* scroll-behavior: smooth روی html باعث می‌شد هر اسکرول کاربر
   شناور و کند حس شود. حالا فقط پرش لنگرها (مثل #contact) نرم است
   و اسکرول عادی دست کاربر می‌ماند. */
:has(:target),
html:focus-within {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--clinical);
  color: var(--paper);
  font-family: var(--font-main);
  line-height: 1.8;
  overflow-x: clip;
}

body::selection {
  background: rgba(220, 228, 238, 0.24);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 90;
  height: 3px;
  background: rgba(246, 248, 251, 0.12);
}

.scroll-progress span {
  display: block;
  width: calc(var(--scroll) * 100%);
  height: 100%;
  background: linear-gradient(90deg, #ffffff, #9fb0c8, var(--brand));
}

.scroll-counter {
  position: fixed;
  left: 22px;
  bottom: 18px;
  z-index: 90;
  color: rgba(246, 248, 251, 0.62);
  font-family: var(--font-main);
  font-size: 12px;
  letter-spacing: 0.12em;
  pointer-events: none;
}

.site-header {
  position: fixed;
  top: 16px;
  right: 50%;
  z-index: 80;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: min(1120px, calc(100% - 32px));
  padding: 10px;
  border: 1px solid rgba(246, 248, 251, 0.16);
  border-radius: var(--radius);
  background: rgba(8, 13, 24, 0.62);
  box-shadow: 0 16px 54px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
  transform: translateX(50%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 2vw, 30px);
  color: rgba(246, 248, 251, 0.7);
  font-size: 0.92rem;
}

.header-cta,
.account-button,
.ghost-button,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-weight: 900;
  transition: transform 220ms ease, background 220ms ease, border-color 220ms ease;
}

.header-cta:hover,
.account-button:hover,
.ghost-button:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-button,
.ghost-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(246, 248, 251, 0.18);
  border-radius: var(--radius);
  background: rgba(246, 248, 251, 0.07);
  color: white;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.header-cta {
  min-height: 42px;
  padding: 0 16px;
  background: var(--paper);
  color: var(--brand);
}

/* ── هدر: اصلاحات اعتماد و دسترسی‌پذیری ─────────────────────────── */

/* لینک پرش برای کاربران کیبورد؛ فقط هنگام فوکوس دیده می‌شود */
.skip-link {
  position: fixed;
  top: -100px;
  right: 16px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--brand);
  font-weight: 900;
  transition: top 160ms ease;
}
.skip-link:focus {
  top: 16px;
}

/* هدف لمسی لینک‌های منو: قبلاً ۲۶×۲۶ با پدینگ صفر بود */
.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 4px;
  transition: color 200ms ease;
}
.nav-links a:hover {
  color: var(--paper);
}

/* نشانه صفحه فعال؛ قبلاً هیچ نشانه‌ای نبود */
.nav-links a.is-current {
  color: var(--paper);
  font-weight: 800;
}
.nav-links a.is-current::after {
  content: "";
  position: absolute;
  right: 4px;
  left: 4px;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

/* شماره تلفن به صورت متن؛ برای یک مجموعه پزشکی خودِ شماره سیگنال اعتماد است */
.header-phone {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  padding: 0 10px;
  line-height: 1.25;
  white-space: nowrap;
}
.header-phone-label {
  color: rgba(246, 248, 251, 0.6);
  font-size: 0.68rem;
  font-weight: 700;
}
.header-phone-number {
  font-size: 0.94rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}
.header-phone:hover .header-phone-number {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* حساب کاربری از حالت دکمه پررنگ به آیکون کم‌وزن تبدیل شد
   تا با CTA اصلی رقابت نکند */
.account-button {
  gap: 7px;
  padding: 0 12px;
  background: transparent;
  border-color: rgba(246, 248, 251, 0.14);
  font-weight: 700;
  color: rgba(246, 248, 251, 0.82);
}
.account-button:hover {
  background: rgba(246, 248, 251, 0.08);
  color: var(--paper);
}

/* فوکوس قابل دیدن روی همه عناصر تعاملی هدر */
.site-header a:focus-visible,
.site-header button:focus-visible,
.skip-link:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
  border-radius: 6px;
}

/* در عرض‌های میانی، برچسب حساب کاربری حذف و فقط آیکون می‌ماند */
@media (max-width: 1080px) {
  .account-button-text {
    display: none;
  }
  .account-button {
    padding: 0 10px;
  }
}

/* روی موبایل: تلفن و حساب کاربری داخل منوی کشویی می‌روند */
@media (max-width: 768px) {
  .header-phone,
  .account-button {
    display: none;
  }
}

.scroll-banner {
  position: relative;
  /* قبلاً 430vh بود: ۴.۳ صفحه اسکرول برای یک جمله.
     حالا ۲۰۰vh — هیرو در نگاه اول کامل دیده می‌شود و چهار مرحله
     در یک صفحه اسکرول (نه ۳.۳ صفحه) روایت می‌شوند. */
  min-height: 200vh;
  background: var(--deep);
}

@media (max-width: 768px) {
  /* روی موبایل اسکرول‌جکینگ اصلاً ارزشش را ندارد */
  .scroll-banner {
    min-height: 100svh;
  }
  .banner-stage {
    position: relative;
  }
}

.banner-stage {
  position: sticky;
  top: 0;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  align-items: center;
  padding: 126px max(24px, calc((100vw - 1120px) / 2)) 74px;
}

.banner-bg,
.banner-photo,
.banner-bg > * {
  position: absolute;
  inset: 0;
}

.banner-bg {
  z-index: -3;
  background: #172238;
}

.orb {
  width: 46vmax;
  height: 46vmax;
  margin: auto;
  border-radius: 50%;
  border: 1px solid rgba(246, 248, 251, 0.22);
  background: rgba(246, 248, 251, 0.035);
  transform: translate3d(var(--x, 0), var(--y, 0), 0) scale(var(--s, 1)) rotate(var(--r, 0deg));
  will-change: transform;
}

.orb-a {
  --x: calc((var(--banner-p) - 0.5) * -36vw);
  --y: calc((var(--banner-p) - 0.5) * 14vh);
  --s: calc(0.78 + var(--banner-p) * 1.45);
  --r: calc(var(--banner-p) * 220deg);
}

.orb-b {
  width: 30vmax;
  height: 30vmax;
  --x: calc((var(--banner-p) - 0.5) * 54vw);
  --y: calc((var(--banner-p) - 0.5) * -38vh);
  --s: calc(1.35 - var(--banner-p) * 0.55);
  --r: calc(var(--banner-p) * -280deg);
}

.orb-c {
  width: 18vmax;
  height: 18vmax;
  --x: calc((var(--banner-p) - 0.5) * -80vw);
  --y: calc((var(--banner-p) - 0.5) * -18vh);
  --s: calc(0.7 + var(--banner-p) * 0.9);
  --r: calc(var(--banner-p) * 380deg);
  background: rgba(246, 248, 251, 0.08);
}

.grid-plane {
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(246, 248, 251, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 248, 251, 0.18) 1px, transparent 1px);
  background-size: 72px 72px;
  transform: perspective(800px) rotateX(62deg) translateY(calc(var(--banner-p) * -22vh));
  transform-origin: bottom;
}

.three-scene {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  opacity: calc(0.2 + var(--banner-p) * 0.38);
  pointer-events: none;
}

.three-scene canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.css-3d-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(52vw, 500px);
  aspect-ratio: 1;
  border: 1px solid rgba(246, 248, 251, 0.22);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotateX(58deg) rotateZ(calc(var(--banner-p) * 180deg));
}

.banner-photo {
  display: none;
}

.banner-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.2) saturate(0.82) contrast(1.05) brightness(0.54);
}

.banner-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
}

.chapter-meta {
  position: absolute;
  top: 132px;
  left: max(24px, calc((100vw - 1120px) / 2));
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(246, 248, 251, 0.62);
  font-family: var(--font-main);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.chapter-meta strong {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(246, 248, 251, 0.2);
  border-radius: 50%;
  color: white;
}

.banner-copy {
  position: relative;
  z-index: 12;
  width: min(680px, calc(100% - 48px));
  margin-inline-start: 0;
  will-change: transform, opacity, filter;
  pointer-events: auto;
}

.banner-copy-main {
  opacity: calc(1 - clamp(0, (var(--banner-p) - 0.08) * 8, 1));
  transform: translate3d(calc(var(--banner-p) * -12vw), calc(var(--banner-p) * -12vh), 0)
    scale(calc(1 - var(--banner-p) * 0.22));
  filter: blur(calc(var(--banner-p) * 5px));
}

.banner-copy-chapter {
  position: absolute;
  right: max(24px, calc((100vw - 1120px) / 2));
  bottom: clamp(112px, 16vh, 170px);
  width: min(650px, calc(100% - 48px));
  padding: clamp(22px, 3vw, 38px);
  border: 1px solid rgba(246, 248, 251, 0.14);
  border-radius: var(--radius);
  background: rgba(23, 34, 56, 0.76);
  box-shadow: 0 28px 90px rgba(4, 10, 24, 0.38);
  backdrop-filter: blur(22px);
  opacity: calc(clamp(0, (var(--banner-p) - 0.2) * 7, 1));
  transform: translate3d(0, calc((0.42 - var(--banner-p)) * 18vh), 80px)
    scale(calc(0.88 + var(--banner-p) * 0.12));
}

.kicker,
.section-label {
  margin: 0 0 16px;
  color: #dbe5f1;
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 24px;
  color: white;
  font-size: clamp(3.2rem, 6vw, 6.6rem);
  line-height: 1.06;
  overflow-wrap: break-word;
}

h2 {
  font-size: clamp(2.2rem, 4.2vw, 4.6rem);
  line-height: 1.14;
  overflow-wrap: break-word;
}

h3 {
  font-size: 1.4rem;
}

.banner-copy p,
.section-block p {
  color: rgba(246, 248, 251, 0.7);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-button,
.secondary-button {
  min-height: 54px;
  padding: 0 24px;
}

.primary-button {
  background: var(--paper);
  color: var(--brand);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
}

.secondary-button {
  border: 1px solid rgba(246, 248, 251, 0.18);
  background: rgba(246, 248, 251, 0.07);
  color: white;
  backdrop-filter: blur(14px);
}

.logo-tile {
  position: absolute;
  z-index: 6;
  left: calc(50% - 76px);
  top: calc(50% - 76px);
  width: 152px;
  height: 152px;
  border: 1px solid rgba(246, 248, 251, 0.2);
  border-radius: 24px;
  box-shadow: 0 18px 54px rgba(17, 24, 39, 0.2);
  overflow: hidden;
  opacity: calc(1 - clamp(0, (var(--banner-p) - 0.68) * 4, 1));
  transform:
    translate3d(calc(-22vw + var(--banner-p) * 34vw), calc(-4vh + var(--banner-p) * 7vh), 0)
    rotate(calc(var(--banner-p) * -8deg))
    scale(calc(0.88 + var(--banner-p) * 0.22));
  will-change: transform, opacity;
}

.brand img,
.phone-top img {
  background: var(--brand);
}

.logo-tile {
  display: grid;
  place-items: center;
  background: var(--brand);
}

.logo-tile img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

.floating-panel,
.phone-card {
  position: absolute;
  z-index: 7;
  border: 1px solid rgba(246, 248, 251, 0.17);
  border-radius: var(--radius);
  background: rgba(246, 248, 251, 0.09);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  will-change: transform, opacity;
}

.floating-panel {
  width: min(280px, 72vw);
  padding: 22px;
}

.floating-panel span {
  color: #dbe5f1;
  font-family: var(--font-main);
  font-size: 2.4rem;
  font-weight: 900;
}

.floating-panel strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 1.28rem;
}

.floating-panel p {
  margin-bottom: 0;
  color: rgba(246, 248, 251, 0.66);
}

.panel-consult {
  right: auto;
  left: 5vw;
  top: 20vh;
  opacity: calc(clamp(0, (var(--banner-p) - 0.08) * 6, 1) - clamp(0, (var(--banner-p) - 0.32) * 7, 1));
  transform: translate3d(calc((0.24 - var(--banner-p)) * 30vw), calc((0.3 - var(--banner-p)) * 20vh), 0)
    rotate(calc((var(--banner-p) - 0.2) * -18deg));
}

.panel-services {
  left: 5vw;
  bottom: 12vh;
  opacity: calc(clamp(0, (var(--banner-p) - 0.34) * 6, 1) - clamp(0, (var(--banner-p) - 0.58) * 7, 1));
  transform: translate3d(calc((var(--banner-p) - 0.45) * -28vw), calc((0.48 - var(--banner-p)) * -18vh), 0)
    rotate(calc((var(--banner-p) - 0.45) * 14deg));
}

.panel-trust {
  right: auto;
  left: 5vw;
  bottom: 12vh;
  opacity: calc(clamp(0, (var(--banner-p) - 0.66) * 6, 1));
  transform: translate3d(calc((0.76 - var(--banner-p)) * 24vw), calc((0.72 - var(--banner-p)) * 20vh), 0)
    rotate(calc((var(--banner-p) - 0.72) * -12deg));
}

.phone-card {
  left: 5vw;
  top: 18vh;
  width: min(330px, 78vw);
  padding: 20px;
  opacity: calc(clamp(0, (var(--banner-p) - 0.48) * 6, 1) - clamp(0, (var(--banner-p) - 0.7) * 7, 1));
  transform: translate3d(calc((0.52 - var(--banner-p)) * -42vw), calc((var(--banner-p) - 0.5) * 10vh), 0)
    rotate(calc((var(--banner-p) - 0.5) * 10deg));
}

.phone-top {
  display: flex;
  align-items: center;
  gap: 12px;
  direction: ltr;
}

.phone-top img {
  width: 54px;
  height: 54px;
  border-radius: var(--radius);
}

.phone-top strong,
.phone-top span {
  display: block;
}

.phone-top span,
.phone-card li {
  color: rgba(246, 248, 251, 0.65);
}

.phone-card ul {
  display: grid;
  gap: 8px;
  margin: 22px 0;
  padding: 0;
  list-style: none;
}

.phone-card li {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(246, 248, 251, 0.08);
}

.phone-card a {
  direction: ltr;
  font-weight: 900;
}

.banner-ribbon {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 7;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px;
  width: min(920px, calc(100vw - 48px));
  padding: 14px 0;
  color: rgba(246, 248, 251, 0.72);
  font-weight: 900;
  transform: translateX(calc(-50% + (var(--banner-p) - 0.5) * 10vw));
}

.banner-ribbon span {
  padding: 9px 16px;
  border: 1px solid rgba(246, 248, 251, 0.18);
  border-radius: 999px;
  background: rgba(246, 248, 251, 0.06);
  white-space: nowrap;
}

.section-block {
  --depth-p: 0.5;
  padding: clamp(92px, 12vw, 160px) max(24px, calc((100vw - 1120px) / 2));
  background: #172238;
  position: relative;
  isolation: isolate;
  perspective: 1200px;
  transform-style: preserve-3d;
  overflow: clip;
}

.section-block::before {
  content: "";
  position: absolute;
  inset: -18% -8%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(142, 174, 214, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(142, 174, 214, 0.16) 1px, transparent 1px);
  background-size: 72px 72px;
  transform: perspective(900px) rotateX(68deg) translate3d(0, calc((var(--depth-p) - 0.5) * -110px), -80px);
  transform-origin: center bottom;
  will-change: transform;
}

.depth-section > :not(dialog) {
  transform: translate3d(0, calc((0.5 - var(--depth-p)) * 74px), calc((0.5 - var(--depth-p)) * 45px));
  transition: transform 120ms linear;
  transform-style: preserve-3d;
}

.depth-layer {
  --layer-p: 0.5;
  --layer-direction: 1;
  transform: perspective(1100px)
    translate3d(calc((0.5 - var(--layer-p)) * 46px * var(--layer-direction)), calc((0.5 - var(--layer-p)) * 110px), 70px)
    rotateY(calc((0.5 - var(--layer-p)) * 9deg * var(--layer-direction))) !important;
  transform-style: preserve-3d;
  will-change: transform;
}

.depth-card {
  --card-depth: 0.5;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --card-side: 1;
  opacity: 0;
  transform: perspective(1000px)
    translate3d(calc(110px * var(--card-side)), calc((0.5 - var(--card-depth)) * 130px), -130px)
    rotateX(calc((0.5 - var(--card-depth)) * 18deg + var(--tilt-x)))
    rotateY(calc(14deg * var(--card-side) + var(--tilt-y))) scale(0.86);
  transform-style: preserve-3d;
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 300ms ease;
  will-change: transform, opacity;
}

.depth-card.is-depth-visible {
  opacity: 1;
  transform: perspective(1000px)
    translate3d(calc((0.5 - var(--card-depth)) * 46px * var(--card-side)), calc((0.5 - var(--card-depth)) * 88px), 36px)
    rotateX(calc((0.5 - var(--card-depth)) * 12deg + var(--tilt-x)))
    rotateY(calc((0.5 - var(--card-depth)) * 10deg * var(--card-side) + var(--tilt-y))) scale(1);
}

.depth-card:hover {
  box-shadow: 0 34px 90px rgba(17, 24, 39, 0.24);
}

.finder {
  background: #172238;
}

.finder-heading {
  max-width: 820px;
  margin-bottom: 30px;
}

.finder-heading h2 {
  margin-bottom: 16px;
}

.text-link {
  display: inline-flex;
  margin-top: 12px;
  color: white;
  font-weight: 900;
}

.finder-controls {
  position: sticky;
  top: 92px;
  z-index: 30;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(246, 248, 251, 0.14);
  border-radius: var(--radius);
  background: rgba(23, 34, 56, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

label {
  display: grid;
  gap: 7px;
  color: rgba(246, 248, 251, 0.72);
  font-size: 0.85rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(246, 248, 251, 0.16);
  border-radius: var(--radius);
  background: rgba(246, 248, 251, 0.08);
  color: white;
  font: inherit;
  padding: 0 13px;
  outline: none;
}

textarea {
  min-height: 96px;
  padding-top: 12px;
  resize: vertical;
}

select option {
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(246, 248, 251, 0.48);
  box-shadow: 0 0 0 3px rgba(246, 248, 251, 0.1);
}

.doctor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0;
  color: rgba(246, 248, 251, 0.72);
  font-weight: 900;
}

.doctor-grid {
  display: grid;
  gap: 18px;
}

.doctor-match-stage {
  position: relative;
  min-height: 560px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: white;
  box-shadow: none;
}

.doctor-match-stage::before {
  content: none;
}

.doctor-portrait {
  display: grid;
  place-items: center;
  min-height: 260px;
  border-radius: var(--radius);
  background: var(--brand);
  color: white;
  overflow: hidden;
}

.doctor-portrait span {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  font-size: 2.4rem;
  font-weight: 900;
}

.doctor-portrait strong {
  margin-top: 12px;
  font-size: 1rem;
}

.match-copy span {
  color: var(--brand);
  font-weight: 900;
}

.match-copy h3 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
}

.match-copy p {
  color: var(--brand);
  font-weight: 800;
}

.doctor-carousel-track {
  position: relative;
  width: 100%;
  height: 560px;
  perspective: 1200px;
}

.match-slide {
  --slide-x: 0%;
  --slide-rotate: 0deg;
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(280px, 430px);
  align-items: end;
  gap: clamp(18px, 4vw, 48px);
  width: min(900px, 78vw);
  min-height: 440px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: white;
  box-shadow: none;
  text-align: right;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translate(calc(-50% + var(--slide-x)), -50%) scale(0.58) rotateY(var(--slide-rotate));
  transition:
    transform 760ms cubic-bezier(0.22, 0.78, 0.22, 1),
    opacity 480ms ease,
    filter 480ms ease,
    box-shadow 480ms ease;
  will-change: transform, opacity;
}

.match-slide.is-active {
  z-index: 5;
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1) rotateY(0);
  filter: none;
  box-shadow: none;
}

.match-slide.is-neighbor {
  z-index: 2;
  opacity: 0.34;
  pointer-events: auto;
  filter: blur(10px) saturate(0.55) brightness(0.72);
  transform: translate(calc(-50% + var(--slide-x)), -50%) scale(0.78) rotateY(var(--slide-rotate));
}

.match-slide.is-hidden {
  opacity: 0;
  transform: translate(calc(-50% + var(--slide-x)), -50%) scale(0.55);
}

.match-slide.is-repositioning {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: none !important;
}

.match-slide .doctor-portrait {
  min-height: 390px;
}

.match-slide .match-copy small {
  display: block;
  margin-top: 14px;
  color: rgba(246, 248, 251, 0.64);
  font-weight: 800;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(246, 248, 251, 0.2);
  border-radius: 50%;
  background: rgba(246, 248, 251, 0.08);
  color: white;
  font: inherit;
  font-size: 2rem;
  cursor: pointer;
  transform: translateY(-50%);
}

.carousel-prev {
  right: 16px;
}

.carousel-next {
  left: 16px;
}

.carousel-dots {
  position: absolute;
  right: 50%;
  bottom: 16px;
  z-index: 10;
  display: flex;
  gap: 7px;
  transform: translateX(50%);
}

.carousel-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(246, 248, 251, 0.24);
  transition: width 300ms ease, background 300ms ease;
}

.carousel-dots span.is-active {
  width: 24px;
  border-radius: 999px;
  background: white;
}

.match-slide .match-copy span,
.match-slide .match-copy p {
  color: rgba(246, 248, 251, 0.78);
}

.match-slide .match-copy h3 {
  color: white;
}

.doctor-profile-modal {
  width: min(1040px, calc(100% - 28px));
  max-height: min(88vh, 900px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: white;
  overflow: auto;
}

.doctor-profile-modal::backdrop {
  background: rgba(8, 13, 24, 0.78);
  backdrop-filter: blur(8px);
}

.doctor-modal-shell {
  position: relative;
  padding: 18px;
  background: #172238;
}

.doctor-modal-content .doctor-profile {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.doctor-profile {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid rgba(246, 248, 251, 0.15);
  border-radius: var(--radius);
  background: rgba(246, 248, 251, 0.08);
  box-shadow: var(--shadow);
}

.profile-copy h3 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.profile-tags span {
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(246, 248, 251, 0.09);
  color: rgba(246, 248, 251, 0.76);
  font-size: 0.84rem;
  font-weight: 800;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  grid-column: 1 / -1;
}

.profile-stats div {
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid rgba(246, 248, 251, 0.12);
  border-radius: var(--radius);
  background: rgba(246, 248, 251, 0.07);
}

.profile-stats strong {
  color: white;
  font-size: 1.6rem;
  font-weight: 900;
}

.profile-stats span {
  color: rgba(246, 248, 251, 0.64);
  font-size: 0.86rem;
  font-weight: 800;
}

.doctor-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.doctor-stats > * {
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(246, 248, 251, 0.12);
  border-radius: var(--radius);
  background: rgba(246, 248, 251, 0.07);
  color: rgba(246, 248, 251, 0.84);
  font-size: 0.9rem;
  font-weight: 900;
}

.doctor-meta,
.doctor-tags,
.doctor-actions,
.comment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.clinic-details,
.patient-opinions {
  grid-column: 1 / -1;
}

.clinic-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.clinic-details > div,
.google-rating-link {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(246, 248, 251, 0.12);
  border-radius: var(--radius);
  background: rgba(246, 248, 251, 0.06);
}

.clinic-details span {
  color: rgba(246, 248, 251, 0.6);
  font-size: 0.82rem;
}

.clinic-details strong,
.clinic-details a {
  color: white;
}

.google-rating-link {
  grid-column: 1 / -1;
  border-color: rgba(255, 204, 74, 0.32);
  background: rgba(255, 204, 74, 0.08);
}

.patient-opinions h4 {
  margin: 6px 0 12px;
  font-size: 1.15rem;
}

.doctor-meta span,
.doctor-tags span,
.comment-list span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(246, 248, 251, 0.09);
  color: rgba(246, 248, 251, 0.72);
  font-size: 0.8rem;
  font-weight: 800;
}

.doctor-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.doctor-actions .primary-button,
.doctor-actions .secondary-button {
  min-height: 48px;
  padding: 0 14px;
  font-size: 0.9rem;
}

.comment-box {
  display: none;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(246, 248, 251, 0.12);
}

.comment-box.is-open {
  display: grid;
}

.comment-guidance,
.comment-status {
  color: rgba(246, 248, 251, 0.64);
  font-size: 0.82rem;
  font-weight: 700;
}

.comment-status:not(:empty) {
  padding: 9px 11px;
  border-radius: var(--radius);
  background: rgba(246, 248, 251, 0.08);
  color: #dbe5f1;
}

.worked-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(246, 248, 251, 0.78);
  font-size: 0.88rem;
}

.worked-check input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--brand);
}

.comment-submit {
  min-height: 46px;
  border: 0;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--brand);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 32px;
  border: 1px dashed rgba(246, 248, 251, 0.24);
  border-radius: var(--radius);
  color: rgba(246, 248, 251, 0.72);
  text-align: center;
}

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 7vw, 88px);
  align-items: end;
}

.two-col > *,
.service-grid > *,
.process-line > * {
  min-width: 0;
}

.service-section {
  background: #f6f8fb;
  color: var(--ink);
}

.service-section .section-label,
.service-section p {
  color: var(--brand);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.service-card,
.process-line article,
.contact-card {
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(17, 24, 39, 0.14);
}

.service-card {
  min-height: 330px;
  padding: 28px;
  background: white;
  border: 1px solid rgba(64, 80, 112, 0.14);
}

.service-card span,
.process-line span {
  color: var(--brand);
  font-family: var(--font-main);
  font-size: 2.6rem;
  font-weight: 900;
}

.process {
  background: #edf3f7;
  color: var(--ink);
}

.process .section-label,
.process p {
  color: var(--brand);
}

.process-line {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 0;
  padding: 34px 0 18px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.process-line::before {
  content: "";
  position: absolute;
  top: 77px;
  right: 8.33%;
  left: 8.33%;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(to left, var(--brand) 0 24%, rgba(64, 80, 112, 0.18) 24% 100%);
}

.process-intro {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(24px, 7vw, 80px);
  align-items: end;
  margin-bottom: 38px;
}

.process-intro h2 {
  margin-bottom: 0;
}

.process-line article {
  position: relative;
  z-index: 1;
  min-height: 260px;
  padding: 0 14px 24px;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.process-line article:nth-child(even) {
  padding-top: 52px;
}

.process-line article > span {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 0 auto 24px;
  border: 4px solid #edf3f7;
  border-radius: 50%;
  background: #dce4eb;
  color: rgba(64, 80, 112, 0.58);
  box-shadow: 0 0 0 2px rgba(64, 80, 112, 0.16), 0 14px 36px rgba(17, 24, 39, 0.12);
  font-size: 1.8rem;
}

.process-line article.is-complete > span {
  background: var(--brand);
  color: white;
}

.process-line article.is-current > span {
  background: white;
  color: var(--brand);
  box-shadow: 0 0 0 8px rgba(64, 80, 112, 0.14), 0 18px 46px rgba(17, 24, 39, 0.2);
}

.process-line article.is-current::after {
  content: "مرحله فعلی";
  display: inline-block;
  margin-top: 12px;
  padding: 6px 10px;
  border-radius: 99px;
  background: var(--brand);
  color: white;
  font-size: 0.72rem;
  font-weight: 900;
}

.care-promise {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 22px;
  align-items: center;
  margin-top: 18px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(64, 80, 112, 0.18);
  border-radius: var(--radius);
  background: var(--brand);
  color: white;
  box-shadow: 0 28px 80px rgba(17, 24, 39, 0.2);
}

.care-promise strong {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.care-promise p {
  margin: 0;
  color: rgba(246, 248, 251, 0.72);
}

/* Scroll-driven care journey */
.process.section-block {
  --journey-progress: 0;
  --journey-scene-opacity: 1;
  min-height: 460vh;
  padding: 0;
  background: #edf3f7;
  overflow: visible;
}

.process.depth-section > :not(dialog) {
  transform: none;
}

.process-sticky {
  position: sticky;
  top: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  padding: 104px max(24px, calc((100vw - 1120px) / 2)) 34px;
  overflow: hidden;
  perspective: 1200px;
}

.process-header {
  position: relative;
  z-index: 12;
}

.process .process-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.75fr);
  gap: clamp(24px, 7vw, 80px);
  align-items: end;
  margin: 0;
}

.process .process-intro h2 {
  max-width: 760px;
  font-size: clamp(2rem, 4vw, 4.4rem);
}

.process .process-line {
  position: relative;
  width: 100%;
  height: min(390px, 48vh);
  display: block;
  padding: 0;
  overflow: visible;
  transform-style: preserve-3d;
  opacity: var(--journey-scene-opacity);
}

.process .process-line::before {
  content: none;
}

.process .process-line article,
.process .process-line article:nth-child(even) {
  --journey-x: 0px;
  --journey-y: 0px;
  --journey-z: 0px;
  --journey-rotate: 0deg;
  --journey-opacity: 0;
  --journey-blur: 0px;
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: min(480px, calc(100vw - 64px));
  min-height: 280px;
  display: grid;
  align-content: center;
  justify-items: start;
  padding: clamp(26px, 4vw, 44px);
  border: 1px solid rgba(64, 80, 112, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 34px 90px rgba(17, 24, 39, 0.16);
  opacity: var(--journey-opacity);
  filter: blur(var(--journey-blur));
  text-align: right;
  pointer-events: none;
  transform: translate3d(calc(-50% + var(--journey-x)), calc(-50% + var(--journey-y)), var(--journey-z))
    rotateY(var(--journey-rotate));
  transform-style: preserve-3d;
  transition: opacity 180ms linear, filter 180ms linear, box-shadow 220ms ease;
  will-change: transform, opacity, filter;
}

.process .process-line article.is-current {
  z-index: 8;
  background: #fff;
  pointer-events: auto;
  box-shadow: 0 42px 110px rgba(17, 24, 39, 0.24);
}

.process .process-line article > span {
  width: 68px;
  height: 68px;
  margin: 0 0 22px;
  border: 0;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  box-shadow: 0 0 0 9px rgba(64, 80, 112, 0.1);
  font-size: 1.5rem;
}

.process .process-line article > small {
  position: absolute;
  top: 34px;
  left: 34px;
  color: var(--brand);
  font-family: var(--font-main);
  font-size: 0.74rem;
  font-weight: 900;
}

.process .process-line article h3 {
  margin-bottom: 12px;
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
}

.process .process-line article p {
  margin-bottom: 0;
  line-height: 1.9;
}

.process .process-line article.is-current::after {
  content: none;
}

.journey-rail {
  position: relative;
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: center;
  width: min(760px, 100%);
  margin: 0 auto;
  opacity: var(--journey-scene-opacity);
  transition: opacity 160ms linear;
}

.journey-rail::before,
.journey-rail-fill {
  content: "";
  position: absolute;
  right: 8%;
  left: 8%;
  top: 50%;
  height: 4px;
  border-radius: 99px;
  background: #cfd8e1;
  transform: translateY(-50%);
}

.journey-rail-fill {
  z-index: 1;
  left: auto;
  width: calc(84% * var(--journey-progress));
  background: var(--brand);
  transition: width 100ms linear;
}

.journey-rail span {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin: auto;
  border: 4px solid #edf3f7;
  border-radius: 50%;
  background: #cfd8e1;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 900;
}

.journey-rail span.is-complete,
.journey-rail span.is-current {
  background: var(--brand);
  color: white;
}

.journey-rail span.is-current {
  box-shadow: 0 0 0 7px rgba(64, 80, 112, 0.14);
}

.process .care-promise {
  position: absolute;
  right: max(24px, calc((100vw - 1120px) / 2));
  bottom: 94px;
  left: max(24px, calc((100vw - 1120px) / 2));
  z-index: 20;
  margin: 0;
  opacity: clamp(0, calc((var(--journey-progress) - 0.86) * 8), 1);
  pointer-events: none;
  transform: translateY(calc((1 - var(--journey-progress)) * 70px));
  transition: opacity 160ms linear;
}

.process .care-promise a {
  pointer-events: auto;
}

/* Dedicated customer dashboard */
.customer-dashboard {
  min-height: 100vh;
  background: #edf3f7;
  color: var(--ink);
}

.dashboard-sidebar {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: 250px;
  padding: 24px 18px;
  background: #121b2e;
  color: white;
}

.dashboard-sidebar .brand {
  margin-bottom: 44px;
}

.dashboard-sidebar nav {
  display: grid;
  gap: 6px;
}

.dashboard-sidebar nav a,
.dashboard-sidebar-footer > * {
  width: 100%;
  padding: 13px 14px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: rgba(246, 248, 251, 0.66);
  font: inherit;
  font-weight: 800;
  text-align: right;
  cursor: pointer;
}

.dashboard-sidebar nav a:hover,
.dashboard-sidebar nav a.is-active {
  background: rgba(246, 248, 251, 0.09);
  color: white;
}

.dashboard-sidebar-footer {
  display: grid;
  gap: 4px;
  margin-top: auto;
}

.dashboard-main {
  width: calc(100% - 250px);
  margin-right: 250px;
  padding: 24px clamp(20px, 4vw, 58px) 80px;
}

.dashboard-topbar,
.dashboard-welcome,
.panel-heading,
.dashboard-support {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.dashboard-topbar {
  min-height: 64px;
}

.dashboard-topbar span,
.dashboard-topbar strong {
  display: block;
}

.dashboard-topbar span {
  color: var(--brand);
  font-size: 0.78rem;
}

.dashboard-welcome {
  min-height: 330px;
  margin: 24px 0;
  padding: clamp(28px, 5vw, 58px);
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, rgba(18, 27, 46, 0.96), rgba(64, 80, 112, 0.9)),
    #172238;
  color: white;
}

.dashboard-welcome h1 {
  max-width: 720px;
  margin-bottom: 16px;
  font-size: clamp(2.3rem, 5vw, 4.8rem);
}

.dashboard-welcome > div > p:last-child {
  color: rgba(246, 248, 251, 0.68);
}

.dashboard-score {
  flex: 0 0 180px;
  display: grid;
  gap: 6px;
  padding: 24px;
  border: 1px solid rgba(246, 248, 251, 0.16);
  border-radius: var(--radius);
  background: rgba(246, 248, 251, 0.08);
}

.dashboard-score strong {
  font-size: 3rem;
}

.dashboard-panel {
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid rgba(64, 80, 112, 0.14);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 20px 70px rgba(17, 24, 39, 0.08);
}

.dashboard-panel,
.dashboard-support {
  opacity: 0;
  transform: translateY(38px) rotateX(5deg);
  transition: opacity 650ms ease, transform 650ms ease;
}

.dashboard-panel.is-visible,
.dashboard-support.is-visible {
  opacity: 1;
  transform: none;
}

.panel-heading {
  align-items: flex-start;
  margin-bottom: 22px;
}

.panel-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.5rem);
}

.status-badge {
  padding: 8px 12px;
  border-radius: 99px;
  background: #e8f3ec;
  color: #23633a;
  font-size: 0.78rem;
  font-weight: 900;
}

.dashboard-roadmap {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  padding-top: 34px;
}

.journey-progress {
  position: absolute;
  top: 58px;
  right: 7%;
  left: 7%;
  height: 5px;
  background: #dfe5eb;
}

.journey-progress span {
  display: block;
  width: 24%;
  height: 100%;
  background: var(--brand);
}

.dashboard-roadmap article {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.dashboard-roadmap article > span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 5px solid white;
  border-radius: 50%;
  background: #dfe5eb;
  color: var(--brand);
  box-shadow: 0 0 0 1px #d6dde5;
  font-weight: 900;
}

.dashboard-roadmap .is-complete > span,
.dashboard-roadmap .is-current > span {
  background: var(--brand);
  color: white;
}

.dashboard-roadmap .is-current > span {
  box-shadow: 0 0 0 7px rgba(64, 80, 112, 0.12);
}

.dashboard-roadmap small {
  color: var(--brand);
}

.dashboard-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 18px 0;
}

.doctor-avatar,
.calendar-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  font-size: 1.4rem;
  font-weight: 900;
}

.dashboard-doctor-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0;
}

.dashboard-doctor-meta span {
  padding: 8px 10px;
  border-radius: var(--radius);
  background: #edf3f7;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 800;
}

.dashboard-history {
  display: grid;
  gap: 10px;
}

.dashboard-history article,
.dashboard-empty {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-radius: var(--radius);
  background: #edf3f7;
}

.dashboard-history span,
.dashboard-empty span {
  display: block;
  margin-top: 5px;
  color: var(--brand);
}

.dashboard-support {
  margin-top: 18px;
  padding: clamp(28px, 5vw, 52px);
  border-radius: var(--radius);
  background: var(--brand);
  color: white;
}

.dashboard-support p {
  color: rgba(246, 248, 251, 0.68);
}

.support-actions {
  display: flex;
  gap: 10px;
}

.dashboard-mobile-nav {
  display: none;
}

.doctors-page {
  background: #172238;
}

.doctors-page-hero {
  min-height: 72svh;
  display: grid;
  align-content: end;
  padding: 160px max(24px, calc((100vw - 1120px) / 2)) 86px;
  background:
    radial-gradient(circle at 20% 30%, rgba(105, 130, 176, 0.22), transparent 34%),
    #172238;
}

.doctors-page-hero h1 {
  width: min(920px, 100%);
  font-size: clamp(3rem, 7vw, 6.8rem);
}

.doctors-page-hero > p:not(.section-label) {
  width: min(680px, 100%);
  color: rgba(246, 248, 251, 0.7);
  font-size: 1.1rem;
}

.data-note {
  display: block;
  width: min(760px, 100%);
  margin-top: 16px;
  color: rgba(246, 248, 251, 0.48);
}

.doctors-directory {
  display: grid;
  gap: clamp(70px, 10vw, 130px);
  padding: 90px max(24px, calc((100vw - 1120px) / 2)) 150px;
  perspective: 1300px;
}

.directory-doctor {
  --page-depth: 0.5;
  --side: 1;
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) 1.22fr;
  gap: clamp(28px, 6vw, 70px);
  align-items: stretch;
  opacity: 0;
  transform: translate3d(calc(120px * var(--side)), 100px, -180px) rotateY(calc(14deg * var(--side))) scale(0.9);
  transform-style: preserve-3d;
  transition: opacity 700ms ease, transform 850ms cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
}

.directory-doctor:focus-visible {
  outline: 3px solid #dbe5f1;
  outline-offset: 10px;
}

.directory-doctor.is-visible {
  opacity: 1;
  transform: translate3d(calc((0.5 - var(--page-depth)) * 55px * var(--side)), calc((0.5 - var(--page-depth)) * 80px), 0)
    rotateX(calc((0.5 - var(--page-depth)) * 8deg)) rotateY(calc((0.5 - var(--page-depth)) * 9deg * var(--side)));
}

.directory-portrait {
  min-height: 500px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  border-radius: var(--radius);
  background: #536789;
  box-shadow: 0 34px 100px rgba(5, 11, 24, 0.34);
}

.directory-portrait span {
  display: grid;
  place-items: center;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  font-size: 3rem;
  font-weight: 900;
}

.directory-copy {
  padding: clamp(26px, 5vw, 52px);
  border: 1px solid rgba(246, 248, 251, 0.14);
  border-radius: var(--radius);
  background: rgba(246, 248, 251, 0.07);
}

.directory-copy h2 {
  margin-bottom: 18px;
}

.directory-copy > p:not(.section-label),
.directory-address,
.directory-copy blockquote {
  color: rgba(246, 248, 251, 0.7);
}

/* Imported clinic content, adapted to the Yana system. */
.imported-section-head {
  max-width: 850px;
  margin-bottom: 42px;
}

.imported-section-head h2,
.content-about-grid h2 {
  margin-bottom: 18px;
}

.content-about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 7vw, 88px);
  align-items: start;
}

.about-feature-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-feature-list li {
  position: relative;
  padding: 15px 52px 15px 16px;
  border: 1px solid rgba(246, 248, 251, 0.13);
  border-radius: var(--radius);
  background: rgba(246, 248, 251, 0.06);
  color: rgba(246, 248, 251, 0.82);
  font-weight: 800;
}

.about-feature-list li::before {
  content: "✓";
  position: absolute;
  right: 16px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #dbe5f1;
  color: var(--brand);
  transform: translateY(-50%);
}

.source-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 44px;
  align-items: stretch;
  transform-style: flat !important;
}

.source-stats > div {
  --stats-y: 58px;
  --stats-rotate: 5deg;
  --stats-scale: 0.95;
  --stats-opacity: 0.45;
  position: relative;
  z-index: 0;
  min-width: 0;
  display: grid;
  gap: 4px;
  min-height: 138px;
  align-content: center;
  padding: 22px;
  border: 1px solid rgba(246, 248, 251, 0.14);
  border-radius: var(--radius);
  background: rgba(246, 248, 251, 0.07);
  opacity: var(--stats-opacity) !important;
  transform: perspective(900px) translate3d(0, var(--stats-y), 0)
    rotateX(var(--stats-rotate)) scale(var(--stats-scale)) !important;
  transform-origin: center center;
  transition: opacity 90ms linear, transform 90ms linear !important;
  will-change: transform, opacity;
}

.source-stats strong {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.source-stats span {
  color: rgba(246, 248, 251, 0.62);
}

.expanded-services {
  grid-template-columns: repeat(4, 1fr);
}

.expanded-services .service-card {
  min-height: 280px;
}

.portfolio-section {
  background: #172238;
}

.portfolio-data-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: stretch;
  transform-style: flat !important;
}

.portfolio-data-grid figure {
  --portfolio-y: 64px;
  --portfolio-rotate: 5deg;
  --portfolio-scale: 0.95;
  --portfolio-opacity: 0.42;
  position: relative;
  z-index: 0;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(246, 248, 251, 0.13);
  border-radius: var(--radius);
  background: rgba(246, 248, 251, 0.06);
  box-shadow: 0 24px 70px rgba(4, 10, 24, 0.2);
  transform-origin: center center;
  opacity: var(--portfolio-opacity) !important;
  transform: perspective(900px) translate3d(0, var(--portfolio-y), 0)
    rotateX(var(--portfolio-rotate)) scale(var(--portfolio-scale)) !important;
  transition: opacity 90ms linear, transform 90ms linear !important;
  will-change: transform, opacity;
}

.portfolio-data-media {
  min-height: 280px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(246, 248, 251, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 248, 251, 0.08) 1px, transparent 1px),
    #273653;
  background-size: 36px 36px;
}

.portfolio-data-media span {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 1px solid rgba(246, 248, 251, 0.24);
  border-radius: 50%;
  font-size: 2rem;
  font-weight: 900;
}

.portfolio-data-grid figcaption {
  padding: 18px;
  font-weight: 900;
}

.gallery-source-note {
  margin: 20px 0 0;
  font-size: 0.82rem !important;
  opacity: 0.62;
}

.articles-section {
  background: #f6f8fb;
  color: var(--ink);
}

.articles-section .section-label,
.articles-section p {
  color: var(--brand);
}

.article-data-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.article-data-grid article {
  min-height: 320px;
  display: grid;
  align-content: end;
  padding: 28px;
  border: 1px solid rgba(64, 80, 112, 0.14);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.1);
}

.article-data-grid article > span {
  margin-bottom: auto;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 900;
}

.article-data-grid h3 {
  margin: 36px 0 12px;
  font-size: 1.45rem;
}

.faq-section {
  background: #edf3f7;
  color: var(--ink);
}

.faq-section .section-label,
.faq-section p {
  color: var(--brand);
}

.faq-data-list {
  width: min(900px, 100%);
  margin: 0 auto;
}

.faq-data-list details {
  border-bottom: 1px solid rgba(64, 80, 112, 0.18);
  background: rgba(255, 255, 255, 0.56);
}

.faq-data-list summary {
  position: relative;
  padding: 24px 24px 24px 64px;
  cursor: pointer;
  list-style: none;
  font-size: 1.08rem;
  font-weight: 900;
}

.faq-data-list summary::-webkit-details-marker {
  display: none;
}

.faq-data-list summary::after {
  content: "+";
  position: absolute;
  left: 24px;
  top: 50%;
  font-size: 1.6rem;
  transform: translateY(-50%);
}

.faq-data-list details[open] summary::after {
  content: "−";
}

.faq-data-list details p {
  margin: 0;
  padding: 0 24px 24px;
  line-height: 2;
}

.directory-profile-modal {
  width: min(1080px, calc(100% - 28px));
  max-height: min(90vh, 920px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: white;
  overflow: auto;
}

.directory-profile-modal::backdrop {
  background: rgba(8, 13, 24, 0.82);
  backdrop-filter: blur(10px);
}

.directory-modal-shell {
  position: relative;
  padding: 52px 18px 18px;
  background: #172238;
}

.directory-modal-content {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) 1.28fr;
  gap: 18px;
}

.directory-modal-content .directory-portrait {
  min-height: 100%;
}

.directory-modal-content .directory-copy {
  background: rgba(246, 248, 251, 0.07);
}

.directory-modal-content .directory-doctor {
  transform: none;
}

.directory-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.directory-facts span {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgba(246, 248, 251, 0.08);
}

.directory-copy blockquote {
  margin: 24px 0;
  padding: 18px;
  border-right: 3px solid #dbe5f1;
  background: rgba(246, 248, 251, 0.05);
}

.contact {
  background: #172238;
}

.contact-card {
  width: min(820px, 100%);
  margin-right: auto;
  padding: clamp(32px, 6vw, 66px);
  background: rgba(246, 248, 251, 0.08);
  border: 1px solid rgba(246, 248, 251, 0.16);
  backdrop-filter: blur(18px);
}

.site-footer {
  padding: 56px max(24px, calc((100vw - 1120px) / 2)) 100px;
  color: rgba(246, 248, 251, 0.62);
  background: var(--deep);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr 1fr;
  gap: 40px 28px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(246, 248, 251, 0.12);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.footer-col h3 {
  margin-bottom: 4px;
  color: var(--paper);
  font-size: 0.95rem;
  font-weight: 900;
}

.footer-col a {
  color: inherit;
  transition: color 200ms ease;
}

.footer-col a:hover {
  color: var(--paper);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-brand-col .brand {
  color: var(--paper);
  font-size: 1.05rem;
}

.footer-brand-col p {
  max-width: 34ch;
  line-height: 1.9;
}

.footer-phone {
  color: var(--paper) !important;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.footer-col address {
  font-style: normal;
  line-height: 1.8;
}

.footer-hours {
  font-size: 0.85rem;
}

/* جای‌نگهدار مجوزها — پس از دریافت با تصویر واقعی جایگزین شود */
.footer-badge-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 62px;
  padding: 8px 12px;
  border: 1px dashed rgba(246, 248, 251, 0.22);
  border-radius: var(--radius);
  color: rgba(246, 248, 251, 0.45);
  font-size: 0.78rem;
  text-align: center;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 24px;
  font-size: 0.82rem;
}

.footer-disclaimer {
  max-width: 60ch;
  color: rgba(246, 248, 251, 0.48);
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand-col {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .site-footer {
    padding-bottom: 110px;
  }
}

/* کارت‌های خدمات و مقالات: قبلاً بن‌بست بودند و هیچ لینکی نداشتند */
.service-card,
.article-card {
  color: inherit;
}

.service-card-cta,
.article-card-cta {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent, #6f8fd8);
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 800;
  opacity: 0.9;
  transition: transform 200ms ease;
}

.service-card:hover .service-card-cta,
.article-card:hover .article-card-cta {
  transform: translateX(-4px);
  opacity: 1;
}

/* لینک «مشاهده همه مقالات» زیر گرید مقالات هوم‌پیج */
.section-footer-link {
  margin-top: 20px;
  text-align: center;
}

.mobile-action-bar {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 95;
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(246, 248, 251, 0.16);
  border-radius: 14px;
  background: rgba(8, 13, 24, 0.84);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.mobile-action-bar a,
.mobile-action-bar button {
  display: grid;
  place-items: center;
  min-height: 46px;
  border: 0;
  border-radius: var(--radius);
  background: rgba(246, 248, 251, 0.09);
  color: white;
  font: inherit;
  font-weight: 900;
}

.mobile-action-bar a:last-child {
  background: var(--paper);
  color: var(--brand);
}

.account-modal {
  width: min(560px, calc(100% - 28px));
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  background: transparent;
  color: white;
}

.account-modal::backdrop {
  background: rgba(8, 13, 24, 0.76);
  backdrop-filter: blur(8px);
}

.account-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: clamp(22px, 5vw, 34px);
  border: 1px solid rgba(246, 248, 251, 0.18);
  border-radius: var(--radius);
  background: #111827;
  box-shadow: var(--shadow);
}

.account-card h2 {
  font-size: clamp(1.8rem, 5vw, 2.7rem);
}

.auth-mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 34px;
  padding: 4px;
  border: 1px solid rgba(246, 248, 251, 0.16);
  border-radius: var(--radius);
  background: rgba(246, 248, 251, 0.05);
}

.auth-mode-toggle button {
  min-height: 44px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: rgba(246, 248, 251, 0.62);
  font-weight: 900;
  cursor: pointer;
}

.auth-mode-toggle button.is-active {
  background: var(--paper);
  color: var(--brand);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.account-card [data-auth-signup][hidden] {
  display: none;
}

.account-card input[dir="ltr"] {
  text-align: left;
}

.modal-close {
  position: absolute;
  top: 12px;
  left: 12px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(246, 248, 251, 0.1);
  color: white;
  font-size: 1.6rem;
  cursor: pointer;
}

#accountStatus {
  min-height: 20px;
  color: #dbe5f1;
  font-weight: 800;
}

[data-reveal-card]:not(.depth-card) {
  opacity: 0;
  transform: translateY(60px) scale(0.96);
  transition: opacity 780ms ease, transform 780ms ease;
}

[data-reveal-card]:not(.depth-card).is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@supports not (opacity: calc(clamp(0, 1, 1))) {
  .banner-copy-main,
  .banner-copy-chapter,
  .floating-panel,
  .phone-card {
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav-links,
  .chapter-meta {
    display: none;
  }

  .account-button {
    display: none;
  }

  .scroll-banner {
    min-height: auto;
  }

  .banner-stage {
    position: relative;
    min-height: auto;
    padding-top: 118px;
    display: block;
  }

  .banner-copy-main,
  .banner-copy-chapter,
  .logo-tile,
  .floating-panel,
  .phone-card,
  .banner-ribbon,
  .banner-photo,
  .orb,
  .grid-plane {
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
  }

  .banner-copy-main,
  .banner-copy-chapter,
  .phone-card,
  .floating-panel,
  .logo-tile {
    position: relative;
    inset: auto;
    margin: 0 0 18px;
  }

  .banner-copy {
    width: 100%;
    margin-inline-start: 0;
  }

  .logo-tile {
    width: 108px;
    height: 108px;
    border-radius: 18px;
  }

  .banner-ribbon {
    display: none;
  }

  .two-col,
  .service-grid,
  .process-line,
  .finder-controls,
  .doctor-grid {
    grid-template-columns: 1fr;
  }

  .finder-controls {
    position: relative;
    top: auto;
  }

  .doctor-profile,
  .profile-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .scroll-counter {
    display: none;
  }

  .site-header {
    top: 10px;
    width: calc(100% - 20px);
  }

  .brand span {
    display: none;
  }

  .header-cta {
    min-height: 40px;
    padding: 0 12px;
    font-size: 0.86rem;
  }

  body {
    padding-bottom: 76px;
  }

  .site-header {
    padding: 8px;
  }

  .brand img {
    width: 40px;
    height: 40px;
  }

  .mobile-action-bar {
    display: grid;
  }

  .doctor-actions {
    grid-template-columns: 1fr;
  }

  .doctor-portrait {
    min-height: 220px;
  }

  .match-copy h3 {
    font-size: 2.1rem;
  }

  .doctor-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .doctor-toolbar .ghost-button {
    width: 100%;
  }

  .doctor-stats {
    grid-template-columns: 1fr;
  }

  .finder {
    padding-top: 80px;
  }

  h1 {
    font-size: 2.72rem;
  }

  h2 {
    font-size: 2.05rem;
  }

  .hero-actions,
  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 900px) {
  .process-intro,
  .care-promise,
  .directory-doctor {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    display: none;
  }

  .dashboard-main {
    width: 100%;
    margin-right: 0;
    padding-bottom: 100px;
  }

  .dashboard-mobile-nav {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 8px;
    border: 1px solid rgba(246, 248, 251, 0.14);
    border-radius: var(--radius);
    background: rgba(18, 27, 46, 0.94);
    backdrop-filter: blur(18px);
  }

  .dashboard-mobile-nav a {
    padding: 10px 4px;
    color: white;
    font-size: 0.78rem;
    font-weight: 800;
    text-align: center;
  }

  .dashboard-roadmap {
    overflow-x: auto;
    grid-template-columns: repeat(6, minmax(130px, 1fr));
  }

  .directory-portrait {
    min-height: 360px;
  }

  .care-promise .primary-button {
    justify-self: start;
  }

  .doctor-match-stage {
    display: block;
    min-height: 540px;
    padding: 0;
  }

  .doctor-carousel-track {
    height: 540px;
  }

  .match-slide {
    grid-template-columns: minmax(180px, 260px) minmax(210px, 1fr);
    width: min(720px, 86vw);
    min-height: 410px;
    gap: 18px;
    padding: 18px;
  }

  .match-slide .doctor-portrait {
    min-height: 320px;
  }
}

@media (max-width: 560px) {
  .clinic-details,
  .dashboard-columns {
    grid-template-columns: 1fr;
  }

  .process-line {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    padding-right: 24px;
    overflow: visible;
  }

  .process-line::before {
    top: 42px;
    right: 64px;
    bottom: 42px;
    left: auto;
    width: 4px;
    height: auto;
    background: linear-gradient(to bottom, var(--brand) 0 24%, rgba(64, 80, 112, 0.18) 24% 100%);
  }

  .process-line article,
  .process-line article:nth-child(even) {
    display: grid;
    grid-template-columns: 84px 1fr;
    column-gap: 18px;
    min-height: 140px;
    padding: 0;
    text-align: right;
  }

  .process-line article > span {
    grid-row: 1 / 4;
    margin: 0;
  }

  .dashboard-topbar,
  .dashboard-welcome,
  .dashboard-support {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-topbar .primary-button {
    display: none;
  }

  .dashboard-welcome {
    min-height: auto;
  }

  .dashboard-score {
    flex-basis: auto;
  }

  .dashboard-roadmap {
    margin-inline: -12px;
    padding-bottom: 12px;
  }

  .support-actions {
    flex-direction: column;
  }

  .doctors-page-hero {
    min-height: 65svh;
    padding-top: 130px;
  }

  .doctors-page-hero h1 {
    font-size: 2.8rem;
  }

  .doctors-directory {
    padding-top: 60px;
  }

  .directory-portrait {
    min-height: 280px;
  }

  .directory-copy {
    padding: 22px;
  }

  .doctor-match-stage {
    min-height: 590px;
  }

  .doctor-carousel-track {
    height: 590px;
  }

  .match-slide {
    grid-template-columns: 1fr;
    align-content: center;
    width: calc(100% - 28px);
    min-height: 500px;
    gap: 12px;
    padding: 14px;
  }

  .match-slide .doctor-portrait {
    min-height: 290px;
  }

  .match-slide .match-copy h3 {
    margin-bottom: 8px;
    font-size: 2rem;
  }

  .match-slide .match-copy p {
    margin-bottom: 6px;
    font-size: 0.92rem;
  }

  .carousel-arrow {
    width: 40px;
    height: 40px;
    font-size: 1.6rem;
  }

  .carousel-prev {
    right: 6px;
  }

  .carousel-next {
    left: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .banner-copy-main,
  .banner-copy-chapter,
  .logo-tile,
  .floating-panel,
  .phone-card,
  .banner-ribbon,
  .banner-photo,
  .orb,
  .grid-plane,
  [data-reveal-card],
  .depth-section > :not(dialog),
  .depth-card,
  .depth-card.is-depth-visible {
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
  }
}

/* Admin operations panel */
.admin-page {
  min-height: 100vh;
  background: #edf3f7;
  color: var(--ink);
}

.admin-login {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background: #121b2e;
}

.admin-login[hidden],
.admin-shell[hidden] {
  display: none !important;
}

.admin-login-card {
  display: grid;
  gap: 18px;
  width: min(460px, 100%);
  padding: 38px;
  border: 1px solid rgba(246, 248, 251, 0.14);
  border-radius: var(--radius);
  background: #f6f8fb;
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.3);
}

.admin-login-card .brand {
  color: var(--deep);
}

.admin-login-card h1 {
  margin: 0;
  color: var(--deep);
  font-size: 2.5rem;
}

.admin-login-card label,
.admin-form-grid label,
.admin-toolbar label,
.admin-surgery-row label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.admin-page input,
.admin-page select,
.admin-page textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(64, 80, 112, 0.22);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
}

.admin-page textarea {
  min-height: 110px;
  resize: vertical;
}

.admin-primary-button,
.admin-secondary-button,
.admin-danger-button,
.admin-row-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 17px;
  border-radius: var(--radius);
  font-weight: 900;
  cursor: pointer;
}

.admin-primary-button {
  border: 1px solid #172238;
  background: #172238;
  color: white;
}

.admin-secondary-button,
.admin-row-actions button {
  border: 1px solid rgba(64, 80, 112, 0.22);
  background: white;
  color: var(--deep);
}

.admin-danger-button {
  border: 1px solid rgba(165, 45, 45, 0.2);
  background: #fff2f2;
  color: #9d2929;
}

.admin-login-card #adminLoginStatus,
.admin-dialog-actions small {
  color: #a12c2c;
  font-weight: 800;
}

.admin-back-link {
  color: var(--brand);
  text-align: center;
}

.admin-shell {
  min-height: 100vh;
}

.admin-sidebar {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: 250px;
  padding: 24px 18px;
  background: #121b2e;
  color: white;
}

.admin-sidebar .brand {
  margin-bottom: 42px;
}

.admin-sidebar nav {
  display: grid;
  gap: 6px;
}

.admin-sidebar nav a,
.admin-sidebar-footer > * {
  width: 100%;
  padding: 13px 14px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: rgba(246, 248, 251, 0.68);
  text-align: right;
  cursor: pointer;
}

.admin-sidebar nav a:hover,
.admin-sidebar nav a.is-active {
  background: rgba(246, 248, 251, 0.09);
  color: white;
}

.admin-sidebar-footer {
  display: grid;
  margin-top: auto;
}

.admin-main {
  width: calc(100% - 250px);
  margin-right: 250px;
  padding: 24px clamp(20px, 4vw, 58px) 90px;
}

.admin-topbar,
.admin-topbar-actions,
.admin-panel-heading,
.admin-hero,
.admin-patient-row,
.admin-row-actions,
.admin-dialog-heading,
.admin-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-topbar {
  min-height: 64px;
}

.admin-topbar span,
.admin-topbar strong {
  display: block;
}

.admin-topbar span {
  color: var(--brand);
  font-size: 0.78rem;
}

.admin-hero {
  min-height: 280px;
  margin: 24px 0 18px;
  padding: clamp(30px, 5vw, 56px);
  border-radius: var(--radius);
  background: #172238;
  color: white;
}

.admin-hero h1 {
  max-width: 720px;
  margin: 4px 0 12px;
  font-size: clamp(2.3rem, 5vw, 4.6rem);
}

.admin-hero p:last-child {
  color: rgba(246, 248, 251, 0.68);
}

.admin-hero time {
  align-self: flex-start;
  padding: 9px 12px;
  border: 1px solid rgba(246, 248, 251, 0.16);
  border-radius: var(--radius);
  color: rgba(246, 248, 251, 0.72);
  font-size: 0.8rem;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-metrics article {
  display: grid;
  gap: 6px;
  min-height: 150px;
  padding: 22px;
  border: 1px solid rgba(64, 80, 112, 0.14);
  border-radius: var(--radius);
  background: white;
}

.admin-metrics strong {
  font-size: 2.4rem;
}

.admin-metrics small,
.admin-patient-identity small,
.admin-surgery-row small,
.admin-surgery-row span {
  color: var(--brand);
}

.admin-panel {
  margin-top: 18px;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid rgba(64, 80, 112, 0.14);
  border-radius: var(--radius);
  background: white;
}

.admin-panel-heading {
  align-items: flex-start;
  margin-bottom: 22px;
}

.admin-panel-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.5rem);
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 240px);
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: var(--radius);
  background: #edf3f7;
}

.admin-patient-list,
.admin-doctor-list,
.admin-surgery-list,
.admin-activity-list {
  display: grid;
  gap: 10px;
}

.admin-patient-row {
  padding: 16px;
  border: 1px solid rgba(64, 80, 112, 0.14);
  border-radius: var(--radius);
}

.admin-patient-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 230px;
}

.admin-patient-identity > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #dce6ee;
  color: var(--brand);
  font-weight: 900;
}

.admin-patient-identity strong,
.admin-patient-identity small {
  display: block;
}

.admin-patient-meta {
  text-align: center;
}

.admin-status,
.admin-neutral-badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 99px;
  background: #edf3f7;
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 900;
}

.admin-status.is-active,
.admin-status.is-follow-up {
  background: #e8f3ec;
  color: #23633a;
}

.admin-status.is-inactive {
  background: #f2f2f2;
  color: #666;
}

.admin-surgery-row {
  display: grid;
  grid-template-columns: 1.1fr 1.2fr 1.1fr minmax(150px, 0.8fr) auto;
  align-items: end;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(64, 80, 112, 0.14);
  border-radius: var(--radius);
}

.admin-doctor-row {
  display: grid;
  grid-template-columns: 1.15fr 1.4fr 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(64, 80, 112, 0.14);
  border-radius: var(--radius);
}

.admin-doctor-row > div > small,
.admin-doctor-row > div > strong,
.admin-doctor-row > div > span {
  display: block;
}

.admin-doctor-row > div > small,
.admin-doctor-row > div > span {
  color: var(--brand);
}

.admin-doctor-dialog {
  width: min(880px, calc(100% - 28px));
}

.admin-form-grid label small {
  color: var(--brand);
  font-weight: 500;
}

.admin-surgery-row strong,
.admin-surgery-row span,
.admin-surgery-row small {
  display: block;
}

.admin-surgery-actions {
  display: flex;
  gap: 7px;
}

.admin-surgery-actions button {
  min-height: 44px;
  padding-inline: 12px;
}

.dashboard-managed-status {
  display: inline-flex !important;
  width: fit-content;
  margin-top: 9px !important;
  padding: 5px 9px;
  border-radius: 99px;
  background: #dce6ee;
  color: var(--brand) !important;
  font-size: 0.74rem;
  font-weight: 900;
}

.customer-dashboard .dashboard-panel .secondary-button {
  border-color: rgba(64, 80, 112, 0.24);
  background: white;
  color: var(--deep);
}

.admin-community-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.admin-activity-list article {
  padding: 16px;
  border-radius: var(--radius);
  background: #edf3f7;
}

.admin-activity-list p {
  margin: 7px 0;
}

.admin-empty {
  padding: 28px;
  border-radius: var(--radius);
  background: #edf3f7;
  color: var(--brand);
}

.admin-empty strong,
.admin-empty span {
  display: block;
}

.admin-dialog {
  width: min(760px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
}

.admin-dialog::backdrop {
  background: rgba(10, 16, 29, 0.72);
  backdrop-filter: blur(6px);
}

.admin-dialog form {
  padding: clamp(22px, 4vw, 36px);
}

.admin-dialog-heading {
  align-items: flex-start;
  margin-bottom: 22px;
}

.admin-dialog-heading h2 {
  margin: 0;
}

.admin-dialog-heading > button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(64, 80, 112, 0.18);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
  font-size: 1.5rem;
  cursor: pointer;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.admin-form-wide {
  grid-column: 1 / -1;
}

.admin-dialog-actions {
  justify-content: flex-start;
  margin-top: 22px;
}

.admin-mobile-nav {
  display: none;
}

.admin-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 24px 0 18px;
  padding: clamp(28px, 4vw, 46px);
  border-radius: var(--radius);
  background: #172238;
  color: white;
}

.admin-page-heading h1 {
  margin: 2px 0 8px;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
}

.admin-page-heading p:last-child {
  margin: 0;
  color: rgba(246, 248, 251, 0.68);
}

.admin-page-heading > strong {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 1px solid rgba(246, 248, 251, 0.16);
  border-radius: var(--radius);
}

.admin-metrics-six {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-dashboard-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.admin-dashboard-links > a {
  min-height: 260px;
  padding: 24px;
  border: 1px solid rgba(64, 80, 112, 0.14);
  border-radius: var(--radius);
  background: white;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.admin-dashboard-links > a:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 50px rgba(17, 24, 39, 0.1);
}

.admin-dashboard-links span {
  color: var(--brand);
  font-weight: 900;
}

.admin-dashboard-links h2 {
  margin: 40px 0 8px;
}

.admin-dashboard-links p {
  color: var(--brand);
}

.admin-dashboard-links b {
  display: block;
  margin-top: 24px;
}

.admin-recent-list {
  display: grid;
  gap: 8px;
}

.admin-recent-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px;
  border-radius: var(--radius);
  background: #edf3f7;
}

.admin-recent-list strong,
.admin-recent-list span {
  display: block;
}

.admin-recent-list div > span {
  color: var(--brand);
  font-size: 0.82rem;
}

.admin-community-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-community-stats article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 100px;
  padding: 22px;
  border: 1px solid rgba(64, 80, 112, 0.14);
  border-radius: var(--radius);
  background: white;
}

.admin-community-stats strong {
  font-size: 2rem;
}

.admin-community-page-grid {
  align-items: start;
  margin-top: 18px;
}

.admin-community-page-grid .admin-panel {
  margin-top: 0;
}

.admin-activity-list article header,
.admin-activity-list article footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-activity-list article footer a {
  color: var(--deep);
  font-weight: 900;
}

/* Responsive animations without horizontal clipping */
@media (max-width: 1100px) {
  .section-block {
    perspective: none;
  }

  /* Section headings enter vertically instead of moving sideways */
  .depth-layer {
    opacity: 0;
    transform: translate3d(0, 28px, 0) !important;
    transition:
      opacity 560ms ease var(--reveal-delay, 0ms),
      transform 680ms cubic-bezier(0.2, 0.8, 0.2, 1)
        var(--reveal-delay, 0ms) !important;
  }

  .depth-layer.is-depth-visible {
    opacity: 1;
    transform: none !important;
  }

  /* Keep the scrolling reveal animation on cards */
  .depth-card {
    opacity: 0;
    transform: translate3d(0, 42px, 0) scale(0.97) !important;
    transition:
      opacity 620ms ease var(--reveal-delay, 0ms),
      transform 720ms cubic-bezier(0.2, 0.8, 0.2, 1)
        var(--reveal-delay, 0ms),
      box-shadow 300ms ease !important;
  }

  .depth-card.is-depth-visible {
    opacity: 1;
    transform: none !important;
  }

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .content-about-grid {
    grid-template-columns: 1fr !important;
  }

  .source-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .portfolio-data-grid,
  .article-data-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .service-grid > *,
  .source-stats > *,
  .portfolio-data-grid > *,
  .article-data-grid > *,
  .content-about-grid > * {
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .admin-sidebar {
    display: none;
  }

  .admin-main {
    width: 100%;
    margin-right: 0;
    padding: 18px 18px 100px;
  }

  .admin-mobile-nav {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 8px;
    border-radius: var(--radius);
    background: rgba(18, 27, 46, 0.96);
  }

  .admin-mobile-nav a {
    padding: 10px 4px;
    color: white;
    font-size: 0.74rem;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .admin-topbar,
  .admin-hero,
  .admin-panel-heading,
  .admin-patient-row,
  .admin-page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-topbar-actions,
  .admin-topbar-actions button,
  .admin-panel-heading button,
  .admin-row-actions,
  .admin-row-actions button {
    width: 100%;
  }

  .admin-surgery-actions,
  .admin-surgery-actions button {
    width: 100%;
  }

  .admin-metrics,
  .admin-metrics-six,
  .admin-dashboard-links,
  .admin-toolbar,
  .admin-surgery-row,
  .admin-community-grid,
  .admin-community-stats,
  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-form-wide {
    grid-column: auto;
  }

  .admin-patient-meta {
    text-align: right;
  }

  .admin-login-card {
    padding: 26px 20px;
  }
}

@media (max-width: 900px) {
  .directory-modal-content {
    grid-template-columns: 1fr;
  }

  .directory-modal-content .directory-portrait {
    min-height: 300px;
  }

  .process.section-block {
    min-height: 420vh;
  }

  .process-sticky {
    padding: 94px 24px 26px;
  }

  .process .process-intro {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .process .process-intro h2 {
    font-size: clamp(2rem, 6vw, 3.5rem);
  }

  .process .process-line,
  .process .process-line.depth-layer {
    display: block;
    height: min(400px, 50vh);
    padding: 0;
    overflow: visible;
    transform: none !important;
  }

  .process .care-promise {
    right: 24px;
    bottom: 78px;
    left: 24px;
  }
}

@media (max-width: 560px) {
  .process.section-block {
    min-height: 390vh;
  }

  .process-sticky {
    min-height: 100svh;
    padding: 82px 16px 22px;
  }

  .process-header .section-label {
    margin-bottom: 8px;
  }

  .process .process-intro h2 {
    font-size: 2rem;
    line-height: 1.18;
  }

  .process .process-intro p {
    display: none;
  }

  .process .process-line,
  .process .process-line.depth-layer {
    display: block;
    height: 390px;
    padding: 0;
  }

  .process .process-line::before {
    content: none;
  }

  .process .process-line article,
  .process .process-line article:nth-child(even) {
    display: grid;
    grid-template-columns: 58px 1fr;
    column-gap: 16px;
    width: calc(100vw - 32px);
    min-height: 260px;
    padding: 24px;
    text-align: right;
  }

  .process .process-line article > span {
    grid-row: 1 / 4;
    width: 58px;
    height: 58px;
    margin: 0;
  }

  .process .process-line article > small {
    position: static;
    align-self: end;
  }

  .process .process-line article h3 {
    margin: 4px 0 8px;
    font-size: 1.65rem;
  }

  .process .process-line article p {
    grid-column: 1 / -1;
    margin-top: 16px;
    font-size: 0.94rem;
  }

  .journey-rail {
    width: calc(100% - 18px);
  }

  .journey-rail span {
    width: 28px;
    height: 28px;
    border-width: 3px;
  }

  .process .care-promise {
    right: 16px;
    bottom: 68px;
    left: 16px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 24px;
  }

  .process .care-promise strong {
    font-size: 1.35rem;
  }

  .process .care-promise p {
    font-size: 0.9rem;
  }
}

/* Responsive parity: preserve the desktop experience below 900px. */
@media (max-width: 900px) {
  body {
    padding-bottom: 0;
  }

  .site-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .nav-links {
    display: flex;
    gap: clamp(8px, 1.7vw, 16px);
    font-size: 0.76rem;
  }

  .chapter-meta {
    display: flex;
  }

  .account-button {
    display: inline-flex;
    padding-inline: 10px;
    font-size: 0.78rem;
  }

  .mobile-action-bar {
    display: none;
  }

  .scroll-banner {
    min-height: 430vh;
  }

  .banner-stage {
    position: sticky;
    top: 0;
    min-height: 100svh;
    display: grid;
    align-items: center;
    padding: 112px 24px 68px;
    overflow: hidden;
  }

  .banner-copy {
    width: min(620px, calc(100% - 32px));
    margin: 0;
  }

  .banner-copy-main {
    position: relative;
    inset: auto;
    margin: 0;
    opacity: calc(1 - clamp(0, (var(--banner-p) - 0.08) * 8, 1)) !important;
    filter: blur(calc(var(--banner-p) * 5px)) !important;
    transform: translate3d(calc(var(--banner-p) * -12vw), calc(var(--banner-p) * -12vh), 0)
      scale(calc(1 - var(--banner-p) * 0.22)) !important;
  }

  .banner-copy-chapter {
    position: absolute;
    inset: auto 24px clamp(92px, 14vh, 130px) auto;
    width: min(580px, calc(100% - 48px));
    margin: 0;
    opacity: calc(clamp(0, (var(--banner-p) - 0.2) * 7, 1)) !important;
    filter: none !important;
    transform: translate3d(0, calc((0.42 - var(--banner-p)) * 18vh), 80px)
      scale(calc(0.88 + var(--banner-p) * 0.12)) !important;
  }

  .logo-tile {
    position: absolute;
    inset: calc(50% - 58px) auto auto calc(50% - 58px);
    width: 116px;
    height: 116px;
    margin: 0;
    border-radius: 20px;
    opacity: calc(1 - clamp(0, (var(--banner-p) - 0.68) * 4, 1)) !important;
    filter: none !important;
    transform: translate3d(calc(-22vw + var(--banner-p) * 34vw), calc(-4vh + var(--banner-p) * 7vh), 0)
      rotate(calc(var(--banner-p) * -8deg)) scale(calc(0.88 + var(--banner-p) * 0.22)) !important;
  }

  .floating-panel,
  .phone-card {
    position: absolute;
    margin: 0;
    filter: none !important;
  }

  .floating-panel {
    width: min(240px, 64vw);
    padding: 18px;
  }

  .panel-consult {
    inset: 20vh auto auto 4vw;
    opacity: calc(clamp(0, (var(--banner-p) - 0.08) * 6, 1) - clamp(0, (var(--banner-p) - 0.32) * 7, 1)) !important;
    transform: translate3d(calc((0.24 - var(--banner-p)) * 30vw), calc((0.3 - var(--banner-p)) * 20vh), 0)
      rotate(calc((var(--banner-p) - 0.2) * -18deg)) !important;
  }

  .panel-services {
    inset: auto auto 12vh 4vw;
    opacity: calc(clamp(0, (var(--banner-p) - 0.34) * 6, 1) - clamp(0, (var(--banner-p) - 0.58) * 7, 1)) !important;
    transform: translate3d(calc((var(--banner-p) - 0.45) * -28vw), calc((0.48 - var(--banner-p)) * -18vh), 0)
      rotate(calc((var(--banner-p) - 0.45) * 14deg)) !important;
  }

  .panel-trust {
    inset: auto auto 12vh 4vw;
    opacity: calc(clamp(0, (var(--banner-p) - 0.66) * 6, 1)) !important;
    transform: translate3d(calc((0.76 - var(--banner-p)) * 24vw), calc((0.72 - var(--banner-p)) * 20vh), 0)
      rotate(calc((var(--banner-p) - 0.72) * -12deg)) !important;
  }

  .phone-card {
    inset: 18vh auto auto 4vw;
    width: min(290px, 74vw);
    opacity: calc(clamp(0, (var(--banner-p) - 0.48) * 6, 1) - clamp(0, (var(--banner-p) - 0.7) * 7, 1)) !important;
    transform: translate3d(calc((0.52 - var(--banner-p)) * -42vw), calc((var(--banner-p) - 0.5) * 10vh), 0)
      rotate(calc((var(--banner-p) - 0.5) * 10deg)) !important;
  }

  .banner-ribbon {
    display: flex;
    opacity: 1 !important;
    filter: none !important;
    transform: translateX(calc(-50% + (var(--banner-p) - 0.5) * 10vw)) !important;
  }

  .orb {
    opacity: 1 !important;
    filter: none !important;
    transform: translate3d(var(--x, 0), var(--y, 0), 0) scale(var(--s, 1)) rotate(var(--r, 0deg)) !important;
  }

  .grid-plane {
    opacity: 0.16 !important;
    filter: none !important;
    transform: perspective(800px) rotateX(62deg) translateY(calc(var(--banner-p) * -22vh)) !important;
  }

  .service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .service-card {
    min-height: 300px;
    padding: 22px;
  }
}

@media (max-width: 640px) {
  .site-header {
    top: 10px;
    grid-template-columns: auto 1fr auto;
    width: calc(100% - 20px);
    padding: 7px;
  }

  .brand span,
  .account-button,
  .header-cta {
    display: none;
  }

  .nav-links {
    justify-content: space-around;
    gap: 5px;
    font-size: 0.66rem;
  }

  .nav-links a:first-child,
  .nav-links a:last-child {
    display: none;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .chapter-meta {
    top: 82px;
    left: 16px;
    transform: scale(0.82);
    transform-origin: left top;
  }

  .banner-stage {
    padding: 98px 16px 60px;
  }

  .banner-copy {
    width: calc(100% - 16px);
  }

  .banner-copy h1 {
    font-size: clamp(2.45rem, 12vw, 3.35rem);
  }

  .banner-copy h2 {
    font-size: clamp(1.85rem, 9vw, 2.6rem);
  }

  .banner-copy p {
    font-size: 0.92rem;
  }

  .banner-copy-chapter {
    right: 16px;
    bottom: 84px;
    width: calc(100% - 32px);
    padding: 22px;
  }

  .hero-actions {
    flex-direction: row;
    gap: 8px;
  }

  .hero-actions > * {
    flex: 1 1 140px;
    min-height: 48px;
    padding-inline: 14px;
    font-size: 0.82rem;
  }

  .logo-tile {
    inset: 44% auto auto 18px;
    width: 78px;
    height: 78px;
    transform: translate3d(0, calc(-4vh + var(--banner-p) * 7vh), 0)
      rotate(calc(var(--banner-p) * -8deg)) scale(calc(0.88 + var(--banner-p) * 0.22)) !important;
  }

  .floating-panel {
    width: min(210px, 58vw);
    padding: 15px;
  }

  .floating-panel span {
    font-size: 1.8rem;
  }

  .floating-panel strong {
    font-size: 1rem;
  }

  .floating-panel p {
    font-size: 0.82rem;
  }

  .phone-card {
    width: min(260px, 72vw);
    padding: 16px;
  }

  .banner-ribbon {
    bottom: 10px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    overflow: hidden;
    font-size: 0.7rem;
  }

  .banner-ribbon span {
    padding: 7px 10px;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .scroll-counter {
    display: block;
    left: 12px;
    bottom: 12px;
    font-size: 10px;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .directory-doctor,
  .directory-modal-content {
    grid-template-columns: minmax(230px, 0.72fr) 1.28fr;
  }

  .directory-portrait {
    min-height: 440px;
  }

  .content-about-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .source-stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .portfolio-data-grid,
  .article-data-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  html {
    scroll-behavior: auto;
  }

  .site-header,
  .banner-copy-chapter,
  .floating-panel,
  .phone-card,
  .doctor-profile-modal::backdrop,
  .doctor-modal-shell {
    backdrop-filter: none !important;
  }

  .depth-section > :not(dialog) {
    transform: none !important;
  }

  .depth-section > .depth-card {
    opacity: 0;
    transform: translate3d(0, 38px, 0) scale(0.975) !important;
    transition:
      opacity 620ms ease var(--reveal-delay, 0ms),
      transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1) var(--reveal-delay, 0ms) !important;
    will-change: transform, opacity;
  }

  .depth-section > .depth-card.is-depth-visible {
    opacity: 1;
    transform: none !important;
  }

  .depth-section > .depth-layer {
    opacity: 0;
    transform: translate3d(0, 28px, 0) !important;
    transition:
      opacity 560ms ease var(--reveal-delay, 0ms),
      transform 680ms cubic-bezier(0.2, 0.8, 0.2, 1) var(--reveal-delay, 0ms) !important;
    will-change: transform, opacity;
  }

  .depth-section > .depth-layer.is-depth-visible {
    opacity: 1;
    transform: none !important;
  }

  .doctor-carousel-track {
    position: relative;
    z-index: 1;
    touch-action: pan-y;
    perspective: none;
  }

  .doctor-match-stage {
    isolation: isolate;
  }

  .match-slide {
    transition:
      transform 520ms cubic-bezier(0.22, 0.78, 0.22, 1),
      opacity 320ms ease;
  }

  .match-slide.is-neighbor {
    opacity: 0.18;
    pointer-events: none;
    filter: none;
  }

  .process .process-line article {
    filter: none !important;
  }

  .carousel-arrow {
    z-index: 3;
    touch-action: manipulation;
  }

  .content-about-grid {
    grid-template-columns: 1fr;
  }

  .source-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .source-stats > div {
    min-height: 118px;
    padding: 18px;
  }

  .portfolio-data-grid,
  .article-data-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-data-media {
    min-height: 230px;
  }

  .article-data-grid article {
    min-height: 280px;
  }

  .faq-data-list summary {
    padding: 20px 18px 20px 54px;
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 640px) {
  .depth-card,
  .depth-card.is-depth-visible,
  .depth-layer,
  .depth-layer.is-depth-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Hero care pathway */
.hero-care-path {
  --hero-path-progress: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.42;
}

.hero-care-path svg {
  position: absolute;
  top: 17%;
  bottom: 15%;
  left: 3%;
  width: 44%;
  height: 68%;
  overflow: visible;
}

.hero-care-path path {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.hero-path-base {
  stroke: rgba(219, 229, 241, 0.14);
  stroke-width: 1.5;
}

.hero-path-progress {
  stroke: rgba(219, 229, 241, 0.72);
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--hero-path-progress));
}

.hero-path-node {
  position: absolute;
  left: var(--path-x);
  top: var(--path-y);
  display: grid;
  justify-items: center;
  gap: 10px;
  color: rgba(246, 248, 251, 0.38);
  transform: translate(-50%, -50%);
  transition: color 360ms ease, opacity 360ms ease;
}

.hero-path-node b {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(219, 229, 241, 0.28);
  box-shadow: 0 0 0 5px rgba(219, 229, 241, 0.04);
  transition: background 360ms ease, box-shadow 360ms ease, transform 360ms ease;
}

.hero-path-node small {
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.hero-path-node.is-complete {
  color: rgba(246, 248, 251, 0.68);
}

.hero-path-node.is-current {
  z-index: 2;
  color: rgba(246, 248, 251, 0.94);
}

.hero-path-node.is-current b {
  background: #f6f8fb;
  box-shadow: 0 0 0 7px rgba(219, 229, 241, 0.09);
  transform: scale(1.25);
}

/* Dedicated doctor profile */
.doctor-detail-page {
  background: #edf3f7;
  color: var(--ink);
}

.doctor-detail-page .site-header {
  background: rgba(18, 27, 46, 0.94);
}

.doctor-detail-page main {
  overflow: hidden;
}

.doctor-detail-hero {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(30px, 7vw, 90px);
  align-items: center;
  min-height: 100svh;
  padding: 130px max(24px, calc((100vw - 1120px) / 2)) 80px;
  background: #172238;
  color: white;
}

.doctor-detail-portrait {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  min-height: 570px;
  border: 1px solid rgba(246, 248, 251, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(246, 248, 251, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 248, 251, 0.07) 1px, transparent 1px),
    #273653;
  background-size: 42px 42px;
  box-shadow: 0 34px 100px rgba(4, 10, 24, 0.28);
}

.doctor-detail-portrait span {
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(246, 248, 251, 0.3);
  border-radius: 50%;
  font-size: 4rem;
  font-weight: 900;
}

.doctor-detail-intro h1 {
  margin: 10px 0 20px;
  font-size: clamp(3.2rem, 7vw, 7rem);
}

.doctor-detail-intro > p:not(.section-label) {
  max-width: 720px;
  color: rgba(246, 248, 251, 0.72);
  font-size: 1.08rem;
}

.doctor-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.doctor-detail-facts,
.doctor-detail-about,
.doctor-content-section,
.doctor-community-section,
.doctor-content-manager {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.doctor-detail-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: -42px;
  position: relative;
  z-index: 3;
}

.doctor-detail-facts article {
  display: grid;
  gap: 8px;
  min-height: 150px;
  align-content: center;
  padding: 24px;
  border: 1px solid rgba(64, 80, 112, 0.14);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 20px 60px rgba(17, 24, 39, 0.1);
}

.doctor-detail-facts span,
.doctor-contact-list dt {
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 900;
}

.doctor-detail-facts strong {
  font-size: 1.25rem;
}

.doctor-detail-about {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(30px, 7vw, 88px);
  padding-block: 120px;
}

.doctor-detail-about h2,
.doctor-section-heading h2 {
  margin: 8px 0 20px;
}

.doctor-contact-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.doctor-contact-list div {
  padding: 18px;
  border: 1px solid rgba(64, 80, 112, 0.14);
  border-radius: var(--radius);
  background: white;
}

.doctor-contact-list dd {
  margin: 7px 0 0;
  font-weight: 800;
}

.doctor-content-section,
.doctor-community-section {
  padding-block: 100px;
}

.doctor-section-heading {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 30px;
  align-items: end;
  margin-bottom: 36px;
}

.doctor-section-heading > p {
  color: var(--brand);
}

.doctor-gallery-grid,
.doctor-article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.doctor-gallery-grid figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(64, 80, 112, 0.14);
  border-radius: var(--radius);
  background: white;
}

.doctor-gallery-grid img,
.doctor-gallery-placeholder {
  width: 100%;
  min-height: 320px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.doctor-gallery-placeholder {
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(64, 80, 112, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64, 80, 112, 0.09) 1px, transparent 1px),
    #dfe7ed;
  background-size: 34px 34px;
}

.doctor-gallery-placeholder span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 1px solid rgba(64, 80, 112, 0.25);
  border-radius: 50%;
  color: var(--brand);
  font-size: 1.8rem;
  font-weight: 900;
}

.doctor-gallery-grid figcaption {
  padding: 18px;
  font-weight: 900;
}

.doctor-articles-section {
  width: 100%;
  max-width: none;
  padding-inline: max(24px, calc((100vw - 1120px) / 2));
  background: #172238;
  color: white;
}

.doctor-articles-section .doctor-section-heading > p {
  color: rgba(246, 248, 251, 0.64);
}

.doctor-article-grid article {
  min-height: 310px;
  padding: 28px;
  border: 1px solid rgba(246, 248, 251, 0.14);
  border-radius: var(--radius);
  background: rgba(246, 248, 251, 0.06);
}

.doctor-article-grid article > span {
  color: rgba(246, 248, 251, 0.46);
  font-family: var(--font-main);
  font-size: 2.2rem;
  font-weight: 900;
}

.doctor-article-grid h3 {
  margin: 46px 0 16px;
  font-size: 1.6rem;
}

.doctor-article-grid p {
  color: rgba(246, 248, 251, 0.66);
}

.patient-question-form,
.doctor-content-manager form,
.patient-inbox-message form {
  display: grid;
  gap: 12px;
}

.doctor-detail-page input,
.doctor-detail-page select,
.doctor-detail-page textarea,
.customer-dashboard input,
.customer-dashboard select,
.customer-dashboard textarea {
  border-color: rgba(64, 80, 112, 0.22);
  background: #f8fafc;
  color: var(--ink);
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--brand);
}

.doctor-detail-page input::placeholder,
.doctor-detail-page textarea::placeholder,
.customer-dashboard input::placeholder,
.customer-dashboard textarea::placeholder {
  color: rgba(17, 24, 39, 0.46);
  opacity: 1;
  -webkit-text-fill-color: rgba(17, 24, 39, 0.46);
}

.doctor-detail-page input:focus,
.doctor-detail-page select:focus,
.doctor-detail-page textarea:focus,
.customer-dashboard input:focus,
.customer-dashboard select:focus,
.customer-dashboard textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(64, 80, 112, 0.12);
}

.doctor-detail-page input:-webkit-autofill,
.doctor-detail-page textarea:-webkit-autofill,
.customer-dashboard input:-webkit-autofill,
.customer-dashboard textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #f8fafc inset;
  -webkit-text-fill-color: var(--ink);
}

.patient-question-form {
  margin-bottom: 26px;
  padding: 24px;
  border: 1px solid rgba(64, 80, 112, 0.14);
  border-radius: var(--radius);
  background: white;
}

.surgery-experience-tabs {
  display: flex;
  gap: 10px;
  margin: 30px 0 22px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.surgery-experience-tabs button {
  flex: 1 0 190px;
  padding: 18px 20px;
  border: 1px solid rgba(64, 80, 112, 0.18);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  text-align: right;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.surgery-experience-tabs button:hover {
  transform: translateY(-2px);
}

.surgery-experience-tabs button.is-active {
  border-color: #172238;
  background: #172238;
  color: white;
}

.surgery-experience-tabs span,
.surgery-experience-tabs small {
  display: block;
}

.surgery-experience-tabs span {
  font-size: 1rem;
  font-weight: 900;
}

.surgery-experience-tabs small {
  margin-top: 5px;
  color: inherit;
  opacity: 0.66;
}

.surgery-opinions {
  margin-bottom: 20px;
  padding: 24px;
  border: 1px solid rgba(64, 80, 112, 0.14);
  border-radius: var(--radius);
  background: #edf3f7;
}

.surgery-opinions-heading,
.surgery-opinions-heading > div,
.surgery-opinion-card header,
.surgery-opinion-card footer,
.patient-discussion-heading,
.dashboard-history-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.surgery-opinions-heading > div {
  justify-content: flex-start;
}

.surgery-opinions-heading h3,
.patient-question-form h3,
.patient-discussion-heading h3 {
  margin: 2px 0 0;
  font-size: 1.3rem;
}

.verified-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #172238;
  color: white;
  font-weight: 900;
}

.surgery-opinion-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.surgery-opinion-card {
  display: flex;
  flex-direction: column;
  min-height: 240px;
  padding: 20px;
  border: 1px solid rgba(64, 80, 112, 0.14);
  border-radius: var(--radius);
  background: white;
}

.surgery-opinion-card header {
  justify-content: flex-start;
}

.surgery-opinion-card header b {
  margin-right: auto;
  color: #19704a;
}

.surgery-opinion-card header span,
.surgery-opinion-card footer,
.patient-question-form > div p {
  color: rgba(17, 24, 39, 0.6);
  font-size: 0.78rem;
}

.patient-alias-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #dce6ee;
  color: var(--brand);
  font-weight: 900;
}

.surgery-opinion-card p {
  flex: 1;
  line-height: 1.9;
}

.surgery-opinion-card footer {
  padding-top: 12px;
  border-top: 1px solid rgba(64, 80, 112, 0.1);
}

.patient-question-form > div p {
  margin: 6px 0 0;
}

.patient-discussion-heading {
  margin: 34px 0 14px;
}

.dashboard-history-entry {
  display: block !important;
}

.dashboard-history-summary {
  width: 100%;
}

.dashboard-history-entry form {
  display: grid;
  gap: 10px;
  width: 100%;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(64, 80, 112, 0.14);
}

.dashboard-history-entry textarea {
  min-height: 100px;
}

.dashboard-history-entry form button {
  justify-self: start;
}

.dashboard-history-entry form label {
  color: var(--ink);
  font-weight: 800;
}

.dashboard-review-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.patient-question-form textarea,
.patient-inbox-message textarea {
  min-height: 110px;
}

.patient-question-form button,
.patient-inbox-message button,
.doctor-content-manager button {
  justify-self: start;
}

.patient-thread-list,
.patient-inbox {
  display: grid;
  gap: 12px;
}

.patient-thread,
.patient-inbox-message {
  padding: 24px;
  border: 1px solid rgba(64, 80, 112, 0.14);
  border-radius: var(--radius);
  background: white;
}

.patient-thread header,
.patient-inbox-message header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.patient-thread header span,
.patient-inbox-message header span {
  display: block;
  color: var(--brand);
  font-size: 0.78rem;
}

.patient-thread-replies,
.patient-inbox-replies {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.patient-thread blockquote,
.patient-inbox-message blockquote {
  margin: 0;
  padding: 15px;
  border-right: 3px solid var(--brand);
  background: #edf3f7;
}

.patient-thread blockquote p,
.patient-inbox-message blockquote p {
  margin: 5px 0 0;
}

.patient-inbox-panel {
  margin-top: 18px;
}

.patient-inbox-message form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(64, 80, 112, 0.14);
}

.patient-reply-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.patient-reply-submit,
.dashboard-review-submit {
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid #172238;
  border-radius: var(--radius);
  background: #172238;
  color: white;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(23, 34, 56, 0.18);
  transition: transform 180ms ease, background 180ms ease;
}

.patient-reply-submit:hover,
.dashboard-review-submit:hover {
  transform: translateY(-2px);
  background: #263653;
}

.patient-reply-submit:focus-visible,
.dashboard-review-submit:focus-visible {
  outline: 3px solid rgba(64, 80, 112, 0.24);
  outline-offset: 3px;
}

.patient-reply-actions small,
.dashboard-review-actions small {
  color: #19704a;
  font-weight: 800;
}

.doctor-content-manager {
  padding-block: 30px 110px;
}

.doctor-content-manager details {
  padding: 24px;
  border: 1px solid rgba(64, 80, 112, 0.14);
  border-radius: var(--radius);
  background: white;
}

.doctor-content-manager summary {
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 900;
}

.doctor-manager-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 20px;
}

.doctor-content-manager form {
  padding: 20px;
  background: #edf3f7;
}

.doctor-detail-facts,
.doctor-detail-about,
.doctor-content-section,
.doctor-community-section {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 650ms ease, transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.doctor-detail-facts.is-visible,
.doctor-detail-about.is-visible,
.doctor-content-section.is-visible,
.doctor-community-section.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  .doctor-detail-hero,
  .doctor-detail-about {
    grid-template-columns: 1fr;
  }

  .doctor-detail-portrait {
    min-height: 430px;
  }

  .doctor-detail-facts {
    grid-template-columns: repeat(2, 1fr);
  }

  .doctor-gallery-grid,
  .doctor-article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-mobile-nav {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 640px) {
  .hero-care-path svg {
    top: 20%;
    bottom: 16%;
    left: 3%;
    width: 44%;
  }

  .hero-path-node b {
    width: 8px;
    height: 8px;
  }

  .hero-path-node small {
    font-size: 0.6rem;
  }

  .doctor-detail-hero {
    padding: 105px 16px 70px;
  }

  .doctor-detail-portrait {
    min-height: 330px;
  }

  .doctor-detail-intro h1 {
    font-size: 3rem;
  }

  .doctor-detail-facts,
  .doctor-detail-about,
  .doctor-content-section,
  .doctor-community-section,
  .doctor-content-manager {
    width: calc(100% - 28px);
  }

  .doctor-detail-facts,
  .doctor-gallery-grid,
  .doctor-article-grid,
  .doctor-section-heading,
  .doctor-manager-columns {
    grid-template-columns: 1fr;
  }

  .doctor-detail-about,
  .doctor-content-section,
  .doctor-community-section {
    padding-block: 72px;
  }

  .patient-thread header,
  .patient-inbox-message header {
    align-items: flex-start;
    flex-direction: column;
  }


  .surgery-opinion-grid {
    grid-template-columns: 1fr;
  }

  .surgery-opinions,
  .patient-question-form,
  .patient-thread {
    padding: 18px;
  }

  .surgery-opinion-card {
    min-height: 0;
  }

  .dashboard-history-summary {
    align-items: flex-start;
    flex-direction: column;
  }


  .patient-reply-actions,
  .patient-reply-submit,
  .dashboard-review-actions,
  .dashboard-review-submit {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-care-path,
  .hero-path-node,
  .doctor-detail-facts,
  .doctor-detail-about,
  .doctor-content-section,
  .doctor-community-section {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   منوی موبایل
   قبلاً بین ۶۴۱ تا ۹۰۰ پیکسل هیچ ناوبری‌ای وجود نداشت و زیر ۶۴۰ هم
   لینک‌های «خانه» و «تماس با ما» با display:none حذف شده بودند.
   ========================================================================== */

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 120;
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 20, 0.6);
  backdrop-filter: blur(2px);
  animation: yanaFade 0.2s ease;
}

.mobile-menu-panel {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: min(320px, 86vw);
  background: var(--deep, #141b2c);
  border-inline-start: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  animation: yanaSlideIn 0.25s ease;
}

.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
}

.mobile-menu-head button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.mobile-menu-panel > a {
  padding: 13px 12px;
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
}

.mobile-menu-panel > a:hover,
.mobile-menu-panel > a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.mobile-menu-actions {
  margin-top: auto;
  padding-top: 18px;
  display: grid;
  gap: 10px;
}

.mobile-menu-actions .primary-button,
.mobile-menu-actions .secondary-button {
  width: 100%;
  text-align: center;
  justify-content: center;
}

body.menu-open {
  overflow: hidden;
}

@keyframes yanaFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes yanaSlideIn {
  from { transform: translateX(-14%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* زیر ۹۰۰px: منوی افقی جای خود را به همبرگر می‌دهد */
@media (max-width: 900px) {
  .site-header {
    grid-template-columns: auto 1fr;
  }

  .menu-toggle {
    display: flex;
  }

  .header-actions {
    justify-content: flex-end;
  }
}

/* زیر ۹۰۰px منوی افقی کامل جای خود را به همبرگر می‌دهد.
   قبلاً بعضی مدیا کوئری‌های پایین‌تر دوباره نمایشش می‌دادند. */
@media (max-width: 900px) {
  .nav-links {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .brand span {
    display: initial;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu-backdrop,
  .mobile-menu-panel {
    animation: none;
  }
}

/* نوار اعلام فیلتر در صفحه پزشکان (doctors.php?service=...) */
.directory-filter-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 22px;
  padding: 14px 18px;
  border: 1px solid rgba(246, 248, 251, 0.16);
  border-radius: var(--radius);
  background: rgba(246, 248, 251, 0.05);
  font-size: 0.92rem;
}
.directory-filter-notice b {
  color: var(--paper);
  font-weight: 900;
}
.directory-filter-notice .text-link {
  white-space: nowrap;
}
.dashboard-empty .doctor-actions {
  margin-top: 16px;
}


/* Homepage doctor cards without the temporary image area */
.match-slide {
  grid-template-columns: 1fr;
  min-height: 300px;
}

.match-slide .match-copy {
  width: min(100%, 680px);
  margin-inline: auto;
  text-align: center;
}

.match-slide .match-copy h3 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

@media (max-width: 760px) {
  .match-slide {
    min-height: 300px;
  }

  .doctor-carousel-track {
    height: 390px;
  }
}

/* Reset and correctly position the doctor carousel arrows */
.carousel-arrow {
  display: grid !important;
  place-items: center !important;
  width: 48px !important;
  height: 48px !important;
  padding: 0 !important;
  line-height: 1 !important;
  transform: translateY(-50%) !important;
}

.carousel-prev {
  right: 16px !important;
  left: auto !important;
}

.carousel-next {
  left: 16px !important;
  right: auto !important;
}



/* Final responsive correction */
@media (max-width: 1100px) {
  .depth-section > :not(dialog),
  .depth-layer,
  .depth-layer.is-depth-visible,
  .depth-card,
  .depth-card.is-depth-visible,
  .portfolio-data-grid figure,
  .source-stats > div {
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
  }

  .section-block {
    perspective: none;
  }

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .content-about-grid {
    grid-template-columns: 1fr !important;
  }

  .source-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .portfolio-data-grid,
  .article-data-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .service-grid > *,
  .source-stats > *,
  .portfolio-data-grid > *,
  .article-data-grid > *,
  .content-about-grid > * {
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: auto minmax(0, 1fr) !important;
    width: calc(100% - 24px);
  }

  .nav-links,
  .header-phone,
  .header-cta,
  .account-button,
  .chapter-meta {
    display: none !important;
  }

  .menu-toggle {
    display: flex !important;
    margin-inline-start: auto;
  }

  .scroll-banner {
    min-height: auto !important;
  }

  .banner-stage {
    position: relative !important;
    display: block !important;
    min-height: auto !important;
    padding: 120px 20px 72px !important;
  }

  .banner-copy {
    width: 100% !important;
    max-width: 100%;
    margin: 0 !important;
  }

  .banner-copy-main,
  .banner-copy-chapter {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    margin: 0 0 24px !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .logo-tile,
  .floating-panel,
  .phone-card,
  .banner-ribbon,
  .orb,
  .grid-plane {
    display: none !important;
  }

  .directory-doctor,
  .directory-modal-content {
    grid-template-columns: 1fr !important;
  }

  h1,
  h2,
  h3,
  p {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: break-word;
  }
}

@media (max-width: 640px) {
  .section-block {
    padding-right: 16px;
    padding-left: 16px;
  }

  .service-grid,
  .portfolio-data-grid,
  .article-data-grid {
    grid-template-columns: 1fr !important;
  }

  .source-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions > * {
    width: 100%;
  }
}


/* Homepage before-and-after gallery */
.portfolio-comparison,
.portfolio-single {
  width: 100%;
  min-height: 320px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #dfe7ed;
}

.portfolio-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portfolio-photo {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.portfolio-photo + .portfolio-photo {
  border-right: 2px solid white;
}

.portfolio-photo img,
.portfolio-single img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #dfe7ed;
}

.portfolio-photo span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(23, 34, 56, 0.9);
  color: white;
  font-size: 0.78rem;
  font-weight: 900;
}

@media (max-width: 640px) {
  .portfolio-comparison,
  .portfolio-single {
    min-height: 240px;
  }

  .portfolio-photo span {
    right: 7px;
    bottom: 7px;
    padding: 4px 9px;
    font-size: 0.7rem;
  }
}

/* Smaller homepage portfolio images */
.portfolio-comparison,
.portfolio-single {
  width: 100%;
  height: 260px;
  min-height: 0;
  aspect-ratio: auto;
}

.portfolio-photo img,
.portfolio-single img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

@media (max-width: 640px) {
  .portfolio-comparison,
  .portfolio-single {
    height: 190px;
    min-height: 0;
  }

  .portfolio-photo img,
  .portfolio-single img {
    min-height: 0;
  }
}


/* Doctor patient before-and-after galleries */
.doctor-gallery-grid .doctor-gallery-case {
  min-width: 0;
}

.doctor-gallery-media {
  display: grid;
  width: 100%;
  height: 290px;
  min-height: 0;
  overflow: hidden;
  background: #dfe7ed;
}

.doctor-gallery-media.is-comparison {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.doctor-gallery-media.is-multiple {
  grid-template-columns:
    repeat(var(--gallery-count, 2), minmax(0, 1fr));
}

.doctor-gallery-media.is-single {
  grid-template-columns: 1fr;
}

.doctor-gallery-image {
  position: relative;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

.doctor-gallery-image + .doctor-gallery-image {
  border-right: 2px solid white;
}

.doctor-gallery-grid .doctor-gallery-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  object-fit: contain;
  background: #dfe7ed;
}

.doctor-gallery-image > span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(23, 34, 56, 0.9);
  color: white;
  font-size: 0.75rem;
  font-weight: 900;
}

.doctor-gallery-grid > .dashboard-empty {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .doctor-gallery-media {
    height: 230px;
  }

  .doctor-gallery-image > span {
    right: 7px;
    bottom: 7px;
    padding: 4px 8px;
    font-size: 0.68rem;
  }
}


/* Mobile animation restoration */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

@media (max-width: 1100px) and (prefers-reduced-motion: no-preference) {
  .depth-section > .depth-layer {
    opacity: 0 !important;
    transform: translate3d(0, 28px, 0) !important;
    transition:
      opacity 560ms ease var(--reveal-delay, 0ms),
      transform 680ms cubic-bezier(0.2, 0.8, 0.2, 1)
        var(--reveal-delay, 0ms) !important;
  }

  .depth-section > .depth-layer.is-depth-visible {
    opacity: 1 !important;
    transform: none !important;
  }

  .depth-section .depth-card {
    opacity: 0 !important;
    transform: translate3d(0, 38px, 0) scale(0.975) !important;
    transition:
      opacity 620ms ease var(--reveal-delay, 0ms),
      transform 720ms cubic-bezier(0.2, 0.8, 0.2, 1)
        var(--reveal-delay, 0ms) !important;
  }

  .depth-section .depth-card.is-depth-visible {
    opacity: 1 !important;
    transform: none !important;
  }

  .depth-section .source-stats > div {
    opacity: var(--stats-opacity) !important;
    transform:
      perspective(900px)
      translate3d(0, var(--stats-y), 0)
      rotateX(var(--stats-rotate))
      scale(var(--stats-scale)) !important;
  }

  .depth-section .portfolio-data-grid figure {
    opacity: var(--portfolio-opacity) !important;
    transform:
      perspective(900px)
      translate3d(0, var(--portfolio-y), 0)
      rotateX(var(--portfolio-rotate))
      scale(var(--portfolio-scale)) !important;
  }
}

@media (max-width: 900px) {
  .scroll-banner {
    min-height: 300svh !important;
    overflow: visible;
  }

  .scroll-banner .banner-stage {
    position: sticky !important;
    top: 0;
    display: grid !important;
    align-items: center;
    min-height: 100svh !important;
    padding: 104px 20px 68px !important;
    overflow: hidden;
  }

  .banner-copy-main {
    position: relative !important;
    inset: auto !important;
    opacity:
      calc(1 - clamp(0, (var(--banner-p) - 0.08) * 8, 1)) !important;
    filter: blur(calc(var(--banner-p) * 4px)) !important;
    transform:
      translate3d(0, calc(var(--banner-p) * -8vh), 0)
      scale(calc(1 - var(--banner-p) * 0.14)) !important;
  }

  .banner-copy-chapter {
    position: absolute !important;
    inset: auto 20px clamp(56px, 9vh, 92px) 20px !important;
    width: auto !important;
    margin: 0 !important;
    opacity:
      calc(clamp(0, (var(--banner-p) - 0.18) * 7, 1)) !important;
    filter: none !important;
    transform:
      translate3d(0, calc((0.42 - var(--banner-p)) * 16vh), 0)
      scale(calc(0.92 + var(--banner-p) * 0.08)) !important;
  }

  .hero-care-path {
    display: block !important;
    opacity: 0.38;
  }
}

@media (max-width: 640px) {
  .scroll-banner {
    min-height: 320svh !important;
  }

  .scroll-banner .banner-stage {
    padding: 94px 16px 56px !important;
  }

  .banner-copy-main h1 {
    font-size: clamp(2.35rem, 11vw, 3.15rem);
    line-height: 1.2;
  }

  .banner-copy-chapter {
    inset: auto 16px 54px 16px !important;
    padding: 20px;
  }
}


/* Mobile hero text: fade only, no vertical movement */
@media (max-width: 900px) {
  .banner-copy-main {
    transform: none !important;
    filter: none !important;
    opacity:
      calc(
        1 - clamp(0, (var(--banner-p) - 0.08) * 8, 1)
      ) !important;
  }

  .banner-copy-chapter {
    transform: none !important;
    filter: none !important;
    opacity:
      calc(
        clamp(0, (var(--banner-p) - 0.16) * 8, 1)
        -
        clamp(0, (var(--banner-p) - 0.94) * 16, 1)
      ) !important;
  }
}



/* Mobile doctor carousel: strongly blur inactive doctors */
@media (max-width: 760px) {
  .match-slide.is-neighbor {
    opacity: 0.08 !important;
    pointer-events: none !important;
    filter:
      blur(18px)
      saturate(0.35)
      brightness(0.5) !important;
  }

  .match-slide.is-neighbor .match-copy {
    opacity: 0.35;
  }

  .match-slide.is-active {
    opacity: 1 !important;
    filter: none !important;
  }

  .match-slide.is-active .match-copy {
    opacity: 1;
  }
}



/* Services section: static cards without animations */
#services .depth-layer,
#services .depth-layer.is-depth-visible,
#services .depth-card,
#services .depth-card.is-depth-visible,
#services [data-reveal-card],
#services [data-reveal-card].is-visible {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  transition: none !important;
  animation: none !important;
}

#services .service-card:hover,
#services .service-card:focus-visible {
  transform: none !important;
}




/* Uploaded doctor photos */
.directory-portrait.has-photo {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 0;
  isolation: isolate;
}

.directory-portrait.has-photo > img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.directory-portrait.has-photo::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(10, 20, 39, 0.88)
  );
  pointer-events: none;
}

.directory-portrait.has-photo > strong {
  position: absolute;
  right: 24px;
  bottom: 22px;
  left: 24px;
  z-index: 2;
  color: #fff;
  font-size: 20px;
  text-align: center;
}



/* Admin select arrows: move away from box edge */
.admin-page select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 14px !important;
  padding-left: 46px !important;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23344054' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 17px center;
  background-size: 12px 7px;
}

/* Center doctor initials inside circles */
.admin-doctor-row .admin-patient-identity > span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 44px;
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  line-height: 1 !important;
  text-align: center !important;
  overflow: hidden;
}


/* Smaller doctors page title */
.doctors-page .doctors-page-hero h1 {
  font-size: 42px !important;
  line-height: 1.35 !important;
}

@media (max-width: 700px) {
  .doctors-page .doctors-page-hero h1 {
    font-size: 28px !important;
  }
}


/* Compact doctors page hero */
.doctors-page .doctors-page-hero {
  min-height: 0 !important;
  height: auto !important;
  padding-top: 170px !important;
  padding-bottom: 80px !important;
}

@media (max-width: 700px) {
  .doctors-page .doctors-page-hero {
    padding-top: 120px !important;
    padding-bottom: 55px !important;
  }
}