/* ==========================================================================
   تعديلات خاصة بووردبريس — مش جزء من التصميم المرجعي.
   ========================================================================== */

/* الهيدر اللاصق تحت شريط الأدمن */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}
@media (max-width: 600px) {
  /* شريط الأدمن بيبقى مش لاصق تحت 600px */
  .admin-bar .site-header { top: 0; }
}

/* <picture> (WebP + fallback) شفاف للتخطيط: الـ <img> جواه بيتعامل كإنه ابن مباشر
   للحاوية — عشان كل selectors التصميم (.hero-photo img · .path-card img …) تفضل شغالة زي ما هي. */
picture { display: contents; }

/* اختلاف مقصود عن Lovable: .collage-label اتنقلت جوه .collage-tall (فوق الصورة).
   الصورة لازم تبقى containing block ليها؛ z-index عشان تيجي فوق الـ <img>. */
.collage-tall { position: relative; }
.collage-tall .collage-label { z-index: 1; }

/* عنوان الصفحات الداخلية البسيطة (عن · احجز) — نفس إيقاع .section-top */
.page-header { padding-bottom: 0; }

/* الاقتباس من غير نسبة: <cite> فاضي مايسيبش مسافة (المتابعة 9) */
.quote cite:empty { display: none; }

/* ── قسم البرامج ──
   من غير JS: التابات مالهاش شغل (كل البرامج ظاهرة أصلا) فبتستخبى. */
html.no-js .program-filters { display: none; }

/* لوحات المعاينة وكابشنز المراحل متراصة في نفس الخانة: الارتفاع = أطولها،
   والتبديل visibility بس — مفيش أي حاجة تتحرك (CLS 0). */
.program-preview-stack { display: grid; }
.program-preview-stack > .program-preview-body { grid-area: 1 / 1; visibility: hidden; }
.program-preview-stack > .program-preview-body.is-active { visibility: inherit; }
.phase-caption { display: grid; }
.phase-caption-item { grid-area: 1 / 1; visibility: hidden; }
/* inherit مش visible: ابن visible بيظهر حتى جوه أب hidden — كان بيرسم كابشن كل لوحة مستخبية فوق بعض */
.phase-caption-item.is-active { visibility: inherit; }
/* نفس قيم «.phase-caption > span» في styles.css — العنصر بقى جوه .phase-caption-item */
.phase-caption-item > span { display: block; color: var(--muted-foreground); font-size: 14px; font-weight: 500; margin-bottom: 5px; }

/* اختلاف مقصود: لينك «تفاصيل البرنامج» جنب زرار الحجز في المعاينة (المتابعة 4) */
.program-preview-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 18px; }
.program-preview-actions .text-link { font-size: 14px; }

/* ── قصص التعافي ── زرار «شوف كل القصص»: أيقونة حسب الحالة، ومستخبي من غير JS (كله ظاهر أصلا) */

/* ── فورم الحجز ── الحقول جوه wrapper عشان تتخبى مرة واحدة، والـ grid بتاع الفورم يفضل شغال عليها */
.booking-fields { display: contents; }
.form-success:focus { outline: none; }

