/* =====================================================================
   mandi-alyemen.com — الصفحة الرئيسية
   أنماط مستوحاة من مكوّنات 21st.dev (floating navbar، animated tabs،
   hero carousel مع مؤشر تقدّم، spotlight cards، dock) مُعاد بناؤها
   بـ CSS خام لأن الموقع PHP بلا React/Tailwind.
   الحركة: عدسة Jakub (صقل هادئ) أساسًا + Jhey في لمسات قليلة،
   وEmil للعناصر المتكرّرة (أزرار، تبديل اللغة) — سريعة وقصيرة.
   ===================================================================== */

:root {
    /* وضع فاتح بالكامل: كريمي دافئ + عنابي الشعار + ذهبي */
    --bg:        #fbf6ef;
    --bg-2:      #ffffff;
    --surface:   #ffffff;
    --surface-2: #f5ece1;
    --line:      rgba(92, 40, 30, .12);
    --line-2:    rgba(92, 40, 30, .24);
    --ink:       #2b1a16;
    --ink-2:     #5c4840;
    --ink-3:     #7a6458;
    --gold:      #dcae5f;
    --gold-ink:  #8a5a12;   /* ذهبي داكن يصلح للنص على الكريمي */
    --maroon:    #8e1f2a;
    --maroon-2:  #b52b38;
    --maroon-ink:#7a1821;
    --teal-ink:  #0d6b74;
    --shadow-card: 0 1px 2px rgba(60, 25, 15, .05), 0 10px 30px -14px rgba(60, 25, 15, .18);

    /* نظام موحّد: زوايا 24/16/12 + حبّة، أيقونات 16/20، مسافات من مضاعفات 8 */
    --radius-lg: 24px;   /* بطاقات، السلايدر، شريط التواصل */
    --radius:    16px;   /* أزرار البطاقة، أيقونات التواصل */
    --radius-sm: 12px;   /* أرقام الهاتف */
    --ic-sm:     16px;
    --ic:        20px;
    --focus:     #8a5a12;   /* حلقة تركيز واحدة لكل العناصر (5.5:1 على الكريمي) */
    --tap:       44px;      /* أصغر هدف لمس */
    --wrap:      1160px;
    --gutter:    16px;

    /* منحنيات: لا ease عاديّة أبدًا */
    --ease-out:    cubic-bezier(.22, 1, .36, 1);     /* دخول العناصر */
    --ease-snap:   cubic-bezier(.32, .72, 0, 1);     /* مؤشر اللغة (شبيه spring بلا ارتداد) */
    --ease-spring: cubic-bezier(.34, 1.4, .64, 1);   /* لمسة مرحة واحدة: أيقونات التواصل */

    --font: 'Cairo', 'Noto Sans Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background:
        radial-gradient(900px 520px at 88% -8%, rgba(181, 43, 56, .10), transparent 62%),
        radial-gradient(760px 480px at -6% 18%, rgba(60, 192, 201, .10), transparent 60%),
        radial-gradient(900px 600px at 50% 110%, rgba(220, 174, 95, .14), transparent 60%),
        var(--bg);
    background-attachment: scroll;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.ic { width: 1.2em; height: 1.2em; flex: none; display: block; }
[dir="ltr"] .ic--flip { transform: scaleX(-1); }
[dir="rtl"] .ic--arrow { transform: scaleX(-1); }

.skip {
    position: fixed; z-index: 100; top: 10px; inset-inline-start: 10px;
    padding: 10px 16px; border-radius: 12px; background: var(--maroon); color: #fff; font-weight: 700;
    text-decoration: none; transform: translateY(-160%);
}
.skip:focus { transform: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ───────── الأزرار (ضغطة قصيرة: 160ms، scale .97) ───────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 0 24px;
    border: 1px solid transparent; border-radius: 999px;
    font-weight: 700; font-size: 16px; line-height: 1.2; text-decoration: none;
    cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
    transition: transform 160ms var(--ease-out), background-color 200ms var(--ease-out),
                border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.btn:active { transform: scale(.97); }
.btn .ic { width: var(--ic); height: var(--ic); }
.btn--gold {
    color: #2a1306;
    background: linear-gradient(180deg, #f6d89c, #dcae5f);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 10px 24px -12px rgba(170, 120, 40, .55);
}
.btn--ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); box-shadow: 0 1px 2px rgba(60, 25, 15, .05); }
@media (hover: hover) and (pointer: fine) {
    .btn--gold:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), 0 14px 28px -12px rgba(170, 120, 40, .7); }
    .btn--ghost:hover { background: var(--surface-2); border-color: var(--line-2); }
}

