/* ==========================================================================
   قالب «Medical» — سایت پزشک متخصص
   --------------------------------------------------------------------------
   پس از site.css بارگذاری می‌شود: توکن‌ها را بازتعریف می‌کند (پس صفحه‌هایی که قالب هنوز
   بازنویسی نکرده هم هم‌رنگ می‌شوند) و اجزای تازه‌ی سایت پزشک را با پیشوند md- می‌افزاید.

   روانشناسی رنگ (پزشک فوق‌تخصص؛ حس «لوکس، مدرن و قابل‌اعتماد»):
   - سرمه‌ای عمیق   ← اقتدار، تخصص و وقار علمی (سرصفحه‌ی تیره، بخش آمار، پاورقی) — حدود ۳۰٪
   - آبی‌سبز درمانی ← شفا، آرامش و پزشکی نوین؛ رنگ دکمه‌های اقدام (نوبت) و پیوندها — حدود ۷٪
   - طلایی شامپاینی ← اعتبار و افتخار؛ فقط خطوط نازک، نشان‌ها و ستاره‌ها — حدود ۳٪
                     (متن طلایی روی زمینه‌ی روشن همیشه از gold-600 است تا کنتراست AA بماند)
   - عاجی گرم       ← زمینه‌ی بخش‌ها به‌جای خاکستری سرد؛ گرما و حس انسانی — حدود ۶۰٪
   قرمز و نارنجی عمداً استفاده نشده‌اند: یادآور خون، خطر و اورژانس‌اند.

   لوکس‌بودن از خودداری می‌آید: فضای خالی زیاد، سایه‌های نرم، گوشه‌های ملایم، خطوط نازک
   طلایی و حرکت‌های آرام (ease-out بلند) به‌جای جلوه‌های شلوغ.
   ========================================================================== */

/* ---------- ۱. توکن‌ها ---------- */
:root {
    --navy-950: #06121F;
    --navy-900: #0B2239;
    --navy-800: #102C47;
    --navy-700: #1A3D5E;

    --teal-700: #0A585C;
    --teal-600: #0E6F74;   /* دکمه و پیوند روی زمینه‌ی روشن (کنتراست AA با سفید) */
    --teal-500: #16868B;
    --teal-400: #6CC2BE;   /* تأکید روی زمینه‌ی تیره */
    --teal-300: #A8DAD6;
    --teal-100: #D7ECEA;
    --teal-50:  #EEF6F5;

    /* نقش «اقدام اصلی» در پایه‌ی مشترک؛ در سایت پزشک همان آبی‌سبز است */
    --coral-600: #0A585C;
    --coral-500: #0E6F74;
    --coral-100: #D7ECEA;

    --gold-600: #8C6D3A;   /* متن طلایی روی زمینه‌ی روشن */
    --gold-500: #B08D57;
    --gold-400: #C9AB78;
    --gold-300: #E0CDA6;   /* متن طلایی روی زمینه‌ی تیره */
    --gold-100: #F5EDDE;

    --ink:   #14202C;
    --ink-2: #46525E;
    --ink-3: #69747F;
    --line:  #EAE4D9;
    --line-2:#DCD3C3;
    --bg:      #FFFFFF;
    --bg-soft: #F8F5EF;    /* عاجی */
    --bg-mint: #EFF4F5;    /* مه آبی */

    --on-dark-2: #B9C6D2;
    --on-dark-3: #8797A8;
    --star: #B08D57;

    --r-sm: 10px;
    --r: 14px;
    --r-lg: 20px;
    --r-xl: 28px;

    --sh-1: 0 1px 2px rgba(11, 34, 57, .04), 0 4px 14px rgba(11, 34, 57, .04);
    --sh-2: 0 22px 46px -24px rgba(11, 34, 57, .3);
    --sh-3: 0 40px 80px -34px rgba(6, 18, 31, .55);

    --ease: cubic-bezier(.2, .8, .2, 1);
    --t: .4s;
}

/* ---------- ۲. پایه و تایپوگرافی ---------- */
body.theme-medical { color: var(--ink); }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.005em; }
::selection { background: var(--gold-100); color: var(--navy-900); }
:focus-visible { outline-color: var(--gold-500); }