/* ── المركز ── فرع واحد (المتابعة 13): كارت واحد عريض — الخريطة جنب البيانات. الاسم لينك لمقال المركز. */
.branch-title h3 a:hover { color: var(--primary-text); }
.branch-grid:has(> .branch-card--wide), .branch-card--wide { grid-column: 1 / -1; }
.branch-card--wide { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.branch-card--wide .branch-map { height: auto; min-height: 300px; }
.branch-card--wide .branch-info { padding: 40px; align-self: center; }
@media (max-width: 767px) {
  .branch-card--wide { grid-template-columns: 1fr; }
  .branch-card--wide .branch-map { min-height: 0; height: 180px; }
  .branch-card--wide .branch-info { padding: 24px; }
}

/* من غير خريطة (الإنتاج لحد ما الخريطة الحقيقية توصل — المتابعة 22): الكارت عمود واحد */
.branch-card--wide.no-map { grid-template-columns: 1fr; }
.branch-card--wide.no-map .branch-info { padding-inline: 40px; }

/* المعلم (أمام مستشفى هليوبوليس) والدور الأرضي — المتابعة 18 */
.branch-info > .branch-landmark, .branch-info > .branch-floor { display: flex; align-items: center; gap: 8px; color: var(--foreground); }
.branch-landmark { font-size: 17px; }
.branch-landmark svg, .branch-floor svg { width: 17px; height: 17px; color: var(--primary-text); flex-shrink: 0; }
.branch-floor { font-size: 14px; }
.branch-floor svg { color: var(--green); }
/* سطر المبدأ في «عن» — نفس شكل الاقتباس القديم */
.quote.principle { margin-block: 27px; }

/* الشريط الداكن من غير المدد والمعايير (الإنتاج لحد الاعتماد — المتابعة 22): أسماء المراحل بس */
.rail-names-only .rail-step h3 { margin-bottom: 14px; }
@media (max-width: 767px) {
  .rail-names-only .rail-step { grid-template-columns: 1fr; }
  .rail-names-only .rail-progress { grid-column: 1; }
}

/* ── الأرقام ── 3 بدل 4 بعد شيل «2 فرع» (المتابعة 13). الموبايل: 3 في سطر واحد بدل 2×2 بكارت يتيم. */
.stats { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 767px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stats .stat > span { font-size: 13px; line-height: 1.6; padding-inline: 8px; text-wrap: balance; }
  .stats .stat:nth-child(3) { border-inline-start: 1px solid var(--border); }
}

/* اللوجو (المتابعة 20: WebP مؤقت 720×197 ≈ 0.274، أو SVG لو وصل) —
   عرض وارتفاع صريحين = مكانه محجوز من أول لحظة (CLS 0). الهيدر 180px · الفوتر 200px (المتابعة 8). */
.wordmark .ftc-logo { display: block; width: 180px; height: calc(180px * 197 / 720); }
.footer .wordmark .ftc-logo { width: 200px; height: calc(200px * 197 / 720); }
img.ftc-logo { object-fit: contain; }
@media (max-width: 767px) {
  /* الهيدر على الموبايل 140px (قرار المستخدم). justify-self عشان اللينك مايتمطش في عمود الجريد (اللوجو كان بيلزق شمال جواه). */
  .site-header .wordmark { justify-self: start; }
  .site-header .wordmark .ftc-logo { width: 140px; height: calc(140px * 197 / 720); }
}

/* سطر الحقوق: رقم الترخيص مايتكسرش لوحده */
.nowrap { white-space: nowrap; }
/* text-align بيمشي مع اتجاه الصفحة (يمين في RTL) — صريح عشان مايتورثش center من أي مكان */
.footer-bottom, .footer-bottom > span { text-align: start; }

/* نص لقارئات الشاشة بس */
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute !important; word-wrap: normal !important;
}
.skip-link:focus {
  clip: auto; clip-path: none; width: auto; height: auto; margin: 0;
  inset-inline-start: 8px; top: 8px; z-index: 100000;
  padding: 12px 18px; border-radius: 9px;
  background: var(--background); color: var(--primary-text); font-weight: 700; box-shadow: var(--shadow);
}

/* قائمة wp_nav_menu جوه .nav و .footer-links — نفس شكل الروابط المباشرة */
.nav ul, .nav li, .footer-links li { display: contents; }

/* زرار قائمة الموبايل: أيقونة فتح/قفل حسب الحالة */
.mobile-menu .icon-close { display: none; }
.mobile-menu[aria-expanded="true"] .icon-open { display: none; }
.mobile-menu[aria-expanded="true"] .icon-close { display: block; }
/* من غير JS الزرار مالوش لازمة — الروابط موجودة في الفوتر */
html.no-js .mobile-menu { display: none; }

/* من غير JS: كل حاجة ظاهرة في مكانها النهائي (الـ reveal بيحتاج JS يضيف .in-view) */
html.no-js .reveal { opacity: 1; transform: none; }
html.no-js .rail-step:nth-child(1) .rail-progress i { width: 25%; }
html.no-js .rail-step:nth-child(2) .rail-progress i { width: 50%; }
html.no-js .rail-step:nth-child(3) .rail-progress i { width: 75%; }
html.no-js .rail-step:nth-child(4) .rail-progress i { width: 100%; }

/* محتوى المحرر (مقالات وصفحات) */
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2 { font-size: 26px; margin-top: 1.6em; }
.entry-content h3 { font-size: 21px; margin-top: 1.4em; }
.entry-content .article-figure { margin: 1.6em 0; }
.entry-content .article-figure:not(.article-figure--full) img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: calc(var(--radius) - 6px); }
/* المتابعة 70: الرسوم التشريحية والمخططات كاملة من غير قص (أبعادها الحقيقية من width/height) + الشرح تحتها (السطر الصغير اتشال في 71) */
.article-figure--full, .article-figure--photo { margin: 1.6em 0; }
.article-figure--full img { display: block; width: auto; max-width: 100%; height: auto; max-height: 560px; margin-inline: auto; object-fit: contain; border-radius: calc(var(--radius) - 6px); } /* من غير aspect-ratio: النسبة من width/height (CLS صفر) · الرسم الطويل مايزيدش عن 560px */
.article-figure--full figcaption { margin-top: 10px; }
.article-figure--full .figure-legend { margin: 10px 0 0; padding-inline-start: 1.4em; font-size: 15px; line-height: 1.7; color: var(--foreground); list-style: decimal; }
.article-figure--full .figure-legend li { margin: 2px 0; padding-inline-start: 4px; }
.article-figure--full .figure-legend li::marker { color: var(--primary); font-weight: 700; }
@media (min-width: 768px) { .article-figure--full .figure-legend { columns: 2; column-gap: 32px; } .article-figure--full .figure-legend li { break-inside: avoid; } }
.book-figure { margin-top: -60px; } /* /book/: الرسم بين قسم الفورم وقسم المتن — من غير حشوة القسمين (90 + 90) */
.book-figure + .section { padding-top: 16px; }
@media (max-width: 767px) { .book-figure { margin-top: -32px; } }
.entry-content ul { list-style: disc; padding-inline-start: 1.4em; }
.entry-content ol { list-style: decimal; padding-inline-start: 1.4em; }
.entry-content a { color: var(--primary-text); text-decoration: underline; text-underline-offset: 3px; }
.entry-content img { height: auto; border-radius: var(--radius); }
.entry-content .alignwide { width: min(1180px, calc(100vw - 96px)); margin-inline: calc(50% - min(590px, 50vw - 48px)); max-width: none; }
.entry-content .alignfull { width: 100vw; margin-inline: calc(50% - 50vw); max-width: none; }
.entry-content .wp-caption-text,
.entry-content figcaption { font-size: 14px; color: var(--muted-foreground); margin-top: 8px; }
/* alignleft / alignright فيزيائيين عمدا: في ووردبريس معناهم حرفيا شمال / يمين */
.alignleft { float: left; margin: 0.4em 0 1em 1.5em; }
.alignright { float: right; margin: 0.4em 1.5em 1em 0; }
.aligncenter { margin-inline: auto; }