/* ───────── الشريط العلوي: شعار + اسم في البداية، اللغة في النهاية، بنفس حافّتي المحتوى ───────── */
.nav {
    position: sticky; top: 0; z-index: 50;
    padding: env(safe-area-inset-top) var(--gutter) 0;
    background: rgba(251, 246, 239, .86);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 1px 0 var(--line);
    transition: box-shadow 240ms var(--ease-out);
}
.nav.is-stuck { box-shadow: 0 1px 0 var(--line), 0 8px 24px -16px rgba(60, 25, 15, .25); }
.nav__inner { max-width: var(--wrap); min-height: 72px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav__brand { display: inline-flex; align-items: center; gap: 12px; min-height: var(--tap); text-decoration: none; font-weight: 800; font-size: 18px; line-height: 1.2; min-width: 0; color: var(--maroon-ink); }
.nav__brand img { width: 56px; height: auto; filter: drop-shadow(0 3px 6px rgba(90, 20, 25, .22)); }
.nav__brand span { white-space: nowrap; }

/* مبدّل اللغة (animated tabs) — حبّة ذهبية تنزلق تحت الزر المختار */
.seg {
    position: relative; display: inline-flex; flex: none;
    padding: 4px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(60, 25, 15, .06), 0 6px 18px -10px rgba(60, 25, 15, .18);
}
.seg button {
    position: relative; z-index: 1;
    min-height: var(--tap); padding: 0 16px; border: 0; border-radius: 999px;
    background: transparent; color: var(--ink-2);
    font-weight: 700; font-size: 14px; cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: color 200ms var(--ease-out);
}
.seg button[lang="en"] { font-size: 14px; }
.seg button:active { transform: scale(.96); }
.seg button { transition: color 200ms var(--ease-out), transform 160ms var(--ease-out); }
.seg button[aria-pressed="true"] { color: #2a1306; background: var(--gold); }
.seg__pill { display: none; }
.seg.is-ready button[aria-pressed="true"] { background: transparent; }
.seg.is-ready .seg__pill {
    display: block; position: absolute; top: 4px; bottom: 4px; left: 0;
    width: var(--w, 0); transform: translateX(var(--x, 0));
    border-radius: 999px;
    background: linear-gradient(180deg, #f6d89c, #dcae5f);
    box-shadow: 0 4px 12px -4px rgba(170, 120, 40, .55);
}
.seg.is-animated .seg__pill { transition: transform 280ms var(--ease-snap), width 280ms var(--ease-snap); }

/* ───────── البطل: عمودان بحافّة علوية واحدة ومقياس مسافات 8px ───────── */
.page { display: block; }
.hero {
    max-width: var(--wrap); margin: 0 auto;
    padding: 40px var(--gutter) 48px;
    display: grid; gap: 40px; align-items: center;
    grid-template-columns: minmax(0, 1fr);
}
.hero__copy { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero__title {
    font-size: clamp(32px, 1.6vw + 24px, 48px); font-weight: 800; line-height: 1.3; letter-spacing: -.01em;
    color: var(--maroon-ink);   /* لون صريح: background-clip:text يقصّ نقاط «ي» في العربية */
    text-wrap: balance;
}
.hero__tag  { margin-top: 8px;  font-size: 20px; line-height: 1.5; font-weight: 700; color: var(--gold-ink); }
.hero__lead { margin-top: 16px; max-width: 40ch; font-size: 18px; line-height: 1.7; color: var(--ink-2); }
.hero__ctas { margin-top: 32px; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.stats {
    margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line);
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px;
    color: var(--ink-2); font-size: 15px; font-weight: 600; line-height: 1.4;
}
.stats li { display: inline-flex; align-items: center; gap: 8px; }
.stats b { font-size: 24px; font-weight: 800; color: var(--maroon-2); line-height: 1; }
.stats .ic { color: var(--maroon-2); width: var(--ic); height: var(--ic); }

/* ───────── السلايدر: صورة نظيفة + شريط سفلي (العنوان + حبّة تحكّم واحدة) ───────── */
.slider {
    position: relative; isolation: isolate; width: 100%; max-width: 640px; justify-self: center;
    border-radius: var(--radius-lg); overflow: hidden;
    background: var(--surface); border: 1px solid var(--line);
    box-shadow: 0 1px 2px rgba(60, 25, 15, .05), 0 24px 56px -28px rgba(90, 30, 20, .40);
}
.slider__media { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); }
.slider__track { position: absolute; inset: 0; touch-action: pan-y; }
.slide {
    position: absolute; inset: 0; display: block; text-decoration: none;
    opacity: 0; visibility: hidden;
    transition: opacity 700ms var(--ease-out), visibility 0s linear 700ms;
}
.slide.is-active { opacity: 1; visibility: visible; z-index: 1; transition: opacity 700ms var(--ease-out), visibility 0s; }
.slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 1400ms var(--ease-out); }
.slide.is-active img { transform: none; }

.slider__foot {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    min-height: 72px; padding: 12px 16px 12px 24px;
    border-top: 1px solid var(--line);
}
[dir="rtl"] .slider__foot { padding: 12px 24px 12px 16px; }
/* شريحة واحدة بلا عنوان ولا أزرار → لا شريط فارغ */
.slider__foot:not(:has(.cap__title, .cap__text, .ctrl)) { display: none; }
.caps { position: relative; flex: 1 1 auto; min-width: 0; min-height: 48px; }
.cap {
    position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 0;
    opacity: 0; transform: translateY(6px); visibility: hidden;
    transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out), visibility 0s linear 300ms;
}
.cap.is-active { opacity: 1; transform: none; visibility: visible; transition: opacity 420ms var(--ease-out) 120ms, transform 420ms var(--ease-out) 120ms, visibility 0s; }
.cap__title { font-size: 18px; font-weight: 800; line-height: 1.4; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cap__text  { font-size: 14px; line-height: 1.5; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* حبّة التحكّم: السابق · النقاط · التالي · إيقاف */
.ctrl {
    flex: none; display: inline-flex; align-items: center; gap: 0;
    padding: 4px; border-radius: 999px;
    background: var(--surface-2); border: 1px solid var(--line);
}
.ctrl__btn {
    display: grid; place-items: center; width: var(--tap); height: var(--tap); padding: 0;
    border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 160ms var(--ease-out), background-color 200ms var(--ease-out);
}
.ctrl__btn .ic { width: var(--ic); height: var(--ic); }
.ctrl__btn:active { transform: scale(.92); }
.ctrl__btn:focus-visible { outline-offset: -2px; }
.ctrl__btn, .dot { position: relative; z-index: 1; }
.ctrl__sep { width: 1px; height: 20px; margin: 0 4px; background: var(--line-2); }
.ctrl__btn .ic--play { display: none; }
.slider.is-paused .ctrl__btn .ic--play { display: block; }
.slider.is-paused .ctrl__btn .ic--pause { display: none; }

.dots { display: flex; align-items: center; }
.dot {
    position: relative; width: 24px; height: var(--tap); padding: 0; border: 0; background: none; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.dot:focus-visible { outline-offset: -6px; border-radius: 8px; }
.dot::before, .dot__fill { content: ''; position: absolute; inset-inline: 4px; top: 50%; height: 4px; margin-top: -2px; border-radius: 4px; }
.dot::before { background: rgba(142, 31, 42, .42); transition: background-color 240ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .dot:hover::before { background: rgba(142, 31, 42, .62); } }
/* النقطة النشطة أعرض وأغمق لتُقرأ حالتها حتى قبل امتلاء الشريط */
/* النشط: أعرض (عرض + لون متحرّكان) ويمتلئ بالأحمر طوال مدة الشريحة */
.dot { transition: width 280ms var(--ease-out); }
.dot.is-active { width: 48px; }
.dot__fill { background: var(--maroon-2); transform: scaleX(0); transform-origin: left center; }
[dir="rtl"] .dot__fill { transform-origin: right center; }
.dot.is-active .dot__fill { animation: dotfill var(--slide-ms, 6000ms) linear forwards; }
.slider.is-paused .dot.is-active .dot__fill,
.slider.is-hold   .dot.is-active .dot__fill { animation-play-state: paused; }
.slider.is-paused .dot.is-active .dot__fill { animation: none; transform: none; }
@keyframes dotfill { to { transform: scaleX(1); } }

/* ───────── الأقسام ───────── */
.sec-head { text-align: center; display: grid; justify-items: center; gap: 8px; margin-bottom: 32px; }
.sec-head h2, .social h2 { font-size: clamp(26px, 1.2vw + 20px, 36px); font-weight: 800; line-height: 1.3; color: var(--maroon-ink); text-wrap: balance; }
.sec-head h2::after {
    content: ''; display: block; width: 56px; height: 3px; margin: 12px auto 0; border-radius: 3px;
    background: linear-gradient(90deg, transparent, var(--maroon-2), transparent);
}
.sec-head p { color: var(--ink-2); max-width: 52ch; }

.branches { max-width: var(--wrap); margin: 0 auto; padding: 32px var(--gutter) 48px; }
.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }

/* بطاقة الفرع (spotlight card): وهج ذهبي يتبع المؤشر على الحاسوب فقط */
.card {
    position: relative; isolation: isolate; overflow: hidden;
    display: flex; flex-direction: column;
    padding: 16px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(181, 43, 56, .045), rgba(255, 255, 255, 0) 45%), var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-card);
    transition: transform 300ms var(--ease-out), border-color 300ms var(--ease-out), box-shadow 300ms var(--ease-out);
}
.card::before {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(220, 174, 95, .20), transparent 45%);
    opacity: 0; transition: opacity 300ms var(--ease-out);
}
.grid > .card { z-index: 1; }
@media (hover: hover) and (pointer: fine) {
    .card:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: 0 1px 2px rgba(60, 25, 15, .06), 0 18px 40px -16px rgba(60, 25, 15, .26); }
    .card:hover::before { opacity: 1; }
}
.card__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 8px; min-height: var(--tap); }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px; border-radius: 999px;
    color: var(--maroon-ink); background: rgba(181, 43, 56, .07); border: 1px solid rgba(181, 43, 56, .16);
    font-weight: 700; font-size: 13px;
}
.chip .ic { width: var(--ic-sm); height: var(--ic-sm); }