.hl { color: var(--teal-600); }
.hl-grad {
    background: linear-gradient(100deg, #F1E3C4, var(--gold-400) 60%, #E7D3AA);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* برچسب بالای عنوان: خط نازک طلایی + متن، بدون قاب قرصی */
.eyebrow {
    background: none; border: 0; padding: 0; border-radius: 0;
    color: var(--gold-600); font-size: .84rem; font-weight: 700; gap: .75rem;
}
.eyebrow::before { width: 30px; height: 1px; border-radius: 0; background: currentColor; }
.eyebrow--dark { color: var(--gold-300); background: none; }
.eyebrow--live::before { animation: none; }

/* ---------- ۳. دکمه‌ها ---------- */
.btn { border-radius: 12px; font-weight: 700; }
.btn--accent { background: var(--teal-600); color: #fff; box-shadow: 0 16px 32px -16px rgba(14, 111, 116, .8); }
.btn--accent:hover { background: var(--teal-700); box-shadow: 0 20px 38px -16px rgba(10, 88, 92, .85); }
.btn--gold-outline { color: var(--gold-300); border-color: rgba(201, 171, 120, .5); background: rgba(201, 171, 120, .04); }
.btn--gold-outline:hover { color: #fff; border-color: var(--gold-400); background: rgba(201, 171, 120, .14); }
.btn--outline { border-color: var(--line-2); }
.btn--outline:hover { border-color: var(--teal-600); color: var(--teal-600); }
.icon-btn { border-color: var(--line-2); }
.icon-btn:hover { background: var(--navy-900); border-color: var(--navy-900); }
.link-arrow { color: var(--teal-600); }
.tag--teal { color: var(--teal-700); background: var(--teal-50); border-color: var(--teal-100); }
.stars { color: var(--gold-500); }

/* ---------- ۴. پیش‌بارگذار: حلقه‌ی طلایی و خط نبض ---------- */
.md-preloader {
    background: radial-gradient(circle at 50% 42%, #133154 0, var(--navy-950) 64%);
    transition: opacity .55s ease .05s, visibility .55s ease .05s;
}
.md-preloader .preloader__inner { gap: 14px; transition: opacity .45s var(--ease), transform .6s var(--ease); }
.preloader-done .md-preloader .preloader__inner { transform: scale(1.04); filter: none; }
.md-preloader__mark { width: 104px; height: 104px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.md-preloader__ring {
    stroke: var(--gold-400); stroke-width: 1.4;
    stroke-dasharray: 340; stroke-dashoffset: 340;
    transform: rotate(-90deg); transform-origin: 60px 60px;
    animation: draw .85s var(--ease) forwards;
}
.md-preloader__pulse {
    stroke: var(--teal-400); stroke-width: 2.6;
    stroke-dasharray: 150; stroke-dashoffset: 150;
    animation: draw .7s cubic-bezier(.6, 0, .3, 1) .2s forwards;
}
.md-preloader .preloader__name { font-weight: 700; font-size: 1.12rem; letter-spacing: .01em; animation: pl-fade .6s .35s var(--ease) both; }
.md-preloader__line {
    width: 64px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-400), transparent);
    animation: pl-fade .6s .5s var(--ease) both;
}

/* ---------- ۵. سرصفحه ---------- */
.md-brand { gap: 12px; }
.md-brand__mark { width: 44px; height: 44px; flex: none; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.md-brand__mark circle { stroke: var(--gold-400); stroke-width: 1.6; }
.md-brand__mark path { stroke: var(--teal-400); stroke-width: 2.6; }
.is-scrolled .md-brand__mark path, .site-footer .md-brand__mark path { stroke: var(--teal-500); }
.md-brand .brand__name { font-size: 1.12rem; font-weight: 800; }
.md-brand .brand__tag { font-size: .72rem; max-width: 250px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.site-header.is-scrolled {
    background: rgba(248, 245, 239, .9);
    box-shadow: 0 1px 0 var(--line), 0 14px 34px -26px rgba(11, 34, 57, .45);
}
.nav__link { font-weight: 600; font-size: .93rem; }
.nav__link[aria-current="page"]::after { background: var(--gold-400); }
.is-scrolled .nav__link:hover, .is-scrolled .nav__link[aria-expanded="true"] { background: rgba(11, 34, 57, .05); }
.header-phone .i { color: var(--gold-400); }
.is-scrolled .header-phone .i { color: var(--gold-600); }
.mega__link:hover { background: var(--bg-soft); }
.mega__icon { background: var(--teal-50); color: var(--teal-600); }
.mega__foot { background: var(--bg-soft); }
.drawer__panel { background: var(--navy-900); }
.drawer__sub a .i, .drawer__contact .i { color: var(--gold-400); }
.drawer__contact span { display: flex; align-items: flex-start; gap: 10px; line-height: 1.9; }

/* ---------- ۶. بخش‌ها و سرتیترها ---------- */
.md-section { padding-block: var(--section-y); position: relative; }
.md-section--ivory { background: var(--bg-soft); }
.md-section--mist { background: var(--bg-mint); }
.md-section--tight { padding-block: calc(var(--section-y) * .55); }

.md-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 60px); }
.md-head--center { text-align: center; margin-inline: auto; }
.md-head--center .eyebrow { justify-content: center; }
.md-head--center .eyebrow::after { content: ""; width: 30px; height: 1px; background: currentColor; }
.md-head h2 { font-size: var(--fs-h2); margin-top: 14px; line-height: 1.55; }
.md-head p { margin-top: 14px; color: var(--ink-2); font-size: var(--fs-lead); line-height: 2; }
.md-head--split {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 48px;
    flex-wrap: wrap; max-width: none;
}
.md-head--split > div:first-child { max-width: 660px; }

/* ---------- ۷. معرفی پزشک (بالای صفحه‌ی اول) ---------- */
.md-hero {
    position: relative; overflow: hidden; isolation: isolate; color: #fff;
    background:
        radial-gradient(900px circle at 85% -10%, rgba(22, 134, 139, .28), transparent 60%),
        radial-gradient(700px circle at 5% 110%, rgba(176, 141, 87, .16), transparent 60%),
        linear-gradient(180deg, var(--navy-900), #0A1E33);
    padding-top: calc(var(--header-h) + clamp(36px, 6vw, 84px));
    padding-bottom: clamp(64px, 8vw, 116px);
}
.md-hero__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.md-hero__vessels {
    position: absolute; inset-block: 0; inset-inline-end: 0; width: min(760px, 70%); height: 100%;
    fill: none; stroke-linecap: round; opacity: .55;
    -webkit-mask-image: linear-gradient(90deg, #000 20%, transparent 95%); mask-image: linear-gradient(90deg, #000 20%, transparent 95%);
}
.md-hero__vessels path {
    stroke: var(--gold-400); stroke-opacity: .32; stroke-width: 1.2;
    stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 3.2s var(--ease) .3s forwards;
}
.md-hero__vessels path:nth-child(even) { stroke: var(--teal-400); stroke-opacity: .28; animation-delay: .7s; }
.has-preloader:not(.preloader-done) .md-hero__vessels path { animation-play-state: paused; }

.md-hero__grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: clamp(36px, 6vw, 88px); align-items: center; }
.md-hero h1 { font-size: clamp(2.05rem, 1.25rem + 3vw, 3.5rem); line-height: 1.4; font-weight: 800; margin-top: 18px; }
/* نام پزشک و تخصص‌ها هر دو داخل H1 اند؛ تخصص‌ها ظاهر فهرست زیر نام را دارند */
.md-hero__name { display: block; }
.md-hero__specs { margin-top: 20px; display: grid; gap: 10px; }
.md-hero__spec { display: flex; align-items: center; gap: 14px; color: var(--teal-300); font-size: clamp(1rem, .93rem + .35vw, 1.2rem); font-weight: 600; line-height: 1.7; letter-spacing: normal; }
.md-hero__spec::before { content: ""; flex: none; width: 8px; height: 8px; transform: rotate(45deg); border: 1.5px solid var(--gold-400); }
.md-hero__lead { margin-top: 22px; max-width: 610px; color: var(--on-dark-2); font-size: var(--fs-lead); line-height: 2.1; }
.md-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.md-hero__meta {
    display: flex; flex-wrap: wrap; gap: 18px 34px; margin-top: 40px; padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, .1);
}
.md-cred { display: flex; align-items: center; gap: 12px; color: inherit; }
.md-cred__icon {
    flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
    border: 1px solid rgba(201, 171, 120, .45); color: var(--gold-300); background: rgba(201, 171, 120, .06);
}
.md-cred__icon .i { width: 20px; height: 20px; }
.md-cred__label { display: block; font-size: .78rem; color: var(--on-dark-3); line-height: 1.6; }
.md-cred__value { display: block; font-weight: 700; font-size: 1.02rem; line-height: 1.6; }
.md-cred__value small { font-size: .78rem; font-weight: 500; color: var(--on-dark-2); }
a.md-cred:hover .md-cred__icon { background: rgba(201, 171, 120, .16); }

/* تصویر پزشک در قاب طاقی با خط طلایی جابه‌جا */
.md-portrait { position: relative; width: 100%; max-width: 440px; margin-inline: auto; }
.md-portrait::before {
    content: ""; position: absolute; inset: 18px -18px -18px 18px; z-index: -1;
    border: 1px solid rgba(201, 171, 120, .5); border-radius: 240px 240px 30px 30px;
}
.md-portrait__frame {
    position: relative; overflow: hidden; border-radius: 240px 240px 30px 30px;
    background: linear-gradient(165deg, #173A5E, #0E2640); box-shadow: var(--sh-3);
}
.md-portrait__frame .ph, .md-portrait__frame .ph-img { border-radius: 0; border: 0; }
.md-portrait__frame .ph { min-height: 420px; }

.md-float {
    position: absolute; inset-inline-end: -34px; bottom: 34px; z-index: 2;
    display: flex; align-items: center; gap: 12px; max-width: 290px;
    padding: 14px 18px; border-radius: 16px; color: var(--ink);
    background: rgba(255, 255, 255, .97); box-shadow: var(--sh-3);
    animation: float 7s ease-in-out infinite;
}
.md-float__icon {
    flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
    color: var(--gold-600); background: var(--gold-100);
}
.md-float__icon .i { width: 20px; height: 20px; }
.md-float__title { display: block; font-weight: 700; font-size: .92rem; line-height: 1.6; }
.md-float__text { display: block; font-size: .78rem; color: var(--ink-3); line-height: 1.7; }
.md-float--dark {
    inset-inline-end: auto; inset-inline-start: -30px; bottom: auto; top: 46px;
    flex-direction: column; align-items: flex-start; gap: 0; padding: 14px 20px;
    color: #fff; background: rgba(16, 44, 71, .92); border: 1px solid rgba(201, 171, 120, .4);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    animation-delay: -3.5s;
}
.md-float__value { font-size: 1.7rem; font-weight: 800; color: var(--gold-300); line-height: 1.3; }
.md-float__label { font-size: .78rem; color: var(--on-dark-2); }

/* ---------- ۸. نوار وابستگی‌های علمی ---------- */
.md-trust { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding-block: 22px; }
.md-trust__list { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 40px; }
.md-trust__list li { display: flex; align-items: center; gap: 10px; font-size: .92rem; font-weight: 600; color: var(--ink-2); }
.md-trust__list .i { width: 20px; height: 20px; color: var(--gold-500); }

/* ---------- ۹. تخصص‌های اصلی ---------- */
.md-pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 26px; }
.md-pillar {
    position: relative; overflow: hidden; isolation: isolate;
    padding: clamp(28px, 4vw, 46px); background: #fff;
    border: 1px solid var(--line); border-radius: var(--r-xl);
    transition: transform .6s var(--ease), box-shadow .6s var(--ease), border-color .6s var(--ease);
}
.md-pillar::before {
    content: ""; position: absolute; top: 0; inset-inline: 40px; height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-400), transparent);
}
.md-pillar:hover { transform: translateY(-5px); box-shadow: var(--sh-2); border-color: var(--gold-300); }
.md-pillar__bg { position: absolute; z-index: -1; width: 210px; height: 210px; inset-inline-start: -40px; bottom: -50px; color: var(--teal-50); stroke-width: 1.1; }
.md-pillar__icon {
    width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center;
    background: var(--teal-50); color: var(--teal-600);
    box-shadow: 0 0 0 6px #fff, 0 0 0 7px var(--gold-300);
}
.md-pillar__icon .i { width: 30px; height: 30px; stroke-width: 1.6; }
.md-pillar h3 { margin-top: 26px; font-size: clamp(1.25rem, 1.08rem + .6vw, 1.55rem); line-height: 1.6; }
.md-pillar > p { margin-top: 12px; color: var(--ink-2); line-height: 2.05; }
.md-points { margin-top: 20px; display: grid; gap: 10px; }
.md-points li { display: flex; align-items: flex-start; gap: 10px; font-size: .95rem; line-height: 1.9; }
.md-points .i { flex: none; width: 18px; height: 18px; margin-top: .3em; color: var(--teal-600); stroke-width: 2.2; }
.md-pillar .link-arrow { margin-top: 24px; }

/* ---------- ۱۰. خدمات ---------- */
.md-svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.md-svc {
    position: relative; display: flex; flex-direction: column; gap: 12px;
    padding: 26px 26px 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
    transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease);
}
.md-svc:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: var(--teal-100); }
.md-svc__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.md-svc__icon {
    width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center;
    background: var(--bg-soft); color: var(--teal-600); transition: background-color .5s var(--ease), color .5s var(--ease);
}
.md-svc__icon .i { width: 24px; height: 24px; }
.md-svc:hover .md-svc__icon { background: var(--teal-600); color: #fff; }
.md-svc__num { font-size: .95rem; font-weight: 700; color: var(--gold-500); }
.md-svc h3 { font-size: 1.05rem; line-height: 1.8; }
.md-svc p {
    font-size: .9rem; color: var(--ink-2); line-height: 1.95;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.md-svc .link-arrow { margin-top: auto; padding-top: 8px; font-size: .88rem; }

/* ---------- ۱۱. چرا این پزشک ---------- */
.md-about { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(36px, 6vw, 90px); align-items: center; }
.md-about__media { position: relative; }
.md-about__frame { border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-2); }
.md-about__frame .ph, .md-about__frame .ph-img { border-radius: 0; }
.md-about__media::after {
    content: ""; position: absolute; z-index: -1; inset: -16px 16px 16px -16px;
    border: 1px solid var(--gold-300); border-radius: calc(var(--r-xl) + 6px);
}
.md-about__badge {
    position: absolute; inset-inline-end: -22px; bottom: 30px;
    display: flex; flex-direction: column; padding: 18px 22px; border-radius: 18px;
    background: var(--navy-900); color: #fff; box-shadow: var(--sh-3); border: 1px solid rgba(201, 171, 120, .4);
}
.md-about__badge-value { font-size: 2rem; font-weight: 800; color: var(--gold-300); line-height: 1.25; }
.md-about__badge-label { font-size: .82rem; color: var(--on-dark-2); }
.md-about__title { font-size: var(--fs-h2); margin-top: 14px; line-height: 1.55; }
.md-about__lead { margin-top: 16px; line-height: 2.05; }
.md-feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 28px; margin-top: 36px; }
.md-feat { display: flex; gap: 14px; align-items: flex-start; }
.md-feat__icon {
    flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
    color: var(--gold-600); background: var(--gold-100); border: 1px solid rgba(176, 141, 87, .25);
}
.md-feat__icon .i { width: 22px; height: 22px; }
.md-feat h3 { font-size: 1rem; line-height: 1.7; }
.md-feat p { margin-top: 4px; font-size: .9rem; color: var(--ink-2); line-height: 1.95; }
.md-about__more { margin-top: 36px; }