/* ==========================================================================
   LTR (النسخة الإنجليزية — المتابعة 8)
   كل الخصائص الاتجاهية منطقية، فالـ LTR بيشتغل لوحده. هنا بس اللي الخصائص المنطقية مابتحلهوش:
   ========================================================================== */
/* التدرجات ذات الاتجاه: 270deg (من اليمين) ← 90deg (من الشمال) — الضلمة تفضل ورا النص */
[dir="ltr"] { --hero-shade: linear-gradient(90deg, var(--hero-shade-1) 0%, var(--hero-shade-2) 39%, var(--hero-shade-3) 100%); }
[dir="ltr"] .athletic-section:after { background: linear-gradient(90deg, var(--athletic) 25%, transparent 100%); }
@media (max-width: 767px) {
  [dir="ltr"] .hero:after { background: linear-gradient(90deg, var(--hero-shade-1), var(--hero-shade-mobile-end)); }
  /* الوش في صورة الهيرو على جنب — بيتعكس مع اتجاه النص */
  [dir="ltr"] .hero-photo img { object-position: 60% center; }
}
/* الكارت العايم مايل لبرة: -3deg في RTL ← 3deg */
[dir="ltr"] .floating-note { transform: rotate(3deg); }
/* hover البرنامج بيزق العنوان ناحية النهاية */
[dir="ltr"] .program-select:hover .program-title,
[dir="ltr"] .program-select:focus-visible .program-title { transform: translateX(4px); }
/* أيقونات السهم بتشاور «لقدام» — بتتعكس */
[dir="ltr"] .lucide-arrow-left,
[dir="ltr"] .lucide-arrow-up-left { transform: scaleX(-1); }

/* ---------- مسار التنقل (كل الصفحات الداخلية) ---------- */
.breadcrumbs { margin-bottom: 28px; font-size: 13px; color: var(--muted-foreground); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px 10px; list-style: none; padding: 0; margin: 0; }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 10px; }
.breadcrumbs li + li::before { content: "‹"; color: var(--border); font-size: 15px; } /* RTL: السهم بيشاور للأمام */
.breadcrumbs a { color: inherit; }
.breadcrumbs a:hover { color: var(--primary-text); }
.breadcrumbs [aria-current] { color: var(--foreground); }
[dir="ltr"] .breadcrumbs li + li::before { content: "›"; }

/* ---------- بلوكات بيانات المركز (اتعملت لصفحة الفرع — بيستخدمها template-parts/single/clinic.php) ---------- */
.branch-hero { padding-bottom: 40px; }
.branch-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.branch-hero .section-heading { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.3; margin: 14px 0 18px; }
.branch-lead { font-size: 18px; font-weight: 300; color: var(--muted-foreground); max-width: 520px; line-height: 1.9; }
.branch-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.branch-hero-actions .btn { min-height: 48px; }
.branch-nap { box-shadow: var(--shadow); }
.branch-nap .branch-map { height: 230px; }
.nap-list { display: grid; gap: 16px; margin: 0; }
.nap-list > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: start; }
.nap-list dt { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted-foreground); }
.nap-list dt svg { width: 17px; height: 17px; color: var(--primary-text); flex-shrink: 0; }
.nap-list dd { margin: 0; font-size: 15px; line-height: 1.8; }
.nap-list dd a { font-weight: 700; color: var(--primary-text); }
.branch-nap .branch-info > .text-link { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; font-size: 14px; }

.branch-details { background: var(--secondary); }
.branch-details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.branch-details .section-heading, .branch-gallery-section .section-heading, .branch-services .section-heading { margin-bottom: 22px; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 10px; align-items: start; font-size: 16px; line-height: 1.8; }
.check-list svg { width: 18px; height: 18px; color: var(--green); flex-shrink: 0; margin-top: 6px; }

.branch-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.branch-gallery figure { margin: 0; aspect-ratio: 3 / 2; border-radius: var(--radius); overflow: hidden; }
.branch-gallery img { width: 100%; height: 100%; object-fit: cover; }