.rating {
    display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap);
    padding: 0 8px; margin-inline-end: -8px; border-radius: 999px;
    color: var(--ink-2); font-size: 14px; font-weight: 600; text-decoration: none;
    transition: background-color 200ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .rating:hover { background: var(--surface-2); } }
.rating__cta { display: inline-flex; align-items: center; gap: 5px; }
.rating__cta .ic { width: 15px; height: 15px; color: var(--gold-ink); }
.rating__data { display: inline-flex; align-items: center; gap: 6px; }
.rating__data[hidden] { display: none; }
.rating.has-data .rating__cta { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stars { position: relative; display: inline-block; font-size: 16px; line-height: 1; letter-spacing: 1px; color: rgba(92, 40, 30, .22); }
.stars__fill { position: absolute; inset-block: 0; inset-inline-start: 0; overflow: hidden; white-space: nowrap; color: #e0a526; }
.rating__avg { font-weight: 800; color: var(--gold-ink); font-size: 16px; }
.rating__count { color: var(--ink-3); font-weight: 600; white-space: nowrap; }

.card__title { font-size: 20px; font-weight: 800; line-height: 1.4; margin: 8px 0 16px; color: var(--ink); }
.btn--order {
    width: 100%; min-height: 52px; border-radius: var(--radius); font-size: 16px; color: #fff;
    background: linear-gradient(180deg, var(--maroon-2), var(--maroon));
    border-color: rgba(255, 255, 255, .10);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 10px 22px -12px rgba(142, 31, 42, .7);
}
.btn--order .ic--arrow { width: var(--ic-sm); height: var(--ic-sm); opacity: .75; transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
    .btn--order:hover { background: linear-gradient(180deg, #c3313f, #9a2230); }
    [dir="ltr"] .btn--order:hover .ic--arrow { transform: translate(2px, -2px); }
    [dir="rtl"] .btn--order:hover .ic--arrow { transform: scaleX(-1) translate(2px, -2px); }
}
.card__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.btn--soft { min-height: 48px; padding: 0 12px; border-radius: var(--radius); background: #fbf6ef; border-color: var(--line); color: var(--ink); font-size: 15px; }
.btn--soft .ic { width: var(--ic); height: var(--ic); color: var(--maroon-2); }
/* زر «قيّمنا» لكل فرع: ذهبي فاتح بعرض البطاقة */
.btn--rate {
    grid-column: 1 / -1; min-height: 48px; padding: 0 12px; border-radius: var(--radius); font-size: 15px;
    color: var(--gold-ink); background: rgba(220, 174, 95, .14); border-color: rgba(170, 120, 40, .32);
}
.btn--rate .ic { width: var(--ic); height: var(--ic); color: #d39a1c; }
@media (hover: hover) and (pointer: fine) { .btn--rate:hover { background: rgba(220, 174, 95, .24); border-color: rgba(170, 120, 40, .45); } }
/* النجوم أعلى البطاقة تظهر فقط عند وجود تقييمات حقيقية */
.rating:not(.has-data) { display: none; }
@media (hover: hover) and (pointer: fine) { .btn--soft:hover { background: var(--surface-2); border-color: var(--line-2); } }

/* الأرقام: حبّات متساوية العرض (عمودان إن اتّسعت البطاقة)، الرقم الفردي الأخير بعرض كامل،
   والكتلة مثبّتة أسفل البطاقة فتتساوى البطاقات مهما اختلف عدد الأرقام */
.phones {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-content: start;
    container: phones / inline-size;
    margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--line);
}
.card__links { margin-bottom: 16px; }
/* سطر واحد دائمًا: رقمان متساويان، والفرع ذو الأرقام الأكثر يضيف دائرة «+N» تفتح كل الأرقام.
   بلا JS تظهر كل الأرقام كما هي (لا يضيع رقم). */
.phones li:only-of-type { grid-column: 1 / -1; }
.phones__more-li { display: none; }
html:not(.has-js) .phones__extra { grid-column: 1 / -1; }
.has-js .phones--more { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) var(--tap); }
.has-js .phones__extra { display: none; }
.has-js .phones__more-li { display: block; }
.has-js .phones-expanded .phones__extra { display: block; grid-column: 1 / -1; }   /* متصفح بلا <dialog> */
.phones__more {
    display: grid; place-items: center; width: var(--tap); height: var(--tap); padding: 0;
    border-radius: 50%; border: 1px solid rgba(26, 150, 160, .28); background: rgba(26, 150, 160, .07);
    color: var(--teal-ink); font: inherit; font-weight: 800; font-size: 15px; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 160ms var(--ease-out), background-color 200ms var(--ease-out);
}
.phones__more:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .phones__more:hover { background: rgba(26, 150, 160, .16); } }
/* البطاقة الضيّقة: الرقم أهم من الأيقونة */
@container phones (max-width: 339px) {
    .phones .phone { padding: 0 6px; }
    .phones .phone .ic { display: none; }
}
@container phones (max-width: 279px) {
    .phones .phone { font-size: 13px; padding: 0 2px; letter-spacing: -.01em; }
}
.phone {
    display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: var(--tap); padding: 0 10px;
    border-radius: var(--radius-sm); text-decoration: none; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap;
    color: var(--teal-ink); background: rgba(26, 150, 160, .07); border: 1px solid rgba(26, 150, 160, .28);
    -webkit-tap-highlight-color: transparent;
    transition: transform 160ms var(--ease-out), background-color 200ms var(--ease-out);
}
.phone .ic { width: var(--ic-sm); height: var(--ic-sm); }
.phone:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .phone:hover { background: rgba(26, 150, 160, .14); } }
.phone__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ───────── التواصل (dock) ───────── */
.social { max-width: var(--wrap); margin: 0 auto; padding: 32px var(--gutter) 56px; text-align: center; display: grid; justify-items: center; gap: 8px; }
.social p { color: var(--ink-2); }
.dock {
    display: flex; justify-content: center; gap: 8px; margin-top: 16px;
    padding: 8px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card);
}
.dock__item { position: relative; z-index: 1; display: grid; justify-items: center; gap: 4px; width: 84px; padding: 8px 4px; border-radius: var(--radius); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.dock__item .ic {
    width: 56px; height: 56px; padding: 16px; border-radius: var(--radius);
    background: var(--surface-2); border: 1px solid var(--line); color: var(--maroon-ink);
    transition: transform 260ms var(--ease-spring), background-color 200ms var(--ease-out), color 200ms var(--ease-out);
}
.dock__name { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.dock__item:active .ic { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) {
    .dock__item:hover .ic { transform: translateY(-4px) scale(1.06); }
    .dock__item--instagram:hover .ic { background: #c13584; color: #fff; }
    .dock__item--tiktok:hover .ic    { background: #000; color: #fff; }
    .dock__item--snapchat:hover .ic  { background: #fffc00; color: #000; }
}

.foot {
    padding: 24px var(--gutter) calc(24px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line); text-align: center; color: var(--ink-3); font-size: 14px;
}

/* ───────── المقاسات ───────── */
@media (max-width: 400px) {
    :root { --gutter: 16px; }
    .nav__inner { min-height: 64px; }
    .nav__brand img { width: 44px; }
    .nav__brand span { display: none; }
    .slider__foot, [dir="rtl"] .slider__foot { padding: 8px 8px 8px 16px; }
    [dir="rtl"] .slider__foot { padding: 8px 16px 8px 8px; }
    .dot { width: 20px; }
    .dot.is-active { width: 40px; }
    .seg button { padding: 0 12px; }
    .dock__item { width: 76px; }
}
/* الجوال: العنوان في سطر كامل فوق شريط التحكم — لا يُقصّ مهما زاد عدد الشرائح */
@media (max-width: 639px) {
    .slider__foot, [dir="rtl"] .slider__foot { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 16px 16px; }
    .cap { align-items: center; text-align: center; }
    .cap__title, .cap__text { max-width: 100%; }
    .ctrl { align-self: center; max-width: 100%; }
    .dots { min-width: 0; overflow: hidden; }
}
@media (max-width: 639px) {
    .slider__foot { flex-wrap: nowrap; }
    .cap__title { font-size: 16px; }
}
@media (min-width: 640px) {
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
    .card { padding: 24px; }
    /* كل أجزاء البطاقات في الصف الواحد على خطوط أفقية واحدة */
    @supports (grid-template-rows: subgrid) {
        .card { display: grid; grid-row: span 5; grid-template-rows: subgrid; grid-template-columns: minmax(0, 1fr); row-gap: 0; }
        .card__links { align-self: start; }
        /* الخط المنقّط والأرقام تبدأ من نفس الارتفاع في كل بطاقات الصف */
        .phones { margin-top: 0; align-self: stretch; }
    }
}
@media (min-width: 960px) {
    .hero {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 64px; padding-top: 64px; padding-bottom: 48px;
    }
    .hero__copy { align-items: flex-start; text-align: start; }
    .slider { max-width: none; }
    .hero__ctas, .stats { justify-content: flex-start; }
    .stats { align-self: stretch; }
    .branches { padding-top: 48px; }
}
@media (min-width: 1200px) {
    .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
}

/* ───────── نافذة كل الأرقام (dialog أصلي: حبس التركيز + Esc) — ورقة سفلية على الجوال ───────── */
html.is-locked, html.is-locked body { overflow: hidden; }
.sheet {
    padding: 0; border: 0; margin: auto; width: min(420px, calc(100% - 32px)); max-width: none;
    max-height: min(80vh, 560px); overflow: auto;
    border-radius: var(--radius-lg); background: var(--surface); color: var(--ink);
    box-shadow: 0 24px 64px -24px rgba(60, 25, 15, .45);
    opacity: 0; transform: translateY(12px) scale(.98);
    transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.sheet.is-open { opacity: 1; transform: none; }
.sheet::backdrop { background: rgba(43, 26, 22, .42); }
.sheet[open]::backdrop { animation: sheet-fade 200ms var(--ease-out); }
@keyframes sheet-fade { from { opacity: 0; } }
.sheet__box { display: grid; gap: 16px; padding: 20px; }
.sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sheet__title { display: grid; gap: 2px; font-size: 20px; font-weight: 800; line-height: 1.35; }
.sheet__sub { font-size: 14px; font-weight: 600; color: var(--ink-3); }
.sheet__close {
    flex: none; display: grid; place-items: center; width: var(--tap); height: var(--tap); padding: 0;
    border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); cursor: pointer;
    transition: transform 160ms var(--ease-out), background-color 200ms var(--ease-out);
}
.sheet__close .ic { width: var(--ic); height: var(--ic); }
.sheet__close:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .sheet__close:hover { background: var(--surface); } }
.sheet__list { display: grid; gap: 8px; }
.sheet__row {
    display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 16px;
    border-radius: var(--radius); text-decoration: none; color: var(--teal-ink);
    background: rgba(26, 150, 160, .07); border: 1px solid rgba(26, 150, 160, .28);
    font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums;
    transition: transform 160ms var(--ease-out), background-color 200ms var(--ease-out);
}
.sheet__row:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) { .sheet__row:hover { background: rgba(26, 150, 160, .14); } }
.sheet__ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(26, 150, 160, .14); }
.sheet__ic .ic { width: 18px; height: 18px; }
.sheet__call { margin-inline-start: auto; font-size: 14px; font-weight: 700; }
@media (max-width: 639px) {
    .sheet { margin: auto 0 0; width: 100%; max-height: 85vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; transform: translateY(100%); }
    .sheet.is-open { transform: none; }
    .sheet__box { padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); }
    .sheet__box::before { content: ''; justify-self: center; width: 40px; height: 4px; border-radius: 4px; background: var(--line-2); }
}

/* ───────── الحركة (تُطفأ كلها مع تقليل الحركة) ───────── */
@keyframes enter {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}
@keyframes starfill-ltr { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@keyframes starfill-rtl { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0); } }

/* ───────── المؤشّر المنزلق (glide): عنصر واحد لكل مجموعة ───────── */
[data-glide] { position: relative; }
.glide {
    position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none;
    width: 0; height: 0; opacity: 0;
    transition: transform 240ms var(--ease-out), width 240ms var(--ease-out), height 240ms var(--ease-out), opacity 160ms var(--ease-out);
}
.glide.is-on { opacity: 1; }
.glide.no-tr { transition: opacity 160ms var(--ease-out); }
/* خلف عناصر شفافة: حبّة مملوءة */
.glide--fill { border-radius: 999px; background: var(--surface); box-shadow: 0 1px 2px rgba(60, 25, 15, .08), 0 6px 14px -8px rgba(60, 25, 15, .3); }
.seg .glide--fill { background: rgba(220, 174, 95, .22); box-shadow: none; }
.dock .glide--fill { border-radius: var(--radius); background: var(--surface-2); box-shadow: none; }
/* فوق أزرار معتمة: حلقة تنزلق بينها */
.glide--ring { z-index: 2; border-radius: var(--radius); box-shadow: 0 0 0 2px rgba(181, 43, 56, .5), 0 8px 18px -10px rgba(142, 31, 42, .45); }
.hero__ctas .glide--ring { border-radius: 999px; }
.phones .glide--ring { border-radius: var(--radius-sm); box-shadow: 0 0 0 2px rgba(13, 107, 116, .5), 0 8px 18px -10px rgba(13, 107, 116, .4); }
/* هالة تنتقل من بطاقة إلى جارتها */
.glide--halo {
    border-radius: calc(var(--radius-lg) + 6px);
    background: linear-gradient(135deg, rgba(220, 174, 95, .55), rgba(181, 43, 56, .28));
    transition: transform 300ms var(--ease-out), width 300ms var(--ease-out), height 300ms var(--ease-out), opacity 200ms var(--ease-out);
}

/* ───────── تبديل اللغة: View Transitions (Chrome/Edge/Safari 18+) ───────── */
.nav { view-transition-name: site-nav; }
.seg__pill { view-transition-name: lang-thumb; }
.hero__copy { view-transition-name: hero-copy; }
.slider { view-transition-name: hero-media; }
.branches .sec-head { view-transition-name: branches-head; }
.social { view-transition-name: social; }
::view-transition-group(*),
::view-transition-old(*),
::view-transition-new(*) { animation-duration: 300ms; animation-timing-function: cubic-bezier(.22, 1, .36, 1); }
::view-transition-group(lang-thumb) { animation-duration: 280ms; animation-timing-function: cubic-bezier(.32, .72, 0, 1); }
@media (prefers-reduced-motion: no-preference) {
    /* دخول البطل: يعمل بالـ CSS وحده (لا ينتظر JS) */
    [data-enter] { animation: enter 560ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms + 60ms); }
    /* الظهور عند التمرير: يُخفى فقط إن حمّل home.js (الصنف reveal) */
    .reveal [data-reveal] {
        opacity: 0; transform: translateY(16px);
        transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
        transition-delay: calc(var(--i, 0) * 80ms);
    }
    .reveal [data-reveal].is-in { opacity: 1; transform: none; }
    .reveal .card[data-reveal].is-in { transition: opacity 500ms var(--ease-out), transform 300ms var(--ease-out), border-color 300ms var(--ease-out), box-shadow 300ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms), 0s, 0s, 0s; }
    /* أيقونات التواصل تدخل واحدة تلو الأخرى */
    .reveal .social[data-reveal] .dock li { opacity: 0; transform: translateY(12px) scale(.94); transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-spring); }
    .reveal .social[data-reveal].is-in .dock li { opacity: 1; transform: none; transition-delay: calc(var(--d, 0) * 70ms + 160ms); }
    .dock li:nth-of-type(2) { --d: 1; }
    .dock li:nth-of-type(3) { --d: 2; }
    .dock li:nth-of-type(4) { --d: 3; }
    .rating__data.is-new { animation: enter 300ms var(--ease-out) both; }
    /* النجوم تمتلئ من بداية السطر */
    [dir="ltr"] .rating__data.is-pending .stars__fill { clip-path: inset(0 100% 0 0); }
    [dir="rtl"] .rating__data.is-pending .stars__fill { clip-path: inset(0 0 0 100%); }
    [dir="ltr"] .rating__data.is-fill .stars__fill { animation: starfill-ltr 700ms var(--ease-out) both; }
    [dir="rtl"] .rating__data.is-fill .stars__fill { animation: starfill-rtl 700ms var(--ease-out) both; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn, .btn--rate, .ctrl__btn, .phone, .card, .card::before, .seg button, .dock__item .ic, .nav,
    .slide, .slide img, .cap, .dot, .btn--order .ic--arrow { transition: none !important; }
    .seg.is-animated .seg__pill { transition: none; }
    .glide { display: none; }
    .sheet, .sheet__row, .sheet__close, .phones__more { transition: none !important; }
    .sheet[open]::backdrop { animation: none; }
    ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
    @media (hover: hover) and (pointer: fine) { .ctrl__btn:hover { background: var(--surface); } }
    .slide img { transform: none; }
    .cap { transform: none; }
    .btn:active, .ctrl__btn:active, .phone:active, .seg button:active, .dock__item:active .ic { transform: none; }
}