/* ---------- ۱۲. اعداد ---------- */
.md-stats {
    position: relative; overflow: hidden; isolation: isolate; color: #fff; padding-block: clamp(46px, 6vw, 72px);
    background:
        radial-gradient(600px circle at 90% 0%, rgba(22, 134, 139, .25), transparent 60%),
        var(--navy-900);
}
.md-stats__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 0; }
.md-stat { display: flex; flex-direction: column-reverse; align-items: center; text-align: center; gap: 4px; padding: 8px 20px; }
.md-stat + .md-stat { border-inline-start: 1px solid rgba(201, 171, 120, .22); }
.md-stat dd { margin: 0; font-size: clamp(2rem, 1.5rem + 2vw, 2.9rem); font-weight: 800; color: var(--gold-300); line-height: 1.3; }
.md-stat dt { font-size: .92rem; color: var(--on-dark-2); }

/* ---------- ۱۳. مسیر درمان ---------- */
.md-steps { position: relative; display: grid; grid-template-columns: repeat(var(--steps, 4), minmax(0, 1fr)); gap: 24px; counter-reset: none; }
.md-steps::before {
    content: ""; position: absolute; top: 31px; inset-inline: 10%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-400) 15%, var(--teal-500) 85%, transparent);
}
.md-step { position: relative; text-align: center; padding-inline: 6px; }
.md-step__num {
    position: relative; width: 62px; height: 62px; margin: 0 auto 18px; border-radius: 50%;
    display: grid; place-items: center; font-weight: 800; font-size: 1.2rem;
    color: var(--navy-900); background: #fff; border: 1px solid var(--gold-400);
    box-shadow: 0 0 0 7px var(--bg-mint);
}
.md-step h3 { font-size: 1.04rem; line-height: 1.7; }
.md-step p { margin-top: 8px; font-size: .9rem; color: var(--ink-2); line-height: 1.95; }