/* كروت عامة (برامج / خدمات) — نفس روح كارت المدونة */
.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.item-card a { display: block; }
.item-card-image { aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius); }
.item-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.item-card:hover img { transform: scale(1.05); }
.item-card small { color: var(--muted-foreground); font-size: 13px; display: block; margin: 15px 0 6px; }
.item-card h3 { font-size: 17px; line-height: 1.5; margin-bottom: 10px; }
.item-card .text-link { font-size: 14px; }

.link-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 14px 32px; }

@media (max-width: 1100px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .branch-hero-grid, .branch-details-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 767px) {
  .breadcrumbs { margin-bottom: 20px; }
  .branch-hero { padding-bottom: 24px; }
  .branch-lead { font-size: 16px; }
  .branch-hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .branch-hero-actions .clinic-button { flex-basis: 100%; }
  .branch-nap .branch-map { height: 180px; }
  .nap-list > div { grid-template-columns: 1fr; gap: 4px; }
  .branch-gallery { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; } /* 8 برامج تحت بعض كانت 2600px */
  .item-card h3 { font-size: 15px; margin-bottom: 6px; }
  .item-card small { margin: 10px 0 4px; }
  .item-card .text-link { font-size: 14px; gap: 6px; }
}

/* ═════════════ القوالب الداخلية (المتابعة 13: حالة · برنامج · تجاري · خدمة · سياحة · مقال · هاب · تقييم) ═════════════ */
.container.narrow, .narrow { width: min(820px, calc(100% - 96px)); margin-inline: auto; }
.single-hero { padding-bottom: 32px; }
.single-title { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.35; margin: 6px 0 16px; max-width: 900px; }
.single-lead { font-size: 18px; font-weight: 300; color: var(--muted-foreground); max-width: 720px; line-height: 1.9; }
.single-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.single-actions .btn { min-height: 48px; }
.assessment-line { margin-top: 18px; font-size: 15px; color: var(--muted-foreground); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.single-page .section + .section { padding-top: 0; }
.single-page .section-heading { margin-bottom: 22px; }
.single-figure { margin-block: 0 32px; border-radius: var(--radius); overflow: hidden; }
.single-figure img { width: 100%; height: auto; display: block; }
.single-figures { margin-bottom: 32px; }

/* متن المحرر */
.entry-content { font-size: 17px; line-height: 2; }
.entry-content > * + * { margin-top: 1em; }
.entry-content h2 { font-size: 26px; line-height: 1.4; margin-top: 1.6em; }
.entry-content h3 { font-size: 21px; line-height: 1.45; margin-top: 1.4em; }
.entry-content ul, .entry-content ol { padding-inline-start: 1.4em; }
.entry-content a { color: var(--primary-text); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* الكروت */
.item-card a { color: inherit; }
.item-card-summary { font-size: 14px; color: var(--muted-foreground); line-height: 1.8; margin-top: 4px; }
.item-card h3 a:hover, .item-card a:hover h3 { color: var(--primary-text); }

/* رابط بارز في المتن — أهم رابط في الموقع */
.highlight-link { margin-block: 8px 72px; padding: 26px 30px; border: 1px solid var(--border); border-inline-start: 4px solid var(--green); border-radius: var(--radius); background: var(--secondary); display: grid; gap: 8px; }
.highlight-link p { color: var(--muted-foreground); font-size: 15px; }
.highlight-link a { font-size: 21px; font-weight: 700; color: var(--primary-text); display: inline-flex; align-items: center; gap: 10px; line-height: 1.5; }

/* أسئلة شائعة */
.faq-list { display: grid; gap: 10px; }
.faq-list details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--background); }
.faq-list summary { cursor: pointer; padding: 18px 22px; font-weight: 700; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--primary-text); font-size: 22px; line-height: 1; }
.faq-list details[open] summary::after { content: "−"; }
.faq-answer { padding: 0 22px 20px; color: var(--muted-foreground); line-height: 1.9; }

/* ليه إحنا · المقارنة · المراحل */
.why-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; counter-reset: why; }
.why-list li { counter-increment: why; padding: 24px 26px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--background); }
.why-list li::before { content: counter(why, decimal-leading-zero); display: block; color: var(--primary-text); font-weight: 700; margin-bottom: 8px; direction: ltr; text-align: start; }
.why-list strong { font-size: 18px; display: block; }
.why-list p { color: var(--muted-foreground); font-size: 15px; margin-top: 6px; line-height: 1.8; }
.table-wrap { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
.compare-table th, .compare-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); text-align: start; vertical-align: top; }
.compare-table thead th { color: var(--muted-foreground); font-size: 13px; font-weight: 700; }
.compare-table td:nth-child(2) { color: var(--primary-text); font-weight: 700; }
.phase-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.phase-list li { padding: 22px 24px; border: 1px solid var(--border); border-radius: var(--radius); }
.phase-index { font-size: 13px; color: var(--primary-text); font-weight: 700; } /* نص ← بترولي دايما (الأخضر 2.5:1 على الأرضية) */
.phase-list h3 { font-size: 19px; margin: 4px 0 8px; }
.phase-list h3 small { font-weight: 400; color: var(--muted-foreground); font-size: 14px; }
.phase-criterion { margin-top: 8px; font-size: 15px; }

