/* C3 Egypt — style.css
   موبايل الأول + CSS logical properties (يشتغل RTL و LTR)
   الألوان والخطوط من الهوية الرسمية في BRIEF.md */

:root {
  --c-ink: #0E2A54;          /* النص والعناوين */
  --c-primary: #1A4D97;      /* الأزرار */
  --c-primary-dark: #143C77;
  --c-basata: #2E7D27;       /* لمسة بساطة */
  --c-padel: #1B7FB3;        /* لمسة بادل (زخرفة) */
  --c-padel-btn: #166A96;    /* أغمق شوية للأزرار عشان تباين AA مع الأبيض */
  --c-bg: #FFFFFF;
  --c-soft: #F5F9FD;
  --c-soft-2: #EEF5FB;
  --c-border: #DCE7F3;
  --c-muted: #3D5578;
  --c-muted-2: #5A6E8C;
  --c-wa: #25D366;
  --c-wa-ink: #0B3D1E;
  --c-todo-bg: #FFF4D6;
  --c-todo-ink: #7A4B00;
  --c-todo-border: #E0A23A;
  --c-ok: #1E6B2E;
  --c-error: #B42318;
  --c-surface: #FFFFFF;
  --c-header-bg: rgba(255,255,255,.96);
  --c-field-border: #BFD0E4;
  --c-ph1: #F1F5FA; --c-ph2: #E7EEF6; --c-ph-border: #AFC2D8;
  --c-ok-bg: #E8F5EA; --c-error-bg: #FDECEA;
  --c-band: #0E2A54; --c-footer: #0E2A54;

  --font-body: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --font-head: "Cairo", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --radius: 24px;
  --radius-sm: 14px;
  --gutter: 16px;
  --max: 1120px;
  --section-y: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .card--link:hover { transform: none; }
}

/* أيقونات: كل زرار = أيقونة + كلمة */
.icon { width: 20px; height: 20px; flex: none; }
html[dir="rtl"] .icon-flip { transform: scaleX(-1); }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1rem, .94rem + .3vw, 1.125rem);
  line-height: 1.8;
  color: var(--c-ink);
  background: var(--c-bg);
}
html[lang="en"] body { font-family: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.65; }

img { max-width: 100%; display: block; }
a { color: var(--c-primary); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.4; margin: 0 0 .5em; color: var(--c-ink); }
h1 { font-size: clamp(1.7rem, 1.3rem + 2vw, 2.6rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 1.15rem + 1.1vw, 2rem); font-weight: 800; }
h3 { font-size: clamp(1.08rem, 1rem + .4vw, 1.25rem); font-weight: 700; }
p { margin: 0 0 1em; }

.container { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute; inset-inline-start: 8px; top: -60px;
  background: var(--c-primary); color: #fff;
  padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 600;
  min-height: 48px; display: inline-flex; align-items: center;
}
.skip-link:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--c-padel); outline-offset: 2px; }

.ltr { direction: ltr; unicode-bidi: isolate; }
[id] { scroll-margin-top: 84px; }
.sr-only, .hp-field {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--c-header-bg); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--c-border);
}
.header-inner { display: flex; align-items: center; gap: 10px; min-height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px;
  color: var(--c-ink); text-decoration: none; margin-inline-end: auto;
}
.brand-logo { height: 40px; width: auto; display: block; }
.brand-sub {
  font-size: .78rem; color: var(--c-muted-2); line-height: 1.3;
  padding-inline-start: 10px; border-inline-start: 1px solid var(--c-border);
}
@media (max-width: 479px) { .brand-sub { display: none; } }
.lang-switch {
  color: var(--c-ink); text-decoration: none; font-weight: 600; font-size: .95rem;
  border: 1px solid var(--c-border); border-radius: 999px;
  padding: 6px 14px; min-height: 48px; display: inline-flex; align-items: center; gap: 6px;
}
.lang-switch .icon { width: 18px; height: 18px; }
.lang-switch:hover { background: var(--c-soft); }
.nav-toggle {
  background: transparent; border: 0; color: var(--c-ink); cursor: pointer;
  min-width: 48px; height: 48px; padding-inline: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 10px; font: inherit; font-weight: 700; font-size: .9rem;
}
.nav-toggle svg { width: 26px; height: 26px; }