/* ---------- ۱۴. داستان بیماران ---------- */
.md-stories { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.md-story {
    position: relative; display: flex; flex-direction: column; overflow: hidden;
    background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
    transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.md-story:hover { transform: translateY(-5px); box-shadow: var(--sh-2); }
.md-story__media { overflow: hidden; }
.md-story__media .ph, .md-story__media .ph-img { border-radius: 0; border: 0; transition: transform .9s var(--ease); }
.md-story:hover .md-story__media .ph-img { transform: scale(1.04); }
.md-story__body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; flex: 1; padding: 22px 24px 24px; }
.md-story h3 { font-size: 1.06rem; line-height: 1.75; }
.md-story p {
    font-size: .9rem; color: var(--ink-2); line-height: 1.95;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.md-story .link-arrow { margin-top: auto; padding-top: 6px; font-size: .88rem; }

/* ---------- ۱۵. نظرات بیماران ---------- */
.md-rating { display: flex; align-items: center; gap: 16px 20px; flex-wrap: wrap; }
.md-rating__value { font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--navy-900); }
.md-rating .stars { display: flex; gap: 2px; }
.md-rating .stars .i { width: 18px; height: 18px; fill: currentColor; }
.md-rating__count { display: block; font-size: .84rem; color: var(--ink-3); margin-top: 4px; }
.md-rating .t-head-nav { margin-inline-start: 8px; }
.md-reviews .t-card { border-radius: var(--r-lg); border-color: var(--line); padding: 30px; }
.md-reviews .t-card__quote { color: var(--gold-400); }
.md-reviews .t-card__quote .i { width: 34px; height: 34px; }
.md-reviews .avatar { background: linear-gradient(135deg, var(--teal-600), var(--navy-700)); font-weight: 700; }
.md-reviews .stars .i { width: 15px; height: 15px; fill: currentColor; }

/* ---------- ۱۶. پرسش‌ها ---------- */
.faq-item { border-color: var(--line); }
.faq-item[open] { border-color: var(--gold-300); }
.faq-item[open] .faq-item__icon { background: var(--teal-600); }
.md-faq__more { margin-top: 20px; }

/* ---------- ۱۷. درخواست نوبت ---------- */
.md-cta {
    position: relative; overflow: hidden; isolation: isolate; color: #fff;
    display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 34px 56px; align-items: center;
    padding: clamp(34px, 5.5vw, 72px); border-radius: 30px;
    background:
        radial-gradient(520px circle at 0% 0%, rgba(22, 134, 139, .35), transparent 60%),
        radial-gradient(420px circle at 100% 100%, rgba(176, 141, 87, .2), transparent 60%),
        var(--navy-900);
}
.md-cta::after { content: ""; position: absolute; inset: 12px; z-index: -1; border: 1px solid rgba(201, 171, 120, .28); border-radius: 22px; pointer-events: none; }
.md-cta h2 { font-size: var(--fs-h2); margin-top: 14px; line-height: 1.55; }
.md-cta p { margin-top: 14px; color: var(--on-dark-2); font-size: var(--fs-lead); line-height: 2.05; max-width: 580px; }
.md-cta__buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.md-cta__info { display: grid; gap: 18px; padding: 26px; border-radius: 20px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); }
.md-cta__info li { display: flex; gap: 14px; align-items: flex-start; font-size: .92rem; color: var(--on-dark-2); line-height: 1.95; }
.md-cta__info strong { display: block; color: #fff; font-size: .95rem; }
.md-cta__info a { color: var(--gold-300); }
.md-cta__icon { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-300); border: 1px solid rgba(201, 171, 120, .4); }
.md-cta__icon .i { width: 18px; height: 18px; }