/* الهاب */
.hub-blocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 18px; }
.hub-block { padding: 24px 26px; border: 1px solid var(--border); border-radius: var(--radius); }
.hub-block h3 { font-size: 19px; line-height: 1.5; }
.hub-block h3 a:hover { color: var(--primary-text); }
.hub-empty { color: var(--muted-foreground); }

/* التقييم المبدئي */
.assessment { display: grid; }
.assessment-step { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.assessment-step legend { font-size: 22px; font-weight: 700; margin-bottom: 14px; }
.assessment-option { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; font-size: 16px; background: var(--background); }
.assessment-option:has(input:checked) { border-color: var(--primary-text); box-shadow: 0 0 0 1px var(--primary-text); }
.assessment-option input { accent-color: var(--primary); width: 18px; height: 18px; }
.assessment-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.assessment-urgent { padding: 28px 30px; border-radius: var(--radius); border: 2px solid var(--destructive); background: var(--background); display: grid; gap: 12px; justify-items: start; }
.assessment-urgent h2 { font-size: 24px; color: var(--destructive); }
.assessment-result { display: grid; gap: 18px; justify-items: start; }
.assessment-result:focus { outline: none; }
.assessment-result .nap-list { width: 100%; }
.assessment-disclaimer { font-size: 14px; color: var(--muted-foreground); }
.assessment-note { color: var(--muted-foreground); }
.assessment-gated { display: grid; gap: 18px; justify-items: start; padding: 26px 30px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.assessment-urgent a { color: var(--destructive); font-weight: 700; }

/* روابط الرئيسية للهابات */
.home-links { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; margin: -10px 0 26px; color: var(--muted-foreground); font-size: 15px; }
.about-center-link { margin-top: 22px; }
.about-best-line { margin: 22px 0 0; font-size: 16px; line-height: 1.8; color: var(--ink-soft); } /* المتابعة 55 */
.about-best-line a { color: var(--primary-text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.about-best-line + .about-center-link { margin-top: 12px; }

/* الفوتر: عمود اللوجو + 4 أعمدة روابط + العنوان */
.footer-grid { grid-template-columns: 1.3fr repeat(auto-fit, minmax(150px, 1fr)); }

@media (max-width: 767px) {
  .container.narrow, .narrow { width: calc(100% - 40px); }
  .single-lead { font-size: 16px; }
  .single-actions .btn { flex: 1 1 auto; justify-content: center; }
  .entry-content { font-size: 16px; }
  .highlight-link { padding: 20px; margin-bottom: 48px; }
  .highlight-link a { font-size: 18px; }
  .assessment-step legend { font-size: 19px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ═════════════ المتابعة 24 ═════════════ */
/* زرار واتساب الثابت: يمين تحت فعليا (right مش inset-inline-end) — نفس المكان في العربي والإنجليزي */
.wa-float { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 60; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; box-shadow: 0 6px 18px oklch(0.2 0.03 196 / 0.28); }
.wa-float svg { width: 28px; height: 28px; }
.wa-float:hover { background: var(--primary-light); }
.wa-float:focus-visible { outline: 3px solid var(--primary-foreground); outline-offset: 3px; box-shadow: 0 0 0 6px var(--primary); }
body.ftc-urgent .wa-float { display: none; }
/* الفوتر وآخر الصفحة مايستخبوش تحت الزرار */
.footer { padding-bottom: calc(56px + 32px + env(safe-area-inset-bottom, 0px)); }

/* «اعرف التكلفة حسب حالتك» */
.cost-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 18px; }
.cost-guarantee { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.cost-guarantee svg { color: var(--green); flex-shrink: 0; }
.cost-insurance { margin-top: 14px; }
.book-cost { padding-top: 0; }

/* المراجعة الطبية */
/* سطر المراجعة + «الإجابة باختصار» (المتابعة 36) */
.byline { font-size: 14px; color: var(--muted-foreground); margin: -6px 0 14px; line-height: 1.9; }
.byline a { color: var(--primary-text); font-weight: 700; }
.byline-part { white-space: nowrap; }
.byline-pending { color: var(--clay); font-weight: 500; border-bottom: 1px dashed currentColor; } /* محليا بس */
.short-answer { background: var(--answer-bg); border-radius: calc(var(--radius) - 6px); padding: 18px 22px; margin: 20px 0 24px; max-width: 760px; }
.short-answer-title { font-size: 13px; font-weight: 700; color: var(--primary-text); margin-bottom: 6px; }
.short-answer p:last-child { font-size: 17px; line-height: 1.9; color: var(--foreground); }
@media (max-width: 767px) { .short-answer { padding: 16px 18px; } .short-answer p:last-child { font-size: 16px; } }

/* فريق العمل: 3 في صف · تحت بعض على الموبايل · الصورة 4:5 */
.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.team-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); padding: 18px 18px 24px; }
.team-photo { aspect-ratio: 4 / 5; border-radius: calc(var(--radius) - 6px); overflow: hidden; background: var(--secondary); margin-bottom: 16px; }
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-name { font-size: 20px; }
.team-title { color: var(--primary-text); font-weight: 700; font-size: 15px; margin-top: 4px; }
.team-meta { display: grid; gap: 4px; margin: 12px 0; font-size: 14px; }
.team-meta > div { display: flex; gap: 6px; }
.team-meta dt { color: var(--muted-foreground); }
.team-meta dd { margin: 0; }
.team-bio { font-size: 15px; line-height: 1.9; color: var(--muted-foreground); }
.team-card.is-empty { border-style: dashed; }
.team-photo.is-initials { display: grid; place-items: center; background: linear-gradient(160deg, var(--primary-light), var(--primary) 55%, var(--deep)); }
.team-initials { font-family: var(--font-sans), sans-serif; font-weight: 700; /* المتابعة 38: Plex بدل Almarai — «إ» كانت بتبان «!» */ font-size: clamp(64px, 8vw, 96px); line-height: 1; white-space: nowrap; color: var(--primary-foreground); }
[dir="ltr"] .team-initials { font-family: var(--font-sans), sans-serif; }
.team-badges { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.team-badges li { font-size: 13px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--secondary); color: var(--primary-text); }
.team-empty { text-align: center; color: var(--muted-foreground); font-weight: 700; }

/* التأمين */
.insurance-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.insurance-list li { padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); font-weight: 500; }
.insurance-sub { font-size: 22px; }
.insurance-note { color: var(--muted-foreground); font-size: 15px; }

@media (max-width: 767px) {
  .team-grid { grid-template-columns: 1fr; }
  .cost-cta .btn { flex: 1 1 100%; justify-content: center; }
}

/* نموذج الحجز ← واتساب (نصوص الرئيسية الجديدة، ملاحظة 4) */
.field-hint { display: block; margin-top: 6px; font-size: 14px; font-weight: 400; line-height: 1.6; color: var(--muted-foreground); }
.form-success .text-link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; margin: 14px auto 0; color: var(--primary-text); }
.phases-note { margin-top: 18px; font-size: 14px; color: var(--muted-foreground); }

/* المتابعة 37: مكونات الصفحات التجارية — «كيف نعمل» و«من سيتابع حالتك» */
.how-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: how; } /* المتابعة 38: 3 × 2 · تابلت 2 · موبايل 1 */
@media (max-width: 1023px) { .how-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .how-steps { grid-template-columns: 1fr; } }
.how-steps li { counter-increment: how; display: grid; grid-template-columns: 36px 1fr; column-gap: 14px; align-items: start; padding: 14px 16px; border: 1px solid var(--border); border-radius: calc(var(--radius) - 6px); background: var(--card); }
.how-steps li::before { content: counter(how); grid-row: span 2; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--primary-foreground); font-weight: 700; font-size: 15px; }
.how-steps strong { color: var(--primary-text); font-size: 16px; }
.how-steps span { color: var(--muted-foreground); font-size: 15px; line-height: 1.8; }
.team-area-lead { color: var(--muted-foreground); margin: 0 0 16px; }
.team-area-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.team-area-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: calc(var(--radius) - 6px); background: var(--card); }
.team-area-initial { flex: 0 0 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--primary-foreground); font-family: var(--font-sans), sans-serif; font-weight: 600; font-size: 18px; line-height: 1; white-space: nowrap; overflow: hidden; } /* المتابعة 38: Plex بدل Almarai — «إ» كانت بتبان «!» */
.team-area-initial.has-photo { background: var(--secondary); }
.team-area-initial.has-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; } /* المتابعة 43: صورة الوش */
.team-area-body { display: grid; gap: 2px; }
.team-area-body a { color: var(--primary-text); }
.team-area-title { color: var(--primary-text); font-size: 14px; font-weight: 500; }
.team-area-line { color: var(--muted-foreground); font-size: 14px; line-height: 1.7; }