.site-nav { display: none; position: absolute; inset-inline: 0; top: 100%; background: var(--c-surface); border-bottom: 1px solid var(--c-border); box-shadow: 0 12px 24px rgba(14,42,84,.08); }
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 4px var(--gutter) 12px; }
.site-nav a {
  display: flex; align-items: center; min-height: 48px; color: var(--c-ink); text-decoration: none;
  font-weight: 600; border-bottom: 1px solid var(--c-soft-2);
}
.site-nav a[aria-current="page"] { color: var(--c-primary); }

@media (min-width: 1040px) {
  .nav-toggle { display: none; }
  .site-nav { display: block; position: static; background: none; border: 0; box-shadow: none; }
  .site-nav ul { display: flex; gap: 2px; padding: 0; }
  .site-nav a { border: 0; padding-inline: 10px; border-radius: 10px; min-height: 48px; font-size: .97rem; }
  .site-nav a:hover { background: var(--c-soft); }
  .site-nav a[aria-current="page"] { background: var(--c-soft-2); }
  .brand { margin-inline-end: 0; }
  .header-inner { justify-content: space-between; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--c-soft-2) 0%, var(--c-soft) 100%);
  padding-block: 44px 52px; border-bottom: 1px solid var(--c-border);
}
.hero .lead { font-size: 1.15rem; color: var(--c-muted); max-width: 52ch; }
.eyebrow {
  display: inline-block; font-size: .85rem; font-weight: 700; margin-bottom: 10px;
  color: var(--accent, var(--c-primary)); background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: 999px; padding: 2px 12px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.accent-basata { --accent: var(--c-basata); }
.accent-padel { --accent: var(--c-padel-btn); }
.hero.accent-basata, .hero.accent-padel { border-top: 4px solid var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px; border-radius: 999px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background-color .15s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-dark); }
.btn-basata { background: var(--c-basata); color: #fff; }
.btn-padel { background: var(--c-padel-btn); color: #fff; }
.btn-wa { background: var(--c-wa); color: var(--c-wa-ink); }
.btn-outline { border-color: var(--c-border); color: var(--c-ink); background: var(--c-surface); }
.btn-outline:hover { border-color: var(--c-primary); }
.btn-block { width: 100%; }
.btn-sm { padding-inline: 16px; font-size: .95rem; }
.btn-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }
.section--soft { background: var(--c-soft); border-block: 1px solid var(--c-border); }
.section-head { margin-bottom: 28px; max-width: 62ch; }
.section-head p { color: var(--c-muted); }

.grid { display: grid; gap: 18px; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--c-soft); border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column;
}
.section--soft .card { background: var(--c-surface); }
.card .img-placeholder { width: auto; margin: -22px -22px 18px; border-radius: var(--radius) var(--radius) 0 0; border-width: 0 0 2px; }
.card .card-actions { margin-top: auto; padding-top: 14px; }
.card--link { text-decoration: none; color: inherit; transition: border-color .15s ease, transform .15s ease; }
.card--link:hover { border-color: var(--accent, var(--c-primary)); transform: translateY(-2px); }
.card .more { font-weight: 700; color: var(--accent, var(--c-primary)); margin-top: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.card p { color: var(--c-muted); }

.num {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent, var(--c-primary)) 12%, var(--c-surface));
  color: var(--accent, var(--c-primary)); font-family: var(--font-head); font-weight: 800; font-size: 1.15rem;
  margin-bottom: 12px; flex: none;
}

.ticks { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 8px; }
.ticks li { position: relative; padding-inline-start: 30px; }
.ticks li::before {
  content: "✓"; position: absolute; inset-inline-start: 0; top: .3em; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: .8rem; font-weight: 800; line-height: 1;
  background: var(--accent, var(--c-primary)); color: #fff;
}

.meta-list { list-style: none; padding: 0; margin: 0 0 8px; font-size: .97rem; display: grid; gap: 6px; }
.meta-list strong { color: var(--c-ink); font-weight: 700; }
.meta-list span.v { color: var(--c-muted); }

