/* ==========================================================================
   مركز السكنى الطبي — تصميم الموقع العام
   الهوية: كحلي #24486c · فيروزي · كريمي — خطوط IBM Plex Sans Arabic و Noto Kufi Arabic
   ========================================================================== */

/* الخطوط: نفس خطوط الموقع الأصلي، مستضافة محلياً (رخصة OFL) */
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-regular.woff") format("woff"); }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-medium.woff") format("woff"); }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-semibold.woff") format("woff"); }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-bold.woff") format("woff"); }
@font-face { font-family: "Noto Kufi Arabic"; font-style: normal; font-weight: 600 800; font-display: swap; src: url("../fonts/noto-kufi-arabic-var.woff") format("woff"); }

:root {
  --bg: #fbf9f5;
  --bg-tint: #f4f0e6;
  --surface: #ffffff;
  --ink: #0f2a43;
  --text: #24364a;
  --muted: #627285;
  --line: #e9e3d7;
  --line-strong: #ddd5c6;
  --primary: #24486c;
  --primary-ink: #fbf9f5;
  --teal: #1d6f78;
  --teal-600: #175e66;
  --teal-accent: #2a7f87;
  --teal-soft: #e5f1f0;
  --teal-softer: #f0f7f6;
  --cream: #f6f1c9;
  --sky: #5cb8cd;
  --sage: #b4cfb8;
  --wa: #1c9a57;
  --wa-soft: #e6f5ec;
  --danger: #b4232f;
  --radius: 20px;
  --radius-sm: 14px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(15, 42, 67, .05), 0 2px 8px rgba(15, 42, 67, .04);
  --shadow: 0 2px 6px rgba(15, 42, 67, .05), 0 12px 32px rgba(15, 42, 67, .07);
  --shadow-lg: 0 24px 60px rgba(15, 42, 67, .18);
  --font: "IBM Plex Sans Arabic", "Noto Kufi Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --font-head: "Noto Kufi Arabic", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --tabbar-h: 68px;
  --topbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b));
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); margin: 0; line-height: 1.35; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--teal) 55%, transparent); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--teal-soft); color: var(--ink); }

.ic { flex: none; display: inline-block; vertical-align: middle; }
.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 18px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }
.hp { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap; margin: -1px; padding: 0; border: 0; }

/* ---------- شريط الإعلان ---------- */
.announce {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--primary); color: var(--primary-ink);
  font-size: 13.5px; padding: 8px 16px; text-align: center;
  padding-top: calc(8px + var(--safe-t));
}