/* المتابعة 42: خرائط جوجل المضمنة — بتملا .branch-map اللي ارتفاعها محجوز (CLS زي الصورة القديمة) */
.branch-map .map-embed { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

/* ═════════════ المتابعة 43 (أ-3): مسار الحجز ═════════════ */
/* مكون «احجز تقييمك» — بعد المتن وفي نصه */
.book-cta { margin-block: 36px 8px; padding: 24px 26px; border-radius: var(--radius); background: var(--tint); border: 1px solid var(--tint-line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 24px; }
.entry-content .book-cta p { margin: 0; }
.book-cta-text { flex: 1 1 320px; min-width: 0; }
.entry-content .book-cta .book-cta-title, .book-cta-title { font-family: var(--font-display); font-weight: 700; font-size: 19px; line-height: 1.5; color: var(--primary-text); margin-bottom: 4px; }
.book-cta-text p:last-child { font-size: 15px; line-height: 1.75; color: var(--ink-soft); }
.book-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.book-cta-actions .btn { min-height: 48px; }
.entry-content .book-cta a { text-decoration: none; }
.entry-content .book-cta .clinic-button { color: var(--primary-foreground); }
.book-cta--mid { margin-block: 40px; }

/* قايمة الموبايل: الحجز ورقم التليفون (على الديسكتوب مستخبيين — الزرار والرقم في الهيدر) */
.nav .nav-extra { display: none; }

/* شريط الموبايل الثابت: اتصل · واتساب · احجز — بدل الدايرة تحت 768px */
.mobile-bar { display: none; }
@media (max-width: 767px) {
  .wa-float { display: none; }
  .mobile-bar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; inset-inline: 0; bottom: 0; z-index: 60;
    background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -6px 18px oklch(0.2 0.03 196 / 0.1);
    padding-bottom: env(safe-area-inset-bottom, 0px); transition: transform 0.2s;
  }
  .mobile-bar a { min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--primary-text); text-decoration: none; }
  .mobile-bar a + a { border-inline-start: 1px solid var(--border); }
  .mobile-bar a.mobile-bar-book { background: var(--primary); color: var(--primary-foreground); }
  .mobile-bar a:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }
  .mobile-bar a.mobile-bar-book:focus-visible { outline-color: var(--primary-foreground); }
  .mobile-bar.is-hidden { transform: translateY(110%); }
  body.ftc-urgent .mobile-bar { display: none; }
  /* آخر سطر والفوتر مايستخبوش تحت الشريط */
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
  .footer { padding-bottom: 32px; }
  /* قايمة الموبايل = درج جانبي بيفتح من ناحية زرار القايمة حسب اتجاه اللغة (طلب المستخدم، المتابعة 43).
     absolute جوه الهيدر (الهيدر عليه backdrop-filter فـ fixed هتتحسب عليه برضه). مقفولة = display:none (من main.css). */
  .nav {
    top: 100%; inset-inline: auto 0; width: min(84vw, 320px); height: calc(100dvh - var(--header-h));
    flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; gap: 0;
    padding: 8px 20px 24px; overflow-y: auto; overscroll-behavior: contain; font-size: 16px;
    border-inline-start: 1px solid var(--border); box-shadow: none; z-index: 2;
  }
  /* الفتح = كشف من ناحية الزرار بـ clip-path. مش transform: عنصر بيتحرك من برا الشاشة بيوسع عرض الصفحة على الموبايل (اتقاس: 710 بدل 390). */
  .nav.open { animation: nav-drawer-in 220ms ease; }
  /* الخلفية المعتمة تحت الهيدر (الضغط عليها بيقفل — site.js) */
  html.nav-open .site-header::after { content: ""; position: absolute; top: 100%; inset-inline: 0; height: 100dvh; background: rgb(1 28 28 / 0.45); z-index: 1; animation: nav-backdrop-in 220ms ease; }
  .nav a { display: flex; align-items: center; min-height: 48px; border-bottom: 1px solid var(--border); text-decoration: none; }
  .nav a[aria-current] { font-weight: 700; }
  .nav.open .nav-extra { display: flex; gap: 8px; justify-content: center; font-weight: 700; color: var(--primary-text); border-bottom: 0; }
  .nav.open .nav-extra-book { margin-top: 18px; background: var(--primary); color: var(--primary-foreground); border-radius: 12px; }
  html.nav-open { overflow: hidden; }
  html.nav-open .mobile-bar { transform: translateY(110%); }
  /* الفورم قبل اللوحة البترولي */
  .booking-grid > .booking-form { order: -1; }
  /* 16px: آيفون بيعمل زووم لوحده على أي حقل أصغر */
  .field { font-size: 14px; }
  .field input, .field select, .field textarea { font-size: 16px; padding-inline: 12px; }
  .book-cta { padding: 20px; }
  .book-cta-actions { width: 100%; }
  .book-cta-actions .btn { flex: 1 1 auto; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .mobile-bar { transition: none; } }