/* ---------- ۱۸. پاورقی ---------- */
.md-footer { background: var(--navy-950); }
.md-footer::before { background: radial-gradient(600px circle at 100% 0%, rgba(176, 141, 87, .1), transparent 60%); }
.md-footer .footer-title { color: #fff; }
.md-footer .contact-list .i { color: var(--gold-400); }
.md-footer .brand__tag { white-space: normal; }
.md-footer__map { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: .9rem; font-weight: 600; color: var(--gold-300); }
.md-footer__map .i { width: 18px; height: 18px; }
.md-footer__disclaimer {
    display: flex; align-items: flex-start; gap: 10px; margin-top: 42px; padding: 16px 18px;
    border-radius: 14px; border: 1px solid rgba(201, 171, 120, .22); background: rgba(201, 171, 120, .05);
    font-size: .85rem; line-height: 1.95; color: var(--on-dark-2);
}
.md-footer__disclaimer .i { flex: none; width: 18px; height: 18px; margin-top: .25em; color: var(--gold-400); }

/* ---------- ۱۹. نوار تماس و نوبت موبایل ---------- */
.md-mobilebar { display: none; }

/* ---------- ۲۰. واکنش‌گرایی ---------- */
@media (max-width: 1279.98px) {
    .md-brand .brand__tag { display: none; }
    .md-float:not(.md-float--dark) { inset-inline-end: -14px; }
    .md-float--dark { inset-inline-start: -14px; }
}

@media (max-width: 1023.98px) {
    .md-hero__grid, .md-about, .md-cta { grid-template-columns: minmax(0, 1fr); }
    .md-hero__text { text-align: start; }
    .md-portrait { max-width: 380px; margin-top: 12px; }
    .md-portrait__frame .ph { min-height: 360px; }
    .md-svc-grid, .md-stories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md-about__media { max-width: 520px; }
    .md-steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .md-steps::before { top: 10px; bottom: 10px; inset-inline: auto; inset-inline-start: 30px; width: 1px; height: auto; background: linear-gradient(180deg, var(--gold-400), var(--teal-500)); }
    .md-step { display: grid; grid-template-columns: 62px 1fr; gap: 0 18px; text-align: start; padding-bottom: 26px; }
    .md-step__num { margin: 0; grid-row: span 2; }
    .md-step h3 { margin-top: 14px; }
}

@media (max-width: 767.98px) {
    body.theme-medical { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
    .md-hero h1 { font-size: clamp(1.85rem, 1.3rem + 3vw, 2.3rem); }
    .md-hero__actions .btn { flex: 1 1 100%; }
    .md-hero__meta { gap: 16px; }
    .md-hero__meta .md-cred { flex: 1 1 100%; }
    .md-portrait { max-width: 320px; }
    .md-portrait::before { inset: 12px -12px -12px 12px; }
    .md-float:not(.md-float--dark) { inset-inline-end: -8px; bottom: 20px; max-width: 240px; padding: 10px 14px; }
    .md-float--dark { inset-inline-start: -8px; top: 26px; padding: 10px 14px; }
    .md-float__value { font-size: 1.35rem; }
    .md-trust__list { justify-content: flex-start; gap: 12px 24px; }
    .md-svc-grid, .md-stories, .md-feats { grid-template-columns: minmax(0, 1fr); }
    .md-stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 26px; }
    .md-stat + .md-stat { border: 0; }
    .md-stat:nth-child(even) { border-inline-start: 1px solid rgba(201, 171, 120, .22); }
    .md-about__badge { inset-inline-end: 10px; bottom: 14px; padding: 12px 16px; }
    .md-about__badge-value { font-size: 1.5rem; }
    .md-about__media::after { inset: -10px 10px 10px -10px; }
    .md-rating .t-head-nav { display: none; }
    .md-cta__buttons .btn { flex: 1 1 100%; }

    .md-mobilebar {
        display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
        position: fixed; inset-inline: 0; bottom: 0; z-index: 45;
        padding-bottom: env(safe-area-inset-bottom);
        background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -12px 30px -18px rgba(11, 34, 57, .35);
    }
    .md-mobilebar a { display: flex; align-items: center; justify-content: center; gap: 8px; height: 62px; font-weight: 700; font-size: .95rem; }
    .md-mobilebar .i { width: 20px; height: 20px; }
    .md-mobilebar__call { color: var(--navy-900); }
    .md-mobilebar__call .i { color: var(--gold-600); }
    .md-mobilebar__cta { color: #fff; background: var(--teal-600); }
    .nav-open .md-mobilebar { display: none; }
}

@media (max-width: 479.98px) {
    .md-brand .brand__name { font-size: 1rem; }
    .md-brand__mark { width: 38px; height: 38px; }
    .md-header .site-header__inner { gap: 12px; }
    .md-header .md-brand { gap: 10px; }
    .md-header .header-actions { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .md-hero__vessels path, .md-preloader__ring, .md-preloader__pulse { stroke-dashoffset: 0; }
    .md-float { animation: none; }
}

@media print {
    .md-mobilebar, .md-hero__bg { display: none !important; }
    .md-hero, .md-stats, .md-cta { background: none; color: #000; }
}

/* ---------- ۲۱. منوی اصلی در عرض‌های میانی ----------
   شش پیوند منو + تلفن + دکمه‌ی نوبت در کمتر از ۱۱۸۰ پیکسل جا نمی‌شوند؛ پیش از آنکه پیوندها
   دوخطی شوند، منوی کشویی جای نوار منو را می‌گیرد. */
.md-header .nav__link { white-space: nowrap; }
/* نوار سرصفحه کمی پهن‌تر از بدنه‌ی صفحه است تا نام پزشک، منو و دکمه‌ها (به‌ویژه در انگلیسی) جا شوند */
.md-header .site-header__inner { width: min(100% - 2 * var(--gutter), 1380px); }
.md-header .header-actions { flex: none; }
@media (max-width: 1439.98px) {
    .md-header .header-phone { display: none; }
}
@media (max-width: 1279.98px) {
    .md-header .nav__link { padding-inline: 10px; }
}
/* نام و پیوندهای انگلیسی بلندترند؛ منوی کشویی در انگلیسی کمی زودتر جای نوار منو را می‌گیرد */
@media (max-width: 1259.98px) {
    [lang="en"] .md-header .nav { display: none; }
    [lang="en"] .md-header .nav-toggle { display: grid; }
    [lang="en"] .md-header .header-actions { margin-inline-start: auto; }
}
@media (max-width: 1179.98px) {
    .md-header .nav { display: none; }
    .md-header .nav-toggle { display: grid; }
    .md-header .header-actions { margin-inline-start: auto; }
    /* اگر جا تنگ شد نام پزشک (به‌ویژه انگلیسی) دوخطی می‌شود تا دکمه‌ی منو از صفحه بیرون نزند */
    .md-header .md-brand { flex: 0 1 auto; min-width: 0; }
    .md-header .brand__text { min-width: 0; }
    .md-header .brand__name { line-height: 1.25; overflow-wrap: anywhere; }
}
/* زیر ۷۶۸ پیکسل نوار پایین صفحه دکمه‌ی نوبت را دارد؛ دکمه‌ی سرصفحه تکراری است */
@media (max-width: 767.98px) {
    .md-header .header-actions .btn { display: none; }
}

/* ---------- ۲۲. انتخاب‌گر زبان ---------- */
.md-lang { position: relative; }
.md-lang__btn {
    display: inline-flex; align-items: center; gap: 6px; height: 40px; padding-inline: 12px;
    border-radius: 10px; border: 1px solid rgba(255, 255, 255, .2); background: transparent;
    font-size: .85rem; font-weight: 600; color: inherit;
}
.md-lang__btn .i { width: 18px; height: 18px; color: var(--gold-400); }
.is-scrolled .md-lang__btn { border-color: var(--line-2); }
.md-lang__menu {
    position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 60; min-width: 150px;
    display: grid; padding: 6px; border-radius: 14px; background: #fff; color: var(--ink);
    border: 1px solid var(--line); box-shadow: var(--sh-3);
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
}
.md-lang.is-open .md-lang__menu { opacity: 1; visibility: visible; transform: none; }
.md-lang__menu a { padding: 9px 14px; border-radius: 10px; font-size: .92rem; font-weight: 600; }
.md-lang__menu a:hover { background: var(--bg-soft); }
.md-lang__menu a[aria-current="true"] { color: var(--teal-600); background: var(--teal-50); }
.md-drawer-lang { display: flex; gap: 8px; margin-top: 18px; }
.md-drawer-lang a {
    flex: 1; text-align: center; padding: 10px; border-radius: 12px; font-size: .9rem; font-weight: 600;
    border: 1px solid var(--glass-line); color: var(--on-dark-2);
}
.md-drawer-lang a[aria-current="true"] { border-color: var(--gold-400); color: #fff; }
@media (max-width: 479.98px) {
    .md-lang__btn span { display: none; }
}

/* ---------- ۲۳. زبان‌ها: قلم و جهت ----------
   فارسی: ایران‌یکان (پیش‌فرض). عربی: وزیرمتن (پوشش کامل خط عربی). انگلیسی: قلم سیستم برای
   متن و تیترهای سریف کلاسیک برای حس رسمی و فاخر. صفحه‌های چپ‌به‌راست پیکان‌ها، کشوی منو و
   جهت محوشدن تزئین‌ها را آینه‌ای می‌کنند. */
body.lang-ar { --font: 'Vazirmatn', Tahoma, 'Segoe UI', sans-serif; font-family: var(--font); }
body.lang-en {
    --font: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-family: var(--font); line-height: 1.75;
}
body.lang-en h1, body.lang-en h2, body.lang-en h3 {
    font-family: Georgia, 'Times New Roman', serif; font-weight: 700; letter-spacing: -.01em; line-height: 1.3;
}
body.lang-en .eyebrow { letter-spacing: .08em; text-transform: uppercase; font-size: .76rem; }
body.lang-en .md-hero h1 { line-height: 1.2; }

[dir="ltr"] .i:has(use[href*="#arrow-left"]),
[dir="ltr"] .i:has(use[href*="#arrow-right"]),
[dir="ltr"] .i:has(use[href*="#chevron-left"]),
[dir="ltr"] .i:has(use[href*="#chevron-right"]) { transform: scaleX(-1); }
[dir="ltr"] .btn:hover .i--move { transform: scaleX(-1) translateX(-4px); }
[dir="ltr"] .link-arrow:hover .i, [dir="ltr"] a:hover > .link-arrow .i, [dir="ltr"] .has-link:hover .link-arrow .i { transform: scaleX(-1) translateX(-5px); }
[dir="ltr"] .drawer__panel { transform: translateX(-100%); }
[dir="ltr"] .nav__link[aria-current="page"]::after { transform: translateX(-50%); }
[dir="ltr"] .md-hero__vessels {
    -webkit-mask-image: linear-gradient(-90deg, #000 20%, transparent 95%); mask-image: linear-gradient(-90deg, #000 20%, transparent 95%);
}
[dir="ltr"] .md-portrait::before { inset: 18px 18px -18px -18px; }

/* ==========================================================================
   صفحه‌های داخلی
   ========================================================================== */

/* ---------- ۲۴. سرصفحه‌ی صفحه‌های داخلی ---------- */
.md-pagehero {
    position: relative; overflow: hidden; isolation: isolate; color: #fff;
    background:
        radial-gradient(700px circle at 90% -20%, rgba(22, 134, 139, .26), transparent 60%),
        radial-gradient(600px circle at 0% 120%, rgba(176, 141, 87, .14), transparent 60%),
        var(--navy-900);
    padding-top: calc(var(--header-h) + clamp(30px, 5vw, 64px));
    padding-bottom: clamp(44px, 6vw, 80px);
}
.md-pagehero__lines {
    position: absolute; z-index: -1; inset-block: 0; inset-inline-end: 0; width: min(640px, 60%); height: 100%;
    fill: none; stroke: var(--gold-400); stroke-opacity: .22; stroke-width: 1.1;
}
.md-pagehero__inner { max-width: 900px; }
.md-pagehero .eyebrow { margin-top: 22px; display: flex; }
.md-pagehero h1 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.8rem); line-height: 1.45; margin-top: 16px; font-weight: 800; }
.md-pagehero__lead { margin-top: 16px; color: var(--on-dark-2); font-size: var(--fs-lead); line-height: 2.05; max-width: 760px; }
.md-pagehero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.md-crumbs a:hover { color: var(--gold-300); }

.md-empty { text-align: center; color: var(--ink-3); padding: 40px 0; }
.md-muted { color: var(--ink-3); font-size: .95rem; }
.md-note {
    display: flex; align-items: flex-start; gap: 10px; margin-top: 32px; padding: 16px 18px;
    border-radius: 14px; background: var(--gold-100); border: 1px solid rgba(176, 141, 87, .25);
    font-size: .88rem; line-height: 1.95; color: var(--ink-2);
}
.md-note .i { flex: none; width: 18px; height: 18px; margin-top: .3em; color: var(--gold-600); }

/* ---------- ۲۵. صفحه‌ی خدمت ---------- */
.md-svcpage__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(28px, 4vw, 56px); align-items: start; }
.md-svcpage__cover { margin: 0 0 32px; border-radius: var(--r-xl); overflow: hidden; }
.md-svcpage__cover .ph, .md-svcpage__cover .ph-img { border-radius: 0; }
.md-svcpage__side { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 18px; }

.md-highlights { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.md-highlights li {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
    background: var(--teal-50); color: var(--teal-700); font-weight: 600; font-size: .9rem;
}
.md-highlights .i { width: 16px; height: 16px; stroke-width: 2.4; }

.md-block { margin-top: 44px; }
.md-block:first-child { margin-top: 0; }
.md-block__title { display: flex; align-items: center; gap: 10px; font-size: clamp(1.3rem, 1.1rem + .7vw, 1.6rem); margin-bottom: 22px; }
.md-block__title .i { width: 22px; height: 22px; color: var(--gold-500); }
.md-feats--cards { margin-top: 0; gap: 16px; }
.md-feats--cards .md-feat { padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }

.md-facts {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; margin: 40px 0 0;
    border-radius: var(--r-lg); overflow: hidden; background: var(--line); border: 1px solid var(--line);
}
.md-facts > div { background: var(--bg-soft); padding: 18px 20px; display: flex; flex-direction: column-reverse; gap: 4px; }
.md-facts dt { font-size: .84rem; color: var(--ink-3); }
.md-facts dd { margin: 0; font-weight: 800; font-size: 1.15rem; color: var(--navy-900); }

.md-steplist { display: grid; gap: 4px; }
.md-steplist li { display: grid; grid-template-columns: 46px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.md-steplist li:last-child { border-bottom: 0; }
.md-steplist__num {
    width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
    color: var(--navy-900); border: 1px solid var(--gold-400); background: #fff;
}
.md-steplist h3 { font-size: 1.02rem; line-height: 1.8; }
.md-steplist p { color: var(--ink-2); font-size: .94rem; line-height: 1.95; margin-top: 2px; }

.md-prose { margin-top: 44px; }
.md-prose h2 { scroll-margin-top: calc(var(--header-h) + 24px); }
.md-prose h2::before {
    content: ""; display: block; width: 36px; height: 2px; margin-bottom: 14px;
    background: linear-gradient(90deg, var(--gold-400), transparent);
}
.md-prose a { color: var(--teal-600); }

.md-sidecard { padding: 24px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); }
.md-sidecard h2 { font-size: 1.05rem; margin-bottom: 12px; }
.md-sidecard p { font-size: .9rem; color: var(--ink-2); line-height: 1.95; margin-bottom: 18px; }
.md-sidecard .btn + .btn { margin-top: 10px; }
.md-sidecard--dark { color: #fff; background: var(--navy-900); border-color: rgba(201, 171, 120, .3); }
.md-sidecard--dark p { color: var(--on-dark-2); }
.md-sidecard p.md-sidecard__meta { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; font-size: .84rem; }
.md-sidecard__meta .i { width: 16px; height: 16px; color: var(--gold-400); }
.md-toc ol { display: grid; gap: 4px; }
.md-toc a { display: block; padding: 7px 10px; border-radius: 10px; font-size: .9rem; color: var(--ink-2); line-height: 1.7; }
.md-toc a:hover { background: var(--bg-soft); color: var(--teal-600); }
.md-sidelinks { display: grid; gap: 2px; }
.md-sidelinks a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: .9rem; line-height: 1.7; }
.md-sidelinks a:hover { background: var(--bg-soft); color: var(--teal-600); }
.md-sidelinks .i { flex: none; width: 18px; height: 18px; color: var(--teal-600); }

/* ---------- ۲۶. داستان بیماران ---------- */
.md-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.md-filter button, .md-filter a {
    padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff;
    font-size: .88rem; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.md-filter a span { color: var(--ink-3); font-weight: 500; margin-inline-start: 4px; }
.md-filter [aria-pressed="true"], .md-filter [aria-current="page"] { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.md-filter [aria-current="page"] span { color: var(--on-dark-2); }
.md-stories__item { display: flex; }
.md-stories__item > .md-story { flex: 1; }
.md-stories__item.is-filtered-out { display: none; }

.md-story-page { max-width: 880px; }
.md-story-page__cover { margin: 0 0 40px; border-radius: var(--r-xl); overflow: hidden; }
.md-story-page__cover .ph, .md-story-page__cover .ph-img { border-radius: 0; }
.md-quote {
    position: relative; margin: 44px 0 0; padding: 30px 32px; border-radius: var(--r-lg);
    background: var(--bg-soft); border-inline-start: 3px solid var(--gold-400);
}
.md-quote .i { width: 32px; height: 32px; color: var(--gold-400); }
.md-quote blockquote { margin-top: 10px; font-size: 1.08rem; line-height: 2.1; }
.md-quote figcaption { margin-top: 14px; font-weight: 700; font-size: .92rem; }
.md-quote figcaption span { color: var(--ink-3); font-weight: 500; }
.md-related, .md-next {
    position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 16px;
    margin-top: 32px; padding: 22px 26px; border-radius: var(--r-lg); border: 1px solid var(--line);
    background: #fff; transition: border-color var(--t), box-shadow var(--t);
}
.md-related:hover, .md-next:hover { border-color: var(--teal-100); box-shadow: var(--sh-2); }
.md-related__label, .md-next span { grid-column: 1; font-size: .84rem; color: var(--ink-3); }
.md-related__title, .md-next strong { grid-column: 1; font-weight: 700; font-size: 1.05rem; }
.md-related .i, .md-next .i { grid-column: 2; grid-row: 1 / span 2; width: 22px; height: 22px; color: var(--teal-600); }

/* ---------- ۲۷. درباره‌ی دکتر ---------- */
.md-bio { margin-top: 18px; display: grid; gap: 14px; }
.md-bio p { color: var(--ink-2); line-height: 2.1; }
.md-pillar__h { margin-top: 24px; font-size: clamp(1.2rem, 1.05rem + .5vw, 1.45rem); }
.md-timeline { max-width: 820px; margin-inline: auto; display: grid; position: relative; }
.md-timeline::before {
    content: ""; position: absolute; top: 12px; bottom: 12px; inset-inline-start: 23px; width: 1px;
    background: linear-gradient(180deg, var(--gold-400), var(--teal-500));
}
.md-timeline li { position: relative; display: grid; grid-template-columns: 48px 1fr; gap: 18px; padding: 14px 0; }
.md-timeline__icon {
    position: relative; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; z-index: 1;
    background: #fff; color: var(--gold-600); border: 1px solid var(--gold-300);
}
.md-timeline__icon .i { width: 22px; height: 22px; }
.md-timeline h3 { font-size: 1.04rem; line-height: 1.8; margin-top: 10px; }
.md-timeline p { color: var(--ink-2); font-size: .93rem; line-height: 1.95; margin-top: 2px; }

/* ---------- ۲۸. تماس و درخواست نوبت ---------- */
.md-contact { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.md-contact__info { display: grid; gap: 20px; }
.md-contact__info > .btn { justify-self: start; }
.md-mini-steps { display: grid; gap: 12px; }
.md-mini-steps li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; padding: 16px 18px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); }
.md-mini-steps li > span {
    width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
    color: var(--navy-900); border: 1px solid var(--gold-400);
}
.md-mini-steps strong { display: block; font-size: .98rem; }
.md-mini-steps p { font-size: .88rem; color: var(--ink-2); line-height: 1.9; margin-top: 2px; }
.md-contact-list { display: grid; gap: 12px; margin-bottom: 18px; }
.md-contact-list li { display: flex; align-items: flex-start; gap: 10px; font-size: .92rem; line-height: 1.9; color: var(--on-dark-2); }
.md-contact-list a { color: #fff; font-weight: 700; }
.md-contact-list .i { flex: none; width: 18px; height: 18px; margin-top: .3em; color: var(--gold-400); }

/* صفحه‌ی تماس: کارت تیره‌ی اطلاعات مطب کنار فرم */
.md-contact__panel {
    position: sticky; top: calc(var(--header-h) + 24px); isolation: isolate; overflow: hidden;
    padding: clamp(26px, 3vw, 38px); border-radius: var(--r-xl); color: #fff;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(22, 134, 139, .38), transparent 60%),
        linear-gradient(160deg, var(--navy-800), var(--navy-950));
    box-shadow: var(--sh-3);
}
.md-contact__panel::after {
    content: ""; position: absolute; z-index: -1; width: 260px; height: 260px; inset-inline-start: -110px; bottom: -120px;
    border-radius: 50%; border: 1px solid rgba(201, 171, 120, .22); box-shadow: 0 0 0 34px rgba(201, 171, 120, .05);
}
.md-contact__panel .eyebrow { color: var(--gold-300); }
.md-contact__title { margin-top: 6px; font-size: clamp(1.3rem, 1.15rem + .5vw, 1.55rem); color: #fff; }
.md-contact__list { display: grid; margin-top: 20px; }
.md-contact__list li { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 14px; align-items: start; padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.md-contact__list li:first-child { border-top: 0; padding-top: 4px; }
.md-contact__icon {
    width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(201, 171, 120, .35); color: var(--gold-300);
}
.md-contact__icon .i { width: 21px; height: 21px; }
.md-contact__label { display: block; font-size: .8rem; color: var(--on-dark-3); line-height: 1.6; }
.md-contact__value { display: block; margin-top: 2px; font-weight: 700; font-size: 1rem; line-height: 1.85; color: #fff; overflow-wrap: anywhere; }
a.md-contact__value { transition: color var(--t); }
a.md-contact__value:hover { color: var(--teal-300); }
[dir="rtl"] a.md-contact__value[dir="ltr"] { text-align: right; }
.md-contact__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.md-contact__actions .btn { flex: 1 1 200px; justify-content: center; }
.btn--glass { background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .2); }
.btn--glass:hover { background: rgba(255, 255, 255, .14); }
.md-contact__socials { margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); }
.md-contact__socials .md-socials { margin-top: 0; }
.md-contact-faq { max-width: 880px; }
.md-contact-faq__more { margin-top: 22px; text-align: center; }

.md-formcard { padding: clamp(24px, 3.5vw, 40px); border-radius: var(--r-xl); background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-1); scroll-margin-top: calc(var(--header-h) + 20px); }
.md-formcard--plain { margin-top: 28px; box-shadow: none; }
.md-formcard__title { font-size: 1.3rem; }
.md-formcard__lead { margin-top: 8px; color: var(--ink-2); font-size: .93rem; line-height: 1.95; }
.md-formcard .form-grid { margin-top: 22px; }
.md-formcard .input { border-radius: 12px; }
.md-formcard .input:focus { border-color: var(--teal-500); box-shadow: 0 0 0 4px rgba(14, 111, 116, .14); }
.md-formcard .has-error .input { border-color: #E5484D; background: #FFF8F8; }
.md-success { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; margin-bottom: 24px; border-radius: var(--r); background: var(--teal-50); border: 1px solid var(--teal-100); }
.md-success__icon .i { width: 28px; height: 28px; color: var(--teal-600); }
.md-success h2 { font-size: 1.05rem; }
.md-success p { font-size: .9rem; color: var(--ink-2); margin-top: 4px; }

/* ---------- ۲۹. نظرات و پرسش‌ها ---------- */
.md-rating--box { justify-content: center; margin-bottom: 36px; }
.md-reviews-grid { columns: 3 320px; column-gap: 20px; }
.md-review { break-inside: avoid; margin: 0 0 20px; border-radius: var(--r-lg); padding: 28px; }
.md-review .t-card__quote { color: var(--gold-400); }
.md-review .avatar { background: linear-gradient(135deg, var(--teal-600), var(--navy-700)); }
.md-review .stars .i { width: 15px; height: 15px; fill: currentColor; }
.md-faqpage { max-width: 880px; display: grid; gap: 40px; }

/* ---------- ۳۰. صفحه‌ی محتوایی ---------- */
.md-doc { max-width: 860px; }
.md-doc--toc { max-width: none; display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.md-doc--toc .md-toc { position: sticky; top: calc(var(--header-h) + 24px); }
.md-doc .md-prose { margin-top: 0; }
.md-updated { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--ink-3); margin-bottom: 24px; }
.md-updated .i { width: 16px; height: 16px; }

/* ---------- ۳۱. ۴۰۴ ---------- */
.md-404 { min-height: 80vh; display: grid; place-items: center; text-align: center; }
.md-404__inner { max-width: 640px; display: flex; flex-direction: column; align-items: center; }
.md-404__code { font-size: clamp(4rem, 3rem + 6vw, 7rem); font-weight: 800; line-height: 1; color: var(--gold-300); }
.md-404__line {
    width: min(420px, 90%); margin: 18px 0 8px; fill: none; stroke: var(--teal-400); stroke-width: 2.4;
    stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 700; stroke-dashoffset: 700; animation: draw 2.4s var(--ease) forwards;
}
.md-404 .md-pagehero__actions { justify-content: center; }

/* ---------- ۳۲. مقاله‌ها ---------- */
.md-blogbar { display: grid; gap: 18px; margin-bottom: 36px; }
.md-search { display: flex; align-items: center; gap: 10px; padding-block: 6px; padding-inline: 16px 6px; border-radius: 14px; background: #fff; border: 1px solid var(--line-2); max-width: 560px; }
.md-search .i { flex: none; width: 20px; height: 20px; color: var(--ink-3); }
.md-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; height: 44px; font-size: .95rem; }
.md-blogbar .md-filter { margin-bottom: 0; }
.md-post { border-radius: var(--r-lg); border-color: var(--line); }
.md-post:hover { border-color: var(--teal-100); }
.md-pager [aria-current] { background: var(--navy-900); border-color: var(--navy-900); }

.md-pagehero--article { padding-bottom: clamp(110px, 12vw, 170px); }
.md-article-head { max-width: 900px; }
.md-article-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.md-article-cats a { padding: 4px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--gold-300); border: 1px solid rgba(201, 171, 120, .4); }
.md-article-meta { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 20px; color: var(--on-dark-2); font-size: .9rem; }
.md-article-meta li { display: flex; align-items: center; gap: 8px; }
.md-article-meta .i { width: 17px; height: 17px; color: var(--gold-400); }
.md-article-cover { max-width: 1040px; margin-top: clamp(-130px, -10vw, -80px); position: relative; z-index: 2; }
.md-article-cover img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-xl); box-shadow: var(--sh-3); background: var(--bg-soft); }
.md-article { max-width: 820px; padding-block: clamp(40px, 6vw, 72px) var(--section-y); }
.md-article__lead { font-size: var(--fs-lead); line-height: 2.1; color: var(--ink); padding-inline-start: 18px; border-inline-start: 3px solid var(--gold-400); }
.md-article .md-prose { margin-top: 32px; }
.md-article-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 32px; }
.md-article-tags .i { width: 18px; height: 18px; color: var(--ink-3); }
.md-author { display: flex; gap: 16px; align-items: center; margin-top: 36px; padding: 20px 22px; border-radius: var(--r-lg); background: var(--bg-soft); border: 1px solid var(--line); }
.md-author .md-brand__mark path { stroke: var(--teal-500); }
.md-author small { display: block; color: var(--ink-3); font-size: .8rem; }
.md-author strong { display: block; font-size: 1.05rem; }
.md-author .link-arrow { margin-top: 4px; font-size: .86rem; }
.md-share { display: flex; align-items: center; gap: 8px; margin-top: 28px; }
.md-share > span { font-size: .88rem; font-weight: 700; margin-inline-end: 6px; }
.md-share a, .md-share button {
    width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
    border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); cursor: pointer;
}
.md-share a:hover, .md-share button:hover { border-color: var(--teal-600); color: var(--teal-600); }
.md-share .i { width: 18px; height: 18px; }
.md-comments { margin-top: 56px; }

/* ---------- ۳۳. واکنش‌گرایی صفحه‌های داخلی ---------- */
@media (max-width: 1023.98px) {
    .md-svcpage__grid, .md-contact, .md-doc--toc { grid-template-columns: minmax(0, 1fr); }
    .md-svcpage__side, .md-doc--toc .md-toc, .md-contact__panel { position: static; }
}
@media (max-width: 767.98px) {
    .md-pagehero__actions .btn { flex: 1 1 100%; }
    .md-quote { padding: 22px; }
}

/* ---------- ۳۴. تصویر کوچک خدمات ----------
   هر خدمت تصویر پزشکی خودش را دارد (پا، پروستات، کلیه، ...؛ sprite آیکن‌ها، نمای ۴۸×۴۸). رنگ‌ها با
   متغیرهای ill داده می‌شوند؛ اگر در پنل برای خدمت عکس انتخاب شود، عکس جای تصویر را می‌گیرد. */
.md-svc__media {
    position: relative; width: 84px; height: 84px; flex: none; overflow: hidden; border-radius: 22px;
    display: grid; place-items: center;
    background: radial-gradient(120% 120% at 20% 10%, #fff 0%, var(--teal-50) 55%, #DCEEEB 100%);
    border: 1px solid var(--teal-100); box-shadow: 0 12px 26px -18px rgba(11, 34, 57, .55);
    transition: transform .45s var(--ease), border-color .45s var(--ease), box-shadow .45s var(--ease);
}
.md-svc__media img { width: 100%; height: 100%; object-fit: cover; }
.md-ill {
    width: 62px; height: 62px; color: var(--navy-800);
    --ill-sw: 1.7; --ill-a: #D3ECE8; --ill-b: #F3E3C4; --ill-c: #EBA696; --ill-cs: #B4584A;
    --ill-v: #3C73B0; --ill-v2: #D7E5F5; --ill-r: #C45A4C; --ill-r2: #F7DCD6; --ill-g: var(--gold-500); --ill-on: #fff;
    transition: transform .5s var(--ease);
}
.md-ill--line { width: 38px; height: 38px; color: var(--teal-600); stroke-width: 1.6; }
.md-svc:hover .md-svc__media { transform: translateY(-2px) rotate(-2deg); border-color: var(--teal-300); box-shadow: 0 18px 32px -18px rgba(14, 111, 116, .6); }
.md-svc:hover .md-ill { transform: scale(1.07); }
.md-svc__top { margin-bottom: 14px; }

/* ---------- ۳۵. مسیر درمان: تغییر رنگ گام زیر نشانگر ---------- */
.md-step__num { transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease), transform .35s var(--ease); }
.md-step h3 { transition: color .35s var(--ease); }
.md-step:hover .md-step__num, .md-step:focus-within .md-step__num {
    color: #fff; border-color: var(--teal-600);
    background: linear-gradient(150deg, var(--teal-500), var(--teal-700));
    box-shadow: 0 0 0 7px var(--teal-100), 0 14px 26px -12px rgba(14, 111, 116, .65);
    transform: translateY(-3px);
}
.md-step:hover h3 { color: var(--teal-600); }

/* ---------- ۳۶. منوی خدمات سرصفحه: چهار خدمت و پیوند همه‌ی خدمات ---------- */
.mega--services { width: min(700px, 92vw); }
.mega--services .mega__desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.mega--services .mega__foot .btn { flex: none; }
.nav__item--menu:focus-within .mega { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ---------- ۳۷. شبکه‌های اجتماعی ---------- */
.md-socials { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.md-social {
    position: relative; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
    color: var(--gold-300); background: rgba(255, 255, 255, .05); border: 1px solid rgba(201, 171, 120, .38);
    transition: color .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.md-social .i { width: 21px; height: 21px; }
.md-social:hover, .md-social:focus-visible { color: #fff; border-color: transparent; transform: translateY(-3px); }
.md-social--instagram:hover, .md-social--instagram:focus-visible {
    background: radial-gradient(circle at 30% 107%, #FDF497 0%, #FDF497 5%, #FD5949 45%, #D6249F 60%, #285AEB 90%);
    box-shadow: 0 12px 24px -12px rgba(214, 36, 159, .8);
}
.md-social--whatsapp:hover, .md-social--whatsapp:focus-visible { background: #25D366; box-shadow: 0 12px 24px -12px rgba(37, 211, 102, .8); }
.md-social--telegram:hover, .md-social--telegram:focus-visible { background: #229ED9; }
.md-social--linkedin:hover, .md-social--linkedin:focus-visible { background: #0A66C2; }

/* ---------- ۳۸. شماره‌ها در عربی ----------
   ارقام عربی (٠-٩) برخلاف ارقام فارسی در الگوریتم دوجهته «عدد عربی» به حساب می‌آیند و خط تیرهٔ میان
   دو گروه رقم، ترتیب گروه‌ها را برعکس می‌کند (٢٦٧٤٩٤٨٠-٠٢١). شماره‌ها (عنصرهای dir=ltr) در صفحه‌های
   عربی دقیقاً به ترتیب نوشتاری و از چپ به راست نمایش داده می‌شوند. */
html[lang="ar"] [dir="ltr"] { unicode-bidi: bidi-override; }

/* ---------- ۳۹. اعتبار طراحی (پایین‌ترین خط پاورقی) ---------- */
.md-footer__credit { padding: 14px 0 22px; border-top: 1px solid rgba(255, 255, 255, .06); text-align: center; font-size: .8rem; color: var(--on-dark-3); }
.md-footer__credit a { color: var(--gold-300); font-weight: 700; transition: color var(--t); }
.md-footer__credit a:hover { color: #fff; }

/* ---------- ۴۰. حساب واردشده در سرصفحه (مثلاً بیمار نوبت‌دهی) ---------- */
.md-account { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22); color: inherit; transition: background-color var(--t), border-color var(--t); max-width: 200px; }
.md-account:hover { background: rgba(255, 255, 255, .08); }
.md-account__avatar { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--gold-400); color: var(--navy-900); }
.md-account__avatar .i { width: 17px; height: 17px; }
.md-account__text { display: grid; line-height: 1.35; min-width: 0; }
.md-account__text strong { font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md-account__text small { font-size: .7rem; opacity: .75; }
.is-scrolled .md-account { border-color: var(--line-2); }
.is-scrolled .md-account:hover { background: var(--bg-soft); }
.md-account--drawer { display: flex; max-width: none; margin-bottom: 12px; border-color: var(--line); padding: 8px 12px; }
@media (max-width: 991.98px) {
    .md-header .header-actions .md-account { display: none; }
}