/* ---------- الشريط العلوي ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
  padding-top: var(--safe-t);
}
.announce + .topbar { padding-top: 0; }
.topbar.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(15, 42, 67, .05); }
.topbar-in { display: flex; align-items: center; gap: 12px; height: var(--topbar-h); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo { width: 38px; height: 40px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { font-family: var(--font-head); color: var(--ink); font-size: 16px; font-weight: 800; white-space: nowrap; }
.brand-text small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mainnav { display: none; }
.top-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 14px;
  display: inline-grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--primary);
  transition: transform .15s var(--ease), background .2s;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn-wa { color: var(--wa); }
.hide-sm { display: none !important; }

/* ---------- الأزرار ---------- */
.pill, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  font-weight: 600; transition: transform .15s var(--ease), background .2s, box-shadow .2s, color .2s, border-color .2s;
  user-select: none;
}
.pill { height: 42px; padding: 0 16px; border-radius: 999px; font-size: 14.5px; }
.pill-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.pill-primary { background: var(--teal); color: #fff; box-shadow: 0 6px 16px rgba(29, 111, 120, .25); }
.pill-primary:hover { background: var(--teal-600); }
.btn { min-height: 48px; padding: 0 20px; border-radius: 16px; font-size: 15.5px; }
.btn:active, .pill:active { transform: scale(.97); }
.btn-lg { min-height: 54px; padding: 0 24px; font-size: 16.5px; border-radius: 18px; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 8px 20px rgba(29, 111, 120, .25); }
.btn-primary:hover { background: var(--teal-600); }
.btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn-soft { background: var(--teal-soft); color: var(--teal-600); }
.btn-soft:hover { background: #d7ebe9; }
.btn-wa { background: var(--wa-soft); color: #137a43; }
.btn-wa:hover { background: #d5efdf; }
.btn-link { background: none; color: var(--teal); padding-inline: 6px; min-height: 40px; }
.btn-link:hover { color: var(--teal-600); }
.btn-light { background: #fff; color: var(--primary); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .08); }
.btn[disabled] { opacity: .65; pointer-events: none; }
.link { display: inline-flex; align-items: center; gap: 6px; color: var(--teal); font-weight: 600; font-size: 14.5px; }
.link:hover { color: var(--teal-600); }

/* ---------- عناصر مشتركة ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.chip-icon {
  width: 46px; height: 46px; border-radius: 15px; display: inline-grid; place-items: center; flex: none;
  background: var(--teal-soft); color: var(--teal);
}
.chip-sm { width: 34px; height: 34px; border-radius: 11px; }
.chip-lg { width: 72px; height: 72px; border-radius: 22px; margin-inline: auto; }
.chip-solid { background: var(--teal); color: #fff; }
.chip-muted { background: #f0eee9; color: #8a95a2; }
.chip-cream { background: var(--cream); color: var(--primary); }
.chip-wa { background: var(--wa-soft); color: var(--wa); }
.chip-ig { background: #fbeaf1; color: #c13584; }
.eyebrow { display: inline-block; color: var(--teal-accent); font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.eyebrow-light { color: #9fd6dd; }
.eyebrow-en { font-family: var(--font); letter-spacing: .02em; }
.eyebrow-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--teal-softer); border: 1px solid #d4e7e5; color: var(--teal-600);
  font-size: 13px; font-weight: 600; padding: 5px 14px; border-radius: 999px;
}
.h1 { font-size: clamp(28px, 6.4vw, 46px); font-weight: 800; letter-spacing: -.01em; }
.h2 { font-size: clamp(25px, 5.4vw, 38px); font-weight: 800; letter-spacing: -.01em; }
.h3 { font-size: clamp(19px, 4.2vw, 23px); font-weight: 700; }
.lead { font-size: clamp(16px, 3.9vw, 18px); color: var(--muted); line-height: 1.95; }
.lead-sm { font-size: 16.5px; color: var(--muted); line-height: 1.95; margin-top: 12px; }
.badge-soon { background: #f0eee9; color: #7c8794; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.badge-live { display: inline-flex; align-items: center; gap: 8px; background: var(--teal-softer); color: var(--teal-600); font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px; margin-bottom: 12px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #2fb57a; box-shadow: 0 0 0 4px rgba(47, 181, 122, .18); }

.checks { list-style: none; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--text); line-height: 1.7; }
.checks li .ic { color: var(--teal); margin-top: 4px; }
.checks-sm li { font-size: 13.5px; }
.checks-sm li .ic { margin-top: 3px; }

.scroller { scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }

/* ---------- الأقسام العامة ---------- */
.section { padding: 56px 0; position: relative; }
.section-flush { padding-top: 8px; }
.section-tint { background: linear-gradient(180deg, var(--bg-tint), var(--bg)); }
.section-dark { background: radial-gradient(120% 120% at 100% 0%, #2c5a85 0%, var(--primary) 45%, #173450 100%); color: #dfe8f0; }
.section-dark .h2 { color: #fff; }
.section-dark .lead-sm { color: #c3d2df; }
.section-head { margin-bottom: 26px; max-width: 720px; }
.section-head p { color: var(--muted); margin-top: 10px; font-size: 16px; }
.section-head-row { display: flex; align-items: end; justify-content: space-between; gap: 16px; max-width: none; flex-wrap: wrap; }
.block-title { margin: 32px 0 16px; }

/* ---------- البطل ---------- */
.hero { position: relative; overflow: hidden; padding: 28px 0 40px; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(36, 72, 108, .045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(36, 72, 108, .045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 70% at 70% 20%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 20%, #000 30%, transparent 75%);
}
.hero-deco {
  position: absolute; width: 520px; height: 520px; border-radius: 50%;
  inset-inline-end: -260px; top: -200px; pointer-events: none;
  border: 56px solid rgba(92, 184, 205, .08);
  box-shadow: 0 0 0 1px rgba(36, 72, 108, .05) inset;
}
.hero-grid { position: relative; display: grid; gap: 22px; }
.hero h1 { font-size: clamp(32px, 8.6vw, 60px); font-weight: 800; line-height: 1.22; margin: 16px 0 16px; letter-spacing: -.015em; }
.hero h1 span { display: block; }
.hero h1 .accent { color: var(--teal-accent); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-cta .btn { flex: 1 1 auto; }
.hero-note {
  display: flex; align-items: center; gap: 12px; margin-top: 18px;
  padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .7); border: 1px dashed var(--line-strong);
  width: fit-content; max-width: 100%;
}
.hero-note strong { display: block; color: var(--ink); font-size: 14.5px; }
.hero-note small { display: block; color: var(--muted); font-size: 13px; }
.hero-side { display: grid; gap: 12px; align-content: start; }
.hours-card { padding: 20px; }
.hours-top { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.hours-top h2 { font-size: 17px; }
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.status-dot.is-open { color: #198754; }
.status-dot.is-open::before { background: #2fb57a; box-shadow: 0 0 0 4px rgba(47, 181, 122, .18); }
.status-dot.is-closed { color: #a0552a; }
.status-dot.is-closed::before { background: #e08a4f; }
.hours { margin: 0; display: grid; gap: 8px; }
.hours div { display: flex; justify-content: space-between; gap: 10px; padding: 11px 14px; background: var(--bg); border-radius: 12px; flex-wrap: wrap; }
.hours dt { color: var(--muted); font-size: 14px; }
.hours dd { margin: 0; color: var(--ink); font-weight: 600; font-size: 14.5px; }
.hours-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.loc-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.loc-card strong { display: block; color: var(--ink); font-size: 14.5px; }
.loc-card small { display: block; color: var(--muted); font-size: 13px; }
.loc-card .icon-btn { margin-inline-start: auto; }

/* ---------- عن المركز ---------- */
.about-grid { display: grid; gap: 24px; }
.feature-grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.feature { display: flex; flex-direction: column; gap: 10px; padding: 18px; }
.feature h3 { font-size: 16.5px; }
.feature p { font-size: 14px; color: var(--muted); line-height: 1.8; flex: 1; }
.feature .link { font-size: 13.5px; }

/* ---------- الأقسام ---------- */
.dep-grid {
  display: grid; grid-auto-flow: column; grid-auto-columns: 86%;
  gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin-inline: -18px; padding: 4px 18px 12px; scroll-padding-inline: 18px;
}
.dep-grid > * { scroll-snap-align: start; }
.dep-grid-page { grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; margin: 0; padding: 0; }
.dep-card { display: flex; flex-direction: column; gap: 12px; padding: 22px; }
.dep-top { display: flex; align-items: center; justify-content: space-between; }
.dep-card h3 { font-size: 21px; }
.dep-card h3 a:hover { color: var(--teal); }
.dep-card > p { color: var(--muted); font-size: 14.5px; line-height: 1.85; }
.dep-card .checks { margin-top: 4px; flex: 1; }
.dep-actions { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.dep-actions .btn-soft { flex: 1; }
.dep-card.is-soon { background: repeating-linear-gradient(135deg, #fff, #fff 12px, #fcfbf8 12px, #fcfbf8 24px); border-style: dashed; }
.dep-card.is-soon h3, .dep-card.is-soon > p { color: #8a95a2; }

/* ---------- الأجهزة ---------- */
.device {
  display: grid; gap: 22px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 18px; box-shadow: var(--shadow-sm); margin-bottom: 18px;
}
.device-visual { border-radius: 22px; overflow: hidden; background: linear-gradient(150deg, #e9f4f5, #f6f1e2); min-height: 220px; display: grid; place-items: center; }
.device-visual img { width: 100%; height: 100%; object-fit: cover; }
.device-art { position: relative; width: 220px; height: 220px; display: grid; place-items: center; }
.ring { position: absolute; border-radius: 50%; border: 2px solid rgba(36, 72, 108, .16); animation: pulse 3.6s var(--ease) infinite; }
.r1 { inset: 30%; border-color: rgba(29, 111, 120, .5); }
.r2 { inset: 16%; animation-delay: .5s; }
.r3 { inset: 2%; animation-delay: 1s; border-color: rgba(92, 184, 205, .35); }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.05); opacity: .55; } }
.device-abbr { font-family: var(--font); font-weight: 800; font-size: 34px; letter-spacing: .06em; color: var(--primary); }
.device-text .h3, .device-text .h1 { margin-bottom: 4px; }
.device-text .en { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.device-text > p:not(.en) { color: var(--text); font-size: 15.5px; line-height: 1.95; margin-bottom: 16px; }
.checks-2 { grid-template-columns: 1fr; }

/* ---------- الأطباء ---------- */
.doc-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: 64%;
  gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin-inline: -18px; padding: 4px 18px 12px; scroll-padding-inline: 18px;
}
.doc-row > * { scroll-snap-align: start; }
.doc-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.doc-row.doc-grid { grid-auto-flow: column; }
.doc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s; }
.doc-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.doc-photo { display: block; aspect-ratio: 1 / 1; background: linear-gradient(160deg, #eef6f6, #f7f3e7); overflow: hidden; }
.doc-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.doc-card:hover .doc-photo img { transform: scale(1.03); }
.doc-ph { display: grid; place-items: center; width: 100%; height: 100%; color: #a6b4c2; }
.doc-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.doc-body h3 { font-size: 17.5px; }
.doc-body h3 a:hover { color: var(--teal); }
.doc-title { color: var(--teal-accent); font-size: 14px; font-weight: 600; }
.doc-body .checks { margin-top: 4px; }
.more { color: var(--muted); font-size: 13px; }
.doc-actions { display: flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.doc-actions .btn-soft { flex: 1; }
.doc-card-compact .doc-body { gap: 4px; }

/* ---------- الأسئلة ---------- */
.faq { display: grid; gap: 10px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: border-color .2s; }
.faq-item[open] { border-color: #cfe3e1; box-shadow: var(--shadow-sm); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; font-weight: 600; color: var(--ink); font-size: 15.5px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .ic { color: var(--teal); transition: transform .25s var(--ease); }
.faq-item[open] summary .ic { transform: rotate(180deg); }
.faq-a { padding: 0 18px 16px; color: var(--muted); font-size: 15px; }
.faq-a p + p { margin-top: 8px; }
.faq-wrap { display: grid; gap: 8px; }
.center-actions { display: flex; justify-content: center; gap: 10px; margin-top: 24px; flex-wrap: wrap; }

/* ---------- التواصل ---------- */
.contact-grid { display: grid; gap: 26px; }
.contact-cards { display: grid; gap: 10px; }
.contact-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: 18px;
  transition: background .2s, transform .15s var(--ease);
}
.contact-card:hover { background: rgba(255, 255, 255, .11); }
.contact-card:active { transform: scale(.98); }
.contact-card small { display: block; color: #a9bccd; font-size: 13px; }
.contact-card strong { display: block; color: #fff; font-size: 17px; font-family: var(--font); }
.section-dark .chip-icon { background: rgba(255, 255, 255, .1); color: #fff; }
.section-dark .chip-wa { background: rgba(37, 211, 102, .16); color: #6fe3a1; }
.section-dark .chip-ig { background: rgba(225, 48, 108, .16); color: #ff9cc1; }

/* ---------- الصفحات الداخلية ---------- */
.page-head { padding: 18px 0 22px; }
.page-head-slim { padding-bottom: 6px; }
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.crumbs a:hover { color: var(--teal); }
.crumbs .sep { opacity: .5; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.crumbs .back { width: 34px; height: 34px; border-radius: 11px; display: inline-grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--ink); margin-inline-end: 4px; }
.page-head .h1 { margin-top: 2px; }
.page-head .lead-sm { max-width: 760px; }
.detail-grid { display: grid; gap: 18px; }
.detail-main { display: grid; gap: 16px; align-content: start; min-width: 0; }
.detail-main > .h3.block-title { margin: 14px 0 0; }
.detail-side { min-width: 0; }
.sticky-card { display: grid; gap: 12px; }
.sticky-card p { color: var(--muted); font-size: 14.5px; }
.prose p { font-size: 16px; line-height: 2; color: var(--text); }
.prose p + p { margin-top: 12px; }
.prose .h3 { margin: 22px 0 12px; }
.card-title { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 18px; }
.card-title .ic { color: var(--teal); }
.profile-card { display: grid; gap: 10px; justify-items: center; text-align: center; }
.profile-photo { width: 100%; max-width: 280px; aspect-ratio: 1; border-radius: 24px; overflow: hidden; background: linear-gradient(160deg, #eef6f6, #f7f3e7); margin-bottom: 6px; }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-card .doc-title { margin-bottom: 4px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.chip:hover { border-color: var(--teal); color: var(--teal); }
.chip-count { background: var(--teal-soft); color: var(--teal-600); border-radius: 999px; padding: 0 8px; font-size: 12px; }
.tabs-chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 12px; margin-bottom: 8px; }
.team-group { padding-bottom: 28px; }
.group-head { margin-bottom: 16px; }
.sched { margin: 0; display: grid; gap: 8px; }
.sched div { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; background: var(--bg); border-radius: 12px; }
.sched dt { color: var(--ink); font-weight: 600; }
.sched dd { margin: 0; color: var(--muted); }
.cta-band {
  display: grid; gap: 16px; align-items: center;
  padding: 26px; border-radius: var(--radius-lg);
  background: radial-gradient(120% 140% at 0% 0%, #2a7f87 0%, var(--teal) 40%, #164f57 100%); color: #e6f3f2;
}
.cta-band .h3 { color: #fff; margin-bottom: 6px; }
.cta-band p { color: #cfe7e5; font-size: 15px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cta-actions .btn { flex: 1 1 auto; }
.empty-page { padding: 60px 0 80px; }
.empty-logo { width: 72px; height: 76px; margin: 0 auto 16px; }
.empty-page .lead-sm { margin-inline: auto; max-width: 520px; }

/* ---------- الحجز ---------- */
.book-page { display: grid; gap: 16px; }
.book-card { padding: 22px 18px; }
.book-aside { display: grid; gap: 16px; align-content: start; }
.book-head { margin-bottom: 18px; }
.book-head h2 { font-size: 24px; margin: 12px 0 6px; }
.book-head p { color: var(--muted); font-size: 14.5px; }
.book-form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-weight: 600; color: var(--ink); font-size: 14.5px; padding: 0; }
.field legend { margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 16px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 14px; outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s; -webkit-appearance: none; appearance: none;
}
.field input[type="date"] { text-align: start; }
.field input::placeholder { color: #9aa5b1; }
.field input:focus, .field select:focus { border-color: var(--teal); background: #fff; box-shadow: 0 0 0 4px rgba(29, 111, 120, .12); }
.field.has-err input, .field.has-err select { border-color: var(--danger); }
.select { position: relative; }
.select select { padding-inline-end: 44px; cursor: pointer; }
.select-ic { position: absolute; inset-inline-end: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.err { color: var(--danger); font-size: 13px; min-height: 0; }
.err:empty { display: none; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg-opt { position: relative; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { display: grid; gap: 2px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--bg); transition: all .2s; height: 100%; }
.seg-opt strong { font-size: 14.5px; color: var(--ink); }
.seg-opt small { font-size: 12.5px; color: var(--muted); }
.seg-opt input:checked + span { border-color: var(--teal); background: var(--teal-softer); box-shadow: 0 0 0 3px rgba(29, 111, 120, .1); }
.seg-opt input:focus-visible + span { outline: 3px solid rgba(29, 111, 120, .4); }
.consent { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--wa-soft); cursor: pointer; font-size: 14px; color: var(--ink); line-height: 1.7; }
.consent input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--wa); flex: none; }
.consent .ic { color: var(--wa); vertical-align: -4px; }
.consent small { display: block; color: var(--muted); font-size: 12.5px; }
.fine { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); text-align: center; }
.fine a { color: var(--teal); text-decoration: underline; }
.alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 12px; }
.alert-error { background: #fdecee; color: #8a1c25; }
.book-done { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 10px 0; }
.book-done[hidden] { display: none; }
.book-done p { color: var(--muted); }
.done-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: #fff; box-shadow: 0 0 0 10px var(--teal-soft); margin: 8px 0; animation: pop .45s var(--ease); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ref { background: var(--bg); padding: 8px 14px; border-radius: 12px; font-size: 14px; }
.ref strong { color: var(--ink); letter-spacing: .05em; }
.steps { list-style: none; counter-reset: s; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; }
.steps li::before { content: counter(s); grid-row: span 2; width: 36px; height: 36px; border-radius: 12px; background: var(--teal-soft); color: var(--teal); display: grid; place-items: center; font-weight: 700; }
.steps strong { color: var(--ink); font-size: 15px; }
.steps span { color: var(--muted); font-size: 14px; }

/* ---------- النافذة السفلية (Bottom sheet) ---------- */
.sheet {
  border: 0; padding: 0; margin: 0; width: 100%; max-width: 100%;
  max-height: 92dvh; inset: auto 0 0 0; position: fixed;
  border-radius: 26px 26px 0 0; background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.sheet[open] { display: flex; flex-direction: column; animation: sheet-up .35s var(--ease); }
.sheet.closing { animation: sheet-down .25s ease-in forwards; }
.sheet::backdrop { background: rgba(10, 25, 40, .45); backdrop-filter: blur(3px); animation: fade .3s; }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-down { to { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
.sheet-handle { width: 44px; height: 5px; border-radius: 9px; background: #dcd6ca; margin: 10px auto 0; flex: none; }
.sheet-close { position: absolute; top: 12px; inset-inline-end: 12px; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; z-index: 2; }
.sheet-body { overflow-y: auto; padding: 8px 20px calc(20px + var(--safe-b)); overscroll-behavior: contain; }
body.sheet-open { overflow: hidden; }

/* ---------- شريط التبويب السفلي (للجوال) ---------- */
.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 45;
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: color-mix(in srgb, #fff 90%, transparent);
  backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(15, 42, 67, .06);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 100%; color: #7d8a98; font-size: 11.5px; font-weight: 600; transition: color .2s; }
.tabbar a.on { color: var(--teal); }
.tabbar a:active .ic { transform: scale(.9); }
.tabbar .ic { transition: transform .15s; }
.tab-book-btn { width: 52px; height: 52px; margin-top: -26px; border-radius: 18px; display: grid; place-items: center; background: var(--teal); color: #fff; box-shadow: 0 10px 22px rgba(29, 111, 120, .35), 0 0 0 5px var(--bg); }
.tab-book { color: var(--teal) !important; }

/* ---------- لافتة التثبيت ---------- */
.install {
  position: fixed; z-index: 44; inset-inline: 12px; bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px);
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  animation: sheet-up .4s var(--ease);
}
.install[hidden] { display: none; }
.install-logo { width: 34px; height: 36px; flex: none; }
.install-text { display: grid; line-height: 1.4; min-width: 0; flex: 1; }
.install-text strong { color: var(--ink); font-size: 14px; }
.install-text span { color: var(--muted); font-size: 12.5px; }
.install .pill { height: 38px; padding: 0 14px; }
.install-x { border: 0; background: none; color: var(--muted); width: 32px; height: 32px; display: grid; place-items: center; cursor: pointer; }

/* ---------- التذييل ---------- */
.footer { background: #0f2236; color: #b7c6d4; padding: 40px 0 18px; font-size: 14.5px; }
.footer-grid { display: grid; gap: 26px; grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; }
.footer .brand-text strong { color: #fff; }
.footer .brand-text small { color: #8ea3b6; }
.footer-brand p { margin-top: 12px; color: #8ea3b6; }
.footer h3 { color: #fff; font-size: 15px; margin-bottom: 10px; }
.footer-grid > div > a, .footer-grid > div > span { display: block; padding: 3px 0; }
.footer-grid > div > a:hover { color: #fff; }
.footer-bottom { display: grid; gap: 6px; border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 28px; padding-top: 16px; font-size: 12.5px; color: #8094a7; }

/* ---------- حركة الظهور ---------- */
.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- الرؤية والأهداف والقيم ---------- */
.section-vision { background: linear-gradient(180deg, var(--bg) 0%, var(--teal-softer) 45%, var(--bg-tint) 100%); }
.vg-grid { display: grid; gap: 14px; }
.vg-label { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.vg-label h3 { font-size: 19px; }
.vg-label .chip-icon { width: 42px; height: 42px; border-radius: 13px; }
.vision-card {
  position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column;
  border-radius: var(--radius-lg); padding: 26px 22px 22px; color: #dfe8f0; box-shadow: var(--shadow);
  background: radial-gradient(120% 120% at 100% 0%, #2c5a85 0%, var(--primary) 50%, #173450 100%);
}
.vision-card .vg-label h3 { color: #fff; }
.vision-card .chip-icon { background: rgba(255, 255, 255, .12); color: #9fd6dd; }
.vision-mark { position: absolute; inset-inline-end: -70px; bottom: -70px; width: 240px; height: 240px; border-radius: 50%; z-index: -1;
  border: 2px solid rgba(159, 214, 221, .16); box-shadow: 0 0 0 26px rgba(159, 214, 221, .05), 0 0 0 54px rgba(159, 214, 221, .035); }
.vision-text { font-family: var(--font-head); font-weight: 700; font-size: clamp(18.5px, 4.6vw, 25px); line-height: 1.95; color: #fff; }
.vision-foot { margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; align-items: center; gap: 10px; color: #b7c6d4; font-size: 13.5px; font-weight: 600; }
.vision-logo { width: 26px; height: 27px; flex: none; background: #fbf9f5; border-radius: 8px; padding: 2px; }
.goals-card { padding: 22px 20px; }
.goals { list-style: none; margin: 0; padding: 0; display: grid; }
.goals li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px dashed var(--line-strong); font-size: 15px; line-height: 1.85; color: var(--text); }
.goals li:first-child { border-top: 0; padding-top: 2px; }
.goal-n { flex: none; min-width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; margin-top: 1px;
  background: var(--teal-soft); color: var(--teal-600); font-family: var(--font); font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.values-head { display: flex; align-items: center; gap: 10px; margin: 34px 0 14px; }
.values-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.value { display: flex; flex-direction: column; gap: 8px; padding: 18px 15px; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
.value:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d4e7e5; }
.value .chip-icon { width: 42px; height: 42px; border-radius: 13px; }
.value:nth-child(4n+2) .chip-icon { background: var(--cream); color: var(--primary); }
.value:nth-child(4n+3) .chip-icon { background: #e4f3f7; color: #1f6f83; }
.value:nth-child(4n+4) .chip-icon { background: #e6efe7; color: #3c6b48; }
.value h4 { font-size: 15.5px; font-weight: 700; }
.value p { font-size: 13.5px; color: var(--muted); line-height: 1.8; }

/* ---------- زر اللغة ---------- */
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 13.5px;
  transition: border-color .2s, color .2s, background .2s; white-space: nowrap;
}
.lang-btn:hover { border-color: var(--teal); color: var(--teal); }
.lang-btn .ic { color: var(--teal); }
.lang-btn .lang-full { display: none; }
.lang-btn .lang-short { font-family: var(--font); letter-spacing: .02em; }
.lang-btn[lang="ar"] { font-family: "IBM Plex Sans Arabic", sans-serif; }

/* ---------- النسخة الإنجليزية ---------- */
html[lang="en"] { --font: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif; --font-head: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif; }
html[lang="en"] body { line-height: 1.7; }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] .h1, html[lang="en"] .h2 { font-weight: 700; letter-spacing: -.015em; }
html[lang="en"] .vision-text { font-weight: 600; line-height: 1.7; }
html[lang="en"] .eyebrow { letter-spacing: .02em; }

/* ==========================================================================
   الشاشات المتوسطة
   ========================================================================== */
@media (min-width: 640px) {
  .container { padding-inline: 24px; }
  .dep-grid { grid-auto-columns: 46%; margin-inline: -24px; padding-inline: 24px; scroll-padding-inline: 24px; }
  .dep-grid-page { grid-template-columns: 1fr 1fr; margin: 0; padding: 0; }
  .doc-row { grid-auto-columns: 40%; margin-inline: -24px; padding-inline: 24px; }
  .doc-grid { grid-template-columns: 1fr 1fr; }
  .contact-cards { grid-template-columns: 1fr 1fr; }
  .checks-2 { grid-template-columns: 1fr 1fr; }
  .hero-cta .btn { flex: 0 0 auto; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { grid-template-columns: auto 1fr; justify-content: space-between; }
  .footer-bottom span:last-child { text-align: end; }
  .cta-band { grid-template-columns: 1fr auto; padding: 32px; }
  .cta-actions .btn { flex: 0 0 auto; }
  .sheet { max-width: 560px; inset: 0; margin: auto; border-radius: 26px; max-height: min(88vh, 860px); }
  .sheet[open] { animation: zoom-in .3s var(--ease); }
  .sheet.closing { animation: fade-out .2s ease-in forwards; }
  .sheet-handle { display: none; }
  .sheet-body { padding: 26px 28px 28px; }
  @keyframes zoom-in { from { transform: scale(.94); opacity: 0; } }
  @keyframes fade-out { to { opacity: 0; transform: scale(.97); } }
  .install { inset-inline: auto 24px; max-width: 420px; }
  .lang-btn .lang-full { display: inline; }
  .lang-btn .lang-short { display: none; }
  .values-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .value { padding: 22px 20px; }
}

/* ==========================================================================
   الشاشات الكبيرة (كمبيوتر)
   ========================================================================== */
@media (min-width: 1024px) {
  body { padding-bottom: 0; font-size: 16.5px; }
  :root { --topbar-h: 76px; }
  .tabbar { display: none; }
  .hide-sm { display: inline-flex !important; }
  .show-sm { display: none !important; }
  .brand-logo { width: 44px; height: 46px; }
  .brand-text strong { font-size: 18px; }
  .mainnav { display: flex; gap: 4px; margin-inline: auto; }
  .mainnav a { padding: 8px 14px; border-radius: 12px; color: var(--text); font-weight: 500; font-size: 15px; transition: background .2s, color .2s; }
  .mainnav a:hover { background: rgba(36, 72, 108, .06); color: var(--ink); }
  .mainnav a.on { color: var(--teal); background: var(--teal-softer); }
  .top-actions { margin-inline-start: 0; }
  .section { padding: 88px 0; }
  .section-flush { padding-top: 8px; }
  .hero { padding: 56px 0 80px; }
  .hero-grid { grid-template-columns: 1.35fr .9fr; gap: 48px; align-items: center; }
  .hero-note { margin-top: 26px; }
  .about-grid { grid-template-columns: .95fr 1.05fr; gap: 56px; align-items: center; }
  .about-text { position: sticky; top: 120px; }
  .vg-grid { grid-template-columns: 1fr 1.08fr; gap: 20px; align-items: stretch; }
  .vg-grid.vg-single { grid-template-columns: 1fr; }
  .vision-card { padding: 40px 38px 30px; }
  .vision-mark { width: 320px; height: 320px; }
  .goals-card { padding: 30px 30px 22px; }
  .values-head { margin-top: 48px; }
  .value h4 { font-size: 16.5px; }
  .value p { font-size: 14px; }
  .feature { padding: 22px; }
  .dep-grid { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; margin: 0; padding: 0; }
  .dep-grid-page { grid-template-columns: repeat(3, 1fr); }
  .device { grid-template-columns: .85fr 1.15fr; padding: 24px; gap: 40px; }
  .device-visual { min-height: 360px; }
  .doc-row { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; margin: 0; padding: 0; }
  .doc-row.doc-grid { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); }
  .doc-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .faq-wrap { grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; }
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
  .page-head { padding: 34px 0 30px; }
  .detail-grid { grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
  .detail-doctor { grid-template-columns: 340px 1fr; }
  .detail-side { position: sticky; top: 100px; }
  .book-page { grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: start; }
  .book-card { padding: 34px; }
  .install { bottom: 24px; }
}

@media (min-width: 1280px) {
  .doc-grid { grid-template-columns: repeat(4, 1fr); }
  .detail-main .doc-grid { grid-template-columns: repeat(3, 1fr); }
}

/* وضع التطبيق المثبت */
@media (display-mode: standalone) {
  .install { display: none !important; }
  .topbar { padding-top: max(var(--safe-t), 0px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .topbar, .tabbar, .install, .footer, .sheet, .hero-cta { display: none !important; }
  body { padding: 0; background: #fff; }
}

/* ------------------------------------------------------------------
 * صور المركز: صورة "عن المركز" + جولة في المركز + عارض الصور
 * ----------------------------------------------------------------*/
.about-photo { position: relative; margin: 22px 0 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); background: var(--bg-tint); aspect-ratio: 3 / 2; }
.about-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.about-photo figcaption {
  position: absolute; inset-inline-start: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px; background: rgba(15, 42, 67, .72); color: #fff; font-size: 13px; font-weight: 500;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.section-gallery { background: var(--bg); }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; gap: 10px; grid-auto-flow: dense; }
.g-item { position: relative; display: block; overflow: hidden; border-radius: var(--radius-sm); background: var(--bg-tint); box-shadow: var(--shadow-sm); isolation: isolate; }
.g-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.g-item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(15, 42, 67, .62)); opacity: .9; transition: opacity .3s; pointer-events: none; }
.g-cap { position: absolute; inset-inline: 12px; bottom: 10px; z-index: 1; color: #fff; font-size: 13.5px; font-weight: 600; line-height: 1.4; text-shadow: 0 1px 6px rgba(0, 0, 0, .25); }
.g-item:hover img, .g-item:focus-visible img { transform: scale(1.04); }
.g-item:focus-visible { outline: 3px solid var(--teal-accent); outline-offset: 2px; }
.g-big { grid-column: span 2; grid-row: span 2; }
.g-tall { grid-row: span 2; }
.g-wide { grid-column: span 2; grid-row: span 1; }
.g-tall img { object-position: center 60%; }
@media (min-width: 640px) {
  .gallery { grid-auto-rows: 190px; gap: 12px; }
}
@media (min-width: 1024px) {
  .about-photo { margin-top: 28px; }
  .gallery { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; gap: 14px; }
  .g-cap { font-size: 14.5px; inset-inline: 16px; bottom: 14px; }
}

.lb { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8, 20, 33, .94); color: #fff; }
.lb::backdrop { background: rgba(8, 20, 33, .94); }
.lb[open] { display: grid; grid-template-rows: 1fr auto; }
.lb-stage { position: relative; display: grid; place-items: center; padding: 56px 12px 8px; min-height: 0; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .45); }
.lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px calc(14px + var(--safe-b)); }
.lb-cap { font-size: 15px; font-weight: 600; }
.lb-count { font-size: 13px; opacity: .7; font-variant-numeric: tabular-nums; }
.lb-btn { position: absolute; z-index: 2; width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; }
.lb-btn:hover { background: rgba(255, 255, 255, .22); }
.lb-btn:focus-visible { outline: 2px solid #8fd3e2; outline-offset: 2px; }
.lb-close { top: calc(10px + var(--safe-t)); inset-inline-end: 12px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { inset-inline-start: 12px; }
.lb-next { inset-inline-end: 12px; }
[dir="rtl"] .lb-prev svg, [dir="rtl"] .lb-next svg { transform: scaleX(-1); }
@media (max-width: 639px) { .lb-prev, .lb-next { top: auto; bottom: calc(64px + var(--safe-b)); transform: none; } }
@media (prefers-reduced-motion: reduce) { .g-item img { transition: none; } }

/* رأس الصفحة على الشاشات المتوسطة وبالإنجليزية (كلمات أطول) */
.mainnav a { white-space: nowrap; }
@media (min-width: 1024px) {
  .brand { flex-shrink: 0; }
  html[lang="en"] .mainnav { gap: 2px; }
  html[lang="en"] .mainnav a { padding: 8px 11px; font-size: 14.5px; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  .top-actions .pill-ghost.hide-sm { display: none !important; }
  .mainnav { gap: 0; }
  .mainnav a { padding: 8px 10px; }
  .brand-text strong { font-size: 16.5px; }
}
@media (min-width: 1024px) and (max-width: 1399px) {
  html[lang="en"] .top-actions .pill-ghost.hide-sm { display: none !important; }
}
@media (min-width: 1024px) and (max-width: 1139px) {
  .lang-btn .lang-full { display: none; }
  .lang-btn .lang-short { display: inline; }
  .brand-text small { display: none; }
}
@media (max-width: 1023px) {
  html[lang="en"] .brand-text strong { white-space: normal; font-size: 15px; line-height: 1.15; }
  html[lang="en"] .brand-text small { display: none; }
}
@media (max-width: 379px) {
  html[lang="en"] .brand-text strong { font-size: 13.5px; }
  html[lang="en"] .topbar-in { gap: 8px; }
}