/* ═════════════ المتابعة 43 (أ-4): الرئيسية على الموبايل ═════════════ */
.programs-mobile, .athletic-mobile-link { display: none; }
@media (max-width: 767px) {
  /* البرامج: 3 كروت مختصرة + زرار واحد «كل البرامج» — القايمة الكاملة للديسكتوب */
  .programs-section .program-filters, .programs-section .program-split { display: none; }
  .programs-mobile { display: block; margin-top: 22px; }
  .programs-mobile-cards { display: grid; gap: 12px; }
  .programs-mobile-card { display: block; padding: 18px 18px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--foreground); text-decoration: none; }
  .programs-mobile-card h3 { font-size: 18px; line-height: 1.5; margin: 0 0 6px; }
  .programs-mobile-card p { margin: 0 0 10px; font-size: 15px; line-height: 1.7; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .programs-mobile-card .text-link { font-size: 15px; }
  .programs-mobile-all { width: 100%; justify-content: center; margin-top: 16px; min-height: 48px; }
  /* الشريط الداكن: العنوان + السطر + الزرار — جدول المراحل والقياسات مكانه صفحة البرنامج */
  .athletic-section .progress-rail { display: none; }
  .athletic-mobile-link { display: inline-flex; margin-top: 22px; min-height: 48px; background: transparent; color: var(--primary-foreground); border: 1.5px solid var(--on-primary-outline); }
}