.feature { display: grid; gap: 24px; align-items: center; }
@media (min-width: 860px) { .feature { grid-template-columns: 1fr 1fr; gap: 44px; } }

.stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.stat { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: 10px 16px; }
.stat b { font-family: var(--font-head); font-size: 1.35rem; font-weight: 800; color: var(--c-primary); display: block; line-height: 1.3; }
.stat span { font-size: .9rem; color: var(--c-muted); }

.quote-box {
  background: var(--c-surface); border: 1px solid var(--c-border); border-inline-start: 4px solid var(--accent, var(--c-primary));
  border-radius: var(--radius-sm); padding: 16px 18px; color: var(--c-ink); font-weight: 500;
}

.cta-band { background: var(--c-band); color: #fff; border-radius: var(--radius); padding: 28px 22px; display: grid; gap: 16px; }
.cta-band h2 { color: #fff; margin: 0; }
.cta-band p { margin: 0; color: rgba(255,255,255,.85); }
@media (min-width: 760px) { .cta-band { grid-template-columns: 1fr auto; align-items: center; padding: 36px; } }

/* ---------- Placeholders (ناقص) ---------- */
.todo {
  background: var(--c-todo-bg); color: var(--c-todo-ink);
  border: 1px dashed var(--c-todo-border); border-radius: 6px;
  padding: 1px 8px; font-size: .92em; font-weight: 500;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
p.todo, div.todo { display: block; padding: 12px 14px; }
.img-placeholder {
  aspect-ratio: var(--ratio, 16 / 10); width: 100%;
  display: grid; place-items: center; text-align: center; padding: 16px;
  background: repeating-linear-gradient(135deg, var(--c-ph1) 0 12px, var(--c-ph2) 12px 24px);
  border: 2px dashed var(--c-ph-border); border-radius: var(--radius);
  color: var(--c-muted-2); font-size: .92rem; font-weight: 500;
}
.img-placeholder--wide { --ratio: 16 / 9; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 20px; }
.section--soft .form { background: var(--c-surface); }
@media (min-width: 760px) { .form { grid-template-columns: 1fr 1fr; padding: 28px; } .form .full { grid-column: 1 / -1; } }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: .97rem; }
.field .req { color: var(--c-error); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--c-ink); background: var(--c-surface);
  border: 1px solid var(--c-field-border); border-radius: 12px; padding: 10px 12px; min-height: 48px;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--c-primary); outline: 3px solid rgba(26, 77, 151, .25); outline-offset: 0; }
.field input[type="tel"] { direction: ltr; }
html[dir="rtl"] .field input[type="tel"] { text-align: right; }
.choices { border: 0; padding: 0; margin: 0; min-width: 0; }
.choices legend { font-weight: 700; margin-bottom: 8px; font-size: .97rem; padding: 0; }
.choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: inline-flex; align-items: center; min-height: 48px; padding: 8px 18px;
  border: 2px solid var(--c-field-border); border-radius: 999px; background: var(--c-surface); font-weight: 600; cursor: pointer;
}
.choice input:checked + span { border-color: var(--c-primary); background: var(--c-soft-2); color: var(--c-primary); }
.choice input:checked + span::before { content: "✓"; margin-inline-end: 6px; font-weight: 800; }
.choice input:focus-visible + span { outline: 3px solid var(--c-padel); outline-offset: 2px; }
.consent label { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; cursor: pointer; min-height: 48px; }
.consent input { width: 24px; height: 24px; min-height: 0; flex: none; margin-top: 3px; accent-color: var(--c-primary); }
.consent a { font-weight: 700; display: inline-flex; align-items: center; min-height: 48px; padding-inline: 4px; }
.field [aria-invalid="true"], .consent.is-invalid input { border-color: var(--c-error); outline: 2px solid var(--c-error); outline-offset: 1px; }
.form-actions { display: grid; gap: 10px; }
@media (min-width: 560px) { .form-actions { grid-template-columns: 1fr 1fr; } }
.form-note { font-size: .9rem; color: var(--c-muted-2); margin: 0; }
.form-status:empty { display: none; }
.form-status { border-radius: var(--radius-sm); padding: 12px 14px; font-weight: 700; border: 2px solid transparent; animation: pop .35s ease; }
.form-status::before { margin-inline-end: 8px; font-size: 1.2em; }
.form-status.is-info::before { content: "⏳"; }
.form-status.is-ok::before { content: "✅"; }
.form-status.is-error::before { content: "⚠️"; }
@keyframes pop { 0% { transform: scale(.96); opacity: 0; } 100% { transform: none; opacity: 1; } }
.form-status .btn { margin-top: 10px; }
.form-status.is-info { background: var(--c-soft-2); color: var(--c-ink); }
.form-status.is-ok { background: var(--c-ok-bg); color: var(--c-ok); border-color: var(--c-ok); }
.form-status.is-error { background: var(--c-error-bg); color: var(--c-error); border-color: var(--c-error); }