/* ═════════════ المتابعة 43 (أ-5): القراية ═════════════ */
/* جدول المقارنة على الموبايل ← كروت (كان 520px في شاشة 350 والعمود التالت برا الشاشة) */
@media (max-width: 767px) {
  .compare-table { min-width: 0; display: block; }
  .compare-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .compare-table tbody { display: grid; gap: 12px; }
  .compare-table tr { display: block; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
  .compare-table th[scope="row"] { display: block; padding: 0 0 10px; border-bottom: 1px solid var(--border); font-size: 16px; }
  .compare-table td { display: block; padding: 10px 0 0; border-bottom: 0; }
  .compare-table td::before { content: attr(data-label); display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-bottom: 2px; }
  /* لينكات الفوتر: 44px ارتفاع لمس */
  .footer-links { gap: 0; }
  .footer-links a { display: flex; align-items: center; min-height: 44px; }
  .footer-address a { display: inline-flex; align-items: center; min-height: 44px; }
}
@keyframes nav-drawer-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
[dir="ltr"] .nav.open { animation-name: nav-drawer-in-ltr; }
@keyframes nav-drawer-in-ltr { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
@keyframes nav-backdrop-in { from { opacity: 0; } }
/* المتابعة 45: «متى تفضل الموعد؟ (اختياري)» = عنوان مجموعة، وتحته «اليوم» و«الوقت» في سطر واحد */
.field-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.field-group legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 700; color: var(--foreground); }
.field-group-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-group-row .field { font-weight: 400; color: var(--muted-foreground); }
/* المتابعة 45: من غير صورة (صور البرامج المولدة اتشالت) — كارت القصة من غير مساحة صورة فاضية، والشارة فوق */
.recovery-photo.is-empty { aspect-ratio: auto; padding: 14px 14px 0; }
.recovery-photo.is-empty > span { position: static; display: inline-block; background: var(--secondary); }
/* المتابعة 45: كروت المسار من غير صورة (الصور المولدة اتشالت) — لون المسار كامل وطول أقل */
.path-card.no-photo { height: auto; min-height: 260px; background: var(--path-tone); }
.path-card.no-photo:after { display: none; }
/* المحتوى في مكانه الطبيعي تحت الرقم (مش absolute) — الكارت بطول محتواه ومفيش تداخل */
.path-card.no-photo { display: flex; flex-direction: column; justify-content: flex-end; padding: 76px 27px 27px; }
.path-card.no-photo .path-content { position: static; }
@media (max-width: 767px) { .path-card.no-photo { min-height: 0; padding: 72px 22px 22px; } }
/* المتابعة 47: أي كارت من غير صورة = كارت نص — مفيش مساحة صورة، والشارة جوه الكارت فوق التاريخ */
article.blog-card.no-media { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 22px 18px; }
article.blog-card.no-media > a { display: block; height: 100%; }
article.blog-card.no-media .blog-category { position: static; display: inline-block; background: var(--secondary); }
article.blog-card.no-media small { margin-top: 12px; }
.item-card.no-media { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 18px 14px; }
.item-card.no-media h3 { margin-top: 0; }
/* المتابعة 47: برامج الرئيسية من غير لوحة المعاينة — القايمة بعرض كامل (عمودين على الديسكتوب)، كل البرامج ظاهرة من غير سكرول داخلي */
.program-split.no-preview { display: block; }
.program-split.no-preview .program-list-wrap::before, .program-split.no-preview .program-list-wrap::after { display: none; }
.program-split.no-preview .program-list { position: static; overflow: visible; padding-inline-start: 0; }
@media (min-width: 1024px) {
  .program-split.no-preview .program-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
}

/* المتابعة 51: لوحة البرامج من غير الأرقام — مسافة بين اسم البرنامج والأزرار */
.program-preview-body .program-preview-actions { margin-top: 14px; justify-content: flex-start; }

/* === المتابعة 70: كروت بنسبة 3:2 (موافقة المستخدم) — الصورة البارزة عليها إطار وكلام، فالقص كان بيقطع العنوان ===
   المدونة والهابات (blog.css) · «المدونة» و«برامجنا» في الرئيسية. الكروت من غير صورة زي ما هي. */
.blog-card-media:has(img) { height: auto; aspect-ratio: 3 / 2; }
.blog-featured .blog-card-media:has(img) { min-height: 0; align-self: center; }
.blog-image { height: auto; aspect-ratio: 3 / 2; }
.blog-image .blog-category { top: 12px; bottom: auto; }
.program-preview-photo { aspect-ratio: 3 / 2; }
.program-preview-photo:after { content: none; } /* التدرج الغامق كان بيطفي كلام الإطار */
.program-photo-caption { display: none; } /* السطر كان بيغطي لوجو الإطار */
@media (max-width: 767px) {
  .blog-image { height: auto; }
  .blog-card:not(.blog-featured):has(.blog-card-media img) { flex-direction: column; padding: 0; gap: 0; overflow: hidden; }
  .blog-card:not(.blog-featured) .blog-card-media:has(img) { flex: none; width: 100%; height: auto; border-radius: 0; }
  .blog-card:not(.blog-featured):has(.blog-card-media img) .blog-card-body { padding: 14px 16px 16px; }
}