/* ---------- Contact ---------- */
.contact-big { text-align: center; align-items: center; }
.contact-big .number { font-family: var(--font-head); font-size: 1.85rem; font-weight: 800; color: var(--c-ink); direction: ltr; unicode-bidi: isolate; display: block; margin-block: 6px 18px; }
.contact-big .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-footer); color: rgba(255,255,255,.85); padding-block: 40px 96px; font-size: .95rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; gap: 24px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h3 { color: #fff; font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li a { display: inline-flex; min-height: 48px; align-items: center; }
.site-footer li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 48px; }
.site-footer .todo { background: rgba(255,244,214,.95); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 28px; padding-top: 16px; font-size: .85rem; opacity: .75; }

/* ---------- Floating WhatsApp + booking bar ---------- */
.wa-float {
  position: fixed; inset-inline-end: 16px; bottom: 16px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--c-wa); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
}
.wa-float svg { width: 30px; height: 30px; }
.book-bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 55;
  background: var(--c-surface); border-top: 1px solid var(--c-border);
  padding: 10px var(--gutter); padding-inline-end: 84px;
  box-shadow: 0 -4px 16px rgba(14,42,84,.06);
}
.has-book-bar .wa-float { bottom: 12px; }
@media (min-width: 900px) { .book-bar { display: none; } }
.btn-stack { display: grid; gap: 10px; }

/* ---------- صور حقيقية ---------- */
.photo { margin: 0; }
.photo img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: var(--c-soft-2); }
.photo figcaption { font-size: .92rem; color: var(--c-muted); margin-top: 8px; }
.photo--portrait img { aspect-ratio: 3 / 4; }

/* ---------- الوضع الغامق (حسب إعداد الجهاز) ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --c-ink: #E7EEF8; --c-primary: #8DB8F2; --c-primary-dark: #A9CAF6;
    --c-basata: #86D38F; --c-padel: #7FCBEE; --c-padel-btn: #7FCBEE;
    --c-bg: #0B1830; --c-soft: #10223F; --c-soft-2: #132846; --c-border: #24406A;
    --c-muted: #B4C4DA; --c-muted-2: #9DB0CA;
    --c-surface: #0F1F3A; --c-header-bg: rgba(11,24,48,.95); --c-field-border: #36557F;
    --c-ph1: #13284A; --c-ph2: #10223F; --c-ph-border: #3A5A86;
    --c-ok: #8EDB9A; --c-error: #FF9A8F; --c-ok-bg: #12321C; --c-error-bg: #3A1614;
    --c-band: #13305A; --c-footer: #071226;
    color-scheme: dark;
  }
  /* الأزرار الملونة: خلفيات غامقة كفاية للكلام الأبيض */
  .btn-primary { background: #2F67BF; color: #fff; }
  .btn-primary:hover { background: #3A74CF; }
  .btn-basata { background: #2E7D27; color: #fff; }
  .btn-padel { background: #166A96; color: #fff; }
  .ticks li::before { color: var(--c-bg); }
  .skip-link { color: var(--c-bg); }
  .img-placeholder { color: var(--c-muted-2); }
}
