/* واجهة عرض منتجات كريتيف كودز
   التخطيط: شريط جانبي ثابت + منطقة محتوى (فكرة mbc-ramadan.creative-codes.sa) بألوان الشعار الذهبية.
   الاتجاه: كل المسافات بخصائص منطقية (inline/block) عشان تشتغل RTL وLTR بنفس القواعد. */

:root {
  --bg: #121116;
  --side: #0c0b0f;
  --card: #1c1a21;
  --card-2: #24212a;
  --line: #2d2a33;
  --ink: #f3f1ee;
  --muted: #a39e96;
  --gold: #d9a531;
  --gold-2: #f1c869;
  --on-gold: #17140d;
  --scrim: rgba(0, 0, 0, .55);

  --f-display: "Readex Pro", "IBM Plex Sans Arabic", Tahoma, sans-serif;
  --f-body: "IBM Plex Sans Arabic", "Readex Pro", Tahoma, "Segoe UI", sans-serif;

  /* مقياس الخطوط: 8 أحجام فقط، أصغرها 12px عشان العربي يبقى مقروء */
  --fs-2xs: .75rem;      /* 12px: شارات، أعداد، تصنيف البطاقة */
  --fs-xs: .8125rem;     /* 13px: وصف البطاقة، تسميات صغيرة */
  --fs-sm: .875rem;      /* 14px: القوائم، الفلاتر، النص الثانوي */
  --fs-base: 1rem;       /* 16px: النص الأساسي، عناوين البطاقات، الأزرار */
  --fs-md: 1.125rem;     /* 18px: عناوين بطاقات الأقسام */
  --fs-lg: 1.375rem;     /* 22px: عنوان نافذة المنتج، الأرقام */
  --fs-xl: clamp(1.5rem, 2.6vw, 1.875rem);    /* عناوين الأقسام داخل الصفحة */
  --fs-2xl: clamp(1.875rem, 3.8vw, 2.625rem); /* عنوان الصفحة */
  --lh-body: 1.75;
  --lh-head: 1.3;

  --main-pad: 32px;
  --side-w: 300px;
  --radius: 14px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f4ef;
  --side: #ffffff;
  --card: #ffffff;
  --card-2: #f3efe6;
  --line: #e6e1d6;
  --ink: #1b1915;
  --muted: #6b655a;
  --gold: #a8770f;
  --gold-2: #c8921c;
  --on-gold: #ffffff;
  --scrim: rgba(20, 18, 14, .35);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
/* الأرقام والإيميلات تبقى من اليسار لليمين داخل النص العربي */
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- العلامة ---------- */
.mono-mark {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(140deg, var(--gold-2), var(--gold));
  color: var(--on-gold);
  font-family: var(--f-display); font-weight: 700; font-size: var(--fs-sm); letter-spacing: -.02em;
  direction: ltr;
}
.mono-mark.big { width: 52px; height: 52px; font-size: 1.15rem; }

/* ---------- الشريط الجانبي ---------- */
.sidebar {
  position: fixed; inset-block: 0; inset-inline-start: 0;
  width: var(--side-w);
  background: var(--side);
  border-inline-end: 1px solid var(--line);
  padding: calc(18px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 14px;
  overflow-y: auto;
  z-index: 30;
}
.side-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-text { display: flex; align-items: stretch; gap: 8px; }
.brand-year {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--f-display); font-weight: 700; font-size: var(--fs-2xs); letter-spacing: .08em;
  color: var(--gold); border-inline-start: 2px solid var(--gold); padding-inline-start: 4px;
  direction: ltr;
}
.brand-stack { display: flex; flex-direction: column; justify-content: center; line-height: 1.25; }
.brand-stack strong { font-family: var(--f-display); font-weight: 700; font-size: var(--fs-base); color: var(--gold); letter-spacing: .02em; }
.brand-stack span { font-family: var(--f-display); font-weight: 600; font-size: var(--fs-base); }

.side-controls { display: flex; gap: 8px; }
.pill-btn {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 5px 14px; cursor: pointer; font-family: var(--f-display); font-size: var(--fs-sm);
  display: inline-flex; align-items: center; gap: 6px;
}
.pill-btn:hover { border-color: var(--gold); }
.icon-btn {
  border: 1px solid var(--line); background: var(--card); cursor: pointer;
  width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; padding: 0;
}
.icon-btn.round { border-radius: 50%; }
.icon-btn:hover { border-color: var(--gold); }
.icon-btn svg, .pill-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.search {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 0 10px;
}
.search:focus-within { border-color: var(--gold); }
.search input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: var(--fs-sm); padding: 9px 0; outline: none;
}
.search input::placeholder { color: var(--muted); }
.search kbd {
  font-family: var(--f-display); font-size: var(--fs-2xs); color: var(--muted);
  border: 1px solid var(--line); border-radius: 5px; padding: 0 6px;
}

.side-nav { display: flex; flex-direction: column; gap: 10px; }
.nav-link {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  padding: 8px 10px; border-radius: 10px; font-family: var(--f-display); font-weight: 500;
}
.nav-link:hover { background: var(--card); }
.nav-link[aria-current="page"] { background: var(--card-2); color: var(--gold); }
.nav-link svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }

.group { border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--card) 55%, transparent); }
.group-head {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: start;
  background: none; border: 0; cursor: pointer; padding: 10px 12px;
}
.dot { width: 10px; height: 10px; border-radius: 3px; flex: none; background: var(--c, var(--gold)); }
.group-title { flex: 1; min-width: 0; font-family: var(--f-display); font-weight: 600; font-size: var(--fs-sm); }
.group-head a.group-title { text-decoration: none; }
.count {
  font-family: var(--f-display); font-size: var(--fs-2xs); font-variant-numeric: tabular-nums;
  color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, transparent);
  border-radius: 999px; padding: 1px 8px;
}
.chev { width: 16px; height: 16px; stroke: var(--muted); fill: none; stroke-width: 2; transition: transform .2s; }
.group[data-open="true"] .chev { transform: rotate(180deg); }
.group-body { padding: 0 8px 8px; display: flex; flex-direction: column; gap: 2px; }
.group[data-open="false"] .group-body { display: none; }
.sub-link {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 10px; border-radius: 8px; text-decoration: none; font-size: var(--fs-sm);
}
.sub-link:hover { background: var(--card-2); }
.sub-link[aria-current="page"] { background: var(--card-2); color: var(--gold); }
.sub-link .n { color: var(--muted); font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; font-family: var(--f-display); }
.search-hit { padding: 6px 10px; border-radius: 8px; text-decoration: none; font-size: var(--fs-sm); display: flex; flex-direction: column; }
.search-hit:hover { background: var(--card-2); }
.search-hit small { color: var(--muted); font-size: var(--fs-2xs); }
.empty { color: var(--muted); font-size: var(--fs-sm); padding: 6px 10px; }

/* ---------- المحتوى ---------- */
.main {
  margin-inline-start: var(--side-w);
  min-height: 100vh;
  padding-block: calc(28px + env(safe-area-inset-top, 0px)) 40px;
  padding-inline: var(--main-pad);
  display: flex; flex-direction: column; gap: 28px;
  outline: none;
}
.wrap { width: 100%; max-width: 1180px; margin-inline: auto; display: flex; flex-direction: column; gap: 28px; }

.hero {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: 22px; background: var(--card);
  padding: 36px 36px 36px; display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center;
}
.hero-year {
  font-family: var(--f-display); font-weight: 700; font-size: clamp(3rem, 7vw, 5.2rem); line-height: .9;
  color: var(--gold); display: flex; flex-direction: column; align-items: center; direction: ltr;
}
.hero h1 { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: var(--fs-2xl); line-height: 1.2; text-wrap: balance; }
.hero h1 .a { display: block; color: var(--gold); letter-spacing: .01em; }
.hero p { margin: 12px 0 0; color: var(--muted); max-width: 56ch; }
.stats { display: inline-flex; margin-top: 20px; background: #fff; color: #1b1915; border-radius: 12px; overflow: hidden; }
.stats div { padding: 10px 20px; text-align: center; display: flex; flex-direction: column; }
.stats div + div { border-inline-start: 1px solid #ece7dc; }
.stats b { font-family: var(--f-display); font-size: var(--fs-lg); color: #a8770f; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stats span { font-size: var(--fs-xs); color: #5f594e; }
.cta {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; margin-inline-start: 0;
  background: var(--gold); color: var(--on-gold); text-decoration: none;
  font-family: var(--f-display); font-weight: 600; border-radius: 999px; padding: 9px 20px;
}
.cta svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
[dir="rtl"] .cta svg { transform: scaleX(-1); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; }

.section-head { display: flex; flex-direction: column; gap: 4px; }
.eyebrow { font-family: var(--f-display); font-size: var(--fs-xs); font-weight: 600; color: var(--gold); letter-spacing: .04em; }
.section-head h2 { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: var(--fs-xl); line-height: 1.25; }
.section-head p { margin: 0; color: var(--muted); }

.note {
  border: 1px dashed var(--line); border-radius: 10px; padding: 10px 14px; color: var(--muted); font-size: var(--fs-sm);
}

/* ---------- الصورة أو بديلها "قريباً" ---------- */
.visual {
  position: relative; overflow: hidden; aspect-ratio: 4 / 3; max-width: 100%;
  background:
    radial-gradient(120% 90% at 85% 10%, color-mix(in srgb, var(--c) 55%, transparent), transparent 60%),
    linear-gradient(160deg, color-mix(in srgb, var(--c) 30%, #15131a), #121116);
  border-block-end: 3px solid var(--c, var(--gold));
  display: grid; place-items: center;
}
.visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.visual .glyph { width: 34%; max-width: 110px; aspect-ratio: 1; stroke: rgba(255,255,255,.88); fill: none; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.visual .soon {
  position: absolute; inset-block-end: 10px; inset-inline-start: 12px;
  font-family: var(--f-display); font-weight: 600; font-size: var(--fs-2xs); letter-spacing: .04em;
  color: rgba(255,255,255,.75);
}
.badge {
  position: absolute; inset-block-start: 10px; inset-inline-end: 10px; z-index: 1;
  background: #fff; color: #17140d; border-radius: 999px; padding: 2px 10px;
  font-family: var(--f-display); font-weight: 600; font-size: var(--fs-2xs);
}
.badge.new { background: var(--gold); color: var(--on-gold); }

/* ---------- بطاقات المنتجات ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; text-align: start; padding: 0; cursor: pointer; min-width: 0;
  text-decoration: none; transition: transform .2s, border-color .2s;
}
.card:hover { border-color: color-mix(in srgb, var(--c) 70%, var(--line)); transform: translateY(-2px); }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.card-kicker { font-family: var(--f-display); font-weight: 600; font-size: var(--fs-2xs); color: var(--c, var(--gold)); letter-spacing: .03em; }
.card-title { font-family: var(--f-display); font-weight: 600; font-size: var(--fs-base); line-height: 1.35; }
.card-meta { color: var(--muted); font-size: var(--fs-xs); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-link { margin-top: auto; padding-top: 8px; font-family: var(--f-display); font-size: var(--fs-xs); color: var(--gold); display: inline-flex; align-items: center; gap: 4px; }
.card-link svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
[dir="rtl"] .card-link svg { transform: scaleX(-1); }

/* بطاقات الأقسام في الرئيسية */
.grid.divisions { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid.divisions .visual { aspect-ratio: 16 / 10; }
.grid.divisions .card-title { font-size: var(--fs-md); }

/* ---------- صفحة القسم ---------- */
.page-head { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: stretch; }
.page-head .vert {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--f-display); font-weight: 700; font-size: 2.4rem; line-height: 1; letter-spacing: .06em;
  color: color-mix(in srgb, var(--c) 35%, var(--line)); direction: ltr; text-transform: uppercase;
}
.page-head .eyebrow { color: var(--c); }
.page-head h1 { margin: 2px 0 4px; font-family: var(--f-display); font-weight: 700; font-size: var(--fs-2xl); line-height: var(--lh-head); }
.page-head h1 em { font-style: normal; color: var(--gold); }
.page-head p { margin: 0; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 14px;
  text-decoration: none; font-family: var(--f-display); font-size: var(--fs-sm); display: inline-flex; gap: 6px; align-items: center;
}
.chip:hover { border-color: var(--gold); }
.chip[aria-current="page"] { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.chip .n { font-size: var(--fs-2xs); opacity: .7; font-variant-numeric: tabular-nums; }

.cat-block { display: flex; flex-direction: column; gap: 16px; }
.cat-head { display: flex; flex-direction: column; gap: 0; }
.cat-head small { font-family: var(--f-display); font-weight: 600; font-size: var(--fs-2xs); color: var(--c); letter-spacing: .05em; }
.cat-head h2 { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: var(--fs-xl); line-height: 1.25; display: flex; align-items: center; gap: 10px; }

/* شريط العلامات */
.brands { display: flex; flex-wrap: wrap; gap: 8px; }
.brands span { border: 1px solid var(--line); border-radius: 8px; padding: 4px 12px; font-family: var(--f-display); font-size: var(--fs-sm); color: var(--muted); direction: ltr; }

/* ---------- نافذة التفاصيل ---------- */
.detail {
  border: 1px solid var(--line); border-radius: 20px; padding: 0; background: var(--card); color: var(--ink);
  width: min(860px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto;
}
.detail::backdrop { background: var(--scrim); backdrop-filter: blur(3px); }
.detail-grid { display: grid; grid-template-columns: 1fr 1.15fr; }
.detail .visual { aspect-ratio: auto; min-height: 100%; border-block-end: 0; border-inline-end: 3px solid var(--c); }
.detail-body { padding: 26px 26px 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.detail-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.detail h2 { margin: 2px 0 0; font-family: var(--f-display); font-weight: 700; font-size: var(--fs-lg); line-height: 1.3; }
.detail p { margin: 0; color: var(--muted); }
.detail h3 { margin: 0 0 6px; font-family: var(--f-display); font-weight: 600; font-size: var(--fs-sm); color: var(--gold); }
.feat { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); }
.feat li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; }
.feat li::before { content: ""; width: 8px; height: 8px; margin-top: .55em; border-radius: 2px; background: var(--c); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px; font-size: var(--fs-xs); direction: ltr; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  border-radius: 999px; padding: 10px 18px; text-decoration: none; border: 1px solid var(--line);
  font-family: var(--f-display); font-weight: 600; font-size: var(--fs-sm); background: var(--card-2); color: var(--ink);
}
.btn:hover { border-color: var(--gold); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.wa { background: #1fa855; border-color: #1fa855; color: #fff; flex: 1 1 100%; }
.btn.wa:hover { background: #18914a; }
.btn.wa svg { fill: currentColor; }
.btn:not(.wa) svg { stroke: currentColor; fill: none; stroke-width: 1.8; }
.phone-line { font-size: var(--fs-xs); color: var(--muted); }

/* بطاقة التواصل في نافذة المنتج: الرقم الأساسي بارز */
.contact-card {
  border: 1px solid color-mix(in srgb, #1fa855 45%, var(--line));
  background: color-mix(in srgb, #1fa855 9%, var(--card-2));
  border-radius: 16px; padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 10px;
}
.contact-label { font-family: var(--f-display); font-weight: 600; font-size: var(--fs-xs); color: var(--muted); }
.contact-number {
  font-family: var(--f-display); font-weight: 700; font-size: clamp(1.6rem, 4vw, 2rem); line-height: 1.1;
  text-decoration: none; color: var(--ink); letter-spacing: .02em; align-self: flex-start;
}
.contact-number:hover { color: #1fa855; }
.contact-row { display: grid; grid-template-columns: 1.6fr 1fr; gap: 8px; }
.contact-row .btn.wa { flex: none; font-size: var(--fs-base); padding: 12px 16px; animation: wa-pulse 2.4s ease-in-out infinite; }
.btn.call { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.call:hover { border-color: var(--gold); }
.alt-wa {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--muted);
  font-size: var(--fs-xs); align-self: flex-start;
}
.alt-wa:hover { color: #1fa855; }
.alt-wa svg { width: 15px; height: 15px; fill: currentColor; flex: none; }
@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(31, 168, 85, .45); }
  50% { box-shadow: 0 0 0 8px rgba(31, 168, 85, 0); }
}

/* زر واتساب العائم */
.fab {
  position: fixed; z-index: 40;
  inset-block-end: calc(18px + env(safe-area-inset-bottom, 0px));
  inset-inline-end: calc(18px + env(safe-area-inset-right, 0px));
  display: inline-flex; align-items: center; gap: 10px;
  background: #1fa855; color: #fff; text-decoration: none; border-radius: 999px;
  padding: 10px 18px 10px 12px; box-shadow: 0 8px 24px rgba(0,0,0,.35);
  animation: wa-pulse 2.4s ease-in-out infinite;
}
[dir="rtl"] .fab { padding: 10px 12px 10px 18px; }
.fab svg { width: 30px; height: 30px; fill: currentColor; flex: none; }
.fab-text { display: flex; flex-direction: column; line-height: 1.15; font-family: var(--f-display); font-weight: 700; font-size: var(--fs-base); }
.fab-text small { font-weight: 500; font-size: var(--fs-2xs); opacity: .9; }
.fab:hover { background: #18914a; }

@media (prefers-reduced-motion: reduce) { .fab, .contact-row .btn.wa { animation: none; } }

.toast {
  position: fixed; inset-block-end: calc(20px + env(safe-area-inset-bottom, 0px)); inset-inline: 0; margin-inline: auto;
  width: max-content; max-width: calc(100vw - 32px); z-index: 60;
  background: var(--ink); color: var(--bg); border-radius: 999px; padding: 8px 18px; font-family: var(--f-display); font-size: var(--fs-sm);
}

/* ---------- الجوال ---------- */
.topbar, .close-only { display: none; }
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 25; }

@media (max-width: 960px) {
  :root { --main-pad: 16px; }
  .site-footer { margin-block-end: calc(-32px - env(safe-area-inset-bottom, 0px)); }
  .topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 12px;
    padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
    background: var(--side); border-bottom: 1px solid var(--line);
  }
  .topbar-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-weight: 600; }
  .close-only { display: inline-grid; }
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; width: min(86vw, var(--side-w)); }
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  body.menu-open .sidebar { transform: none; }
  .main {
    margin-inline-start: 0;
    padding-block: 20px 32px;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
  .hero { grid-template-columns: 1fr; padding: 24px 20px; gap: 12px; }
  .hero-year { flex-direction: row; font-size: 2.6rem; justify-content: flex-start; gap: 2px; }
  [dir="rtl"] .hero-year { justify-content: flex-end; }
  .page-head { grid-template-columns: 1fr; }
  .page-head .vert { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail .visual { aspect-ratio: 16 / 9; border-inline-end: 0; border-block-end: 3px solid var(--c); }
  .detail-body { padding: 18px 18px 20px; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid.divisions { grid-template-columns: 1fr; }
  .card-body { padding: 10px 10px 12px; }
  .card-title { font-size: var(--fs-sm); }
  .card-meta { display: none; }
  .fab { padding: 8px 14px 8px 10px; }
  [dir="rtl"] .fab { padding: 8px 10px 8px 14px; }
  .fab svg { width: 26px; height: 26px; }
  .contact-row { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .stats div { padding: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* تنسيق الخطوط: تباعد الحروف يفكّك العربي، فيُلغى في النسخة العربية */
html[lang="ar"] .eyebrow,
html[lang="ar"] .card-kicker,
html[lang="ar"] .cat-head small,
html[lang="ar"] .visual .soon,
html[lang="ar"] .brand-stack span { letter-spacing: 0; }
.hero p { font-size: var(--fs-md); line-height: 1.8; }
.card-meta { line-height: 1.6; }
.section-head h2, .cat-head h2, .detail h2 { line-height: var(--lh-head); }
.detail p { font-size: var(--fs-base); line-height: 1.85; }

/* ---------- الفوتر: نفس فوتر creative-codes.sa ---------- */
.site-footer {
  --f-bg: #080a0e; --f-ink: #f0f2f5; --f-muted: #8b909a; --f-gold: #eca129;
  --f-tile: rgba(255,255,255,.05); --f-tile-line: rgba(255,255,255,.08); --f-line: rgba(255,255,255,.06);
  background: var(--f-bg); color: var(--f-ink);
  margin-inline: calc(var(--main-pad) * -1); margin-block: 24px calc(-40px - env(safe-area-inset-bottom, 0px));
  padding-block: 36px calc(24px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--f-line);
}
:root[data-theme="light"] .site-footer { --f-muted: #9aa0aa; }
.f-wrap { max-width: 1180px; margin-inline: auto; padding-inline: var(--main-pad); }
.f-wrap + .f-wrap { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--f-line); }
.f-title { margin: 0 0 14px; text-align: center; font-family: var(--f-display); font-weight: 700; font-size: var(--fs-xs); color: var(--f-muted); }
.f-title:not(:first-child) { margin-top: 28px; }

.f-logo {
  width: 56px; height: 56px; flex: none; display: grid; place-items: center;
  background: var(--f-tile); border: 1px solid var(--f-tile-line); border-radius: 8px;
}
.f-logo img { max-width: 70%; max-height: 70%; object-fit: contain; opacity: .85; transition: opacity .2s; }
.f-logo:hover img { opacity: 1; }

.f-marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.f-track { display: flex; gap: 12px; width: max-content; animation: f-scroll 40s linear infinite; }
.f-marquee:hover .f-track { animation-play-state: paused; }
@keyframes f-scroll { to { transform: translateX(calc(-50% - 6px)); } }
[dir="rtl"] .f-track { animation-name: f-scroll-rtl; }
@keyframes f-scroll-rtl { to { transform: translateX(calc(50% + 6px)); } }

.f-media { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px 48px; }
.f-group { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.f-group-title { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: var(--fs-2xs); color: var(--f-gold); }
.f-group-logos { display: grid; grid-auto-flow: row; grid-template-columns: repeat(var(--cols, 2), 56px); gap: 8px; }
.f-group:nth-child(2) .f-group-logos { --cols: 4; }
.f-group:nth-child(3) .f-group-logos { --cols: 3; }
.f-group:nth-child(4) .f-group-logos { --cols: 1; }

.f-main { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 32px; align-items: start; }
.f-brand { display: flex; flex-direction: column; gap: 14px; }
.f-brand-logo { width: 170px; height: auto; }
.f-brand p { margin: 0; color: var(--f-muted); font-size: var(--fs-sm); line-height: 1.85; max-width: 46ch; }
.f-cr { display: flex; align-items: center; gap: 12px; }
.f-cr img { width: 76px; height: 76px; border-radius: 8px; background: #fff; padding: 4px; }
.f-cr div { display: flex; flex-direction: column; line-height: 1.5; }
.f-cr small { color: var(--f-muted); font-size: var(--fs-2xs); }
.f-cr strong { font-family: var(--f-display); font-size: var(--fs-base); }
.f-cr span { color: var(--f-muted); font-size: var(--fs-xs); }
.f-social { display: flex; gap: 8px; }
.f-social a {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px;
  background: var(--f-tile); border: 1px solid var(--f-tile-line); color: var(--f-ink);
}
.f-social a:hover { color: var(--f-gold); border-color: var(--f-gold); }
.f-social svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.f-col { display: flex; flex-direction: column; gap: 10px; }
.f-col h4 { margin: 0 0 4px; font-family: var(--f-display); font-weight: 700; font-size: var(--fs-sm); color: var(--f-ink); }
.f-col a, .f-col .f-ic { color: var(--f-muted); text-decoration: none; font-size: var(--fs-sm); }
.f-col a:hover { color: var(--f-gold); }
.f-ic { display: flex; align-items: flex-start; gap: 8px; line-height: 1.7; }
.f-ic svg { width: 16px; height: 16px; flex: none; margin-top: .3em; stroke: currentColor; fill: none; stroke-width: 1.8; }

.f-offices { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; align-items: start; }
.f-phone .ltr { white-space: nowrap; }
.f-office { background: rgba(255,255,255,.02); border: 1px solid var(--f-line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.f-office.hq { border-color: rgba(236,161,41,.35); }
.f-office-name { display: flex; align-items: center; gap: 6px; font-family: var(--f-display); font-weight: 700; font-size: var(--fs-sm); color: var(--f-ink); }
.f-office.hq .f-office-name { color: var(--f-gold); }
.f-office-name svg { width: 15px; height: 15px; stroke: var(--f-gold); fill: none; stroke-width: 1.8; flex: none; }
.f-office p { margin: 0 0 4px; color: var(--f-muted); font-size: var(--fs-xs); line-height: 1.7; }
.f-phone { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: var(--f-display); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.f-phone-acts { display: flex; gap: 6px; }
.f-phone-acts a {
  width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px;
  background: var(--f-tile); border: 1px solid var(--f-tile-line); color: var(--f-gold);
}
.f-phone-acts a.wa { color: #25d366; }
.f-phone-acts a:hover { border-color: currentColor; }
.f-phone-acts svg { width: 14px; height: 14px; }
.f-phone-acts a:not(.wa) svg { stroke: currentColor; fill: none; stroke-width: 1.8; }
.f-phone-acts a.wa svg { fill: currentColor; }

.f-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; color: var(--f-muted); font-size: var(--fs-xs); }
.f-credit { color: #6b7280; text-decoration: none; font-size: var(--fs-2xs); transition: color .2s; }
.f-credit:hover { color: #e4a23f; }
.f-lang { background: none; border: 1px solid var(--f-tile-line); color: var(--f-ink); border-radius: 999px; padding: 4px 14px; cursor: pointer; font-family: var(--f-display); font-size: var(--fs-xs); }
.f-lang:hover { border-color: var(--f-gold); color: var(--f-gold); }

@media (max-width: 1280px) {
  .f-main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .f-main { grid-template-columns: 1fr; }
  .f-bottom { flex-direction: column; text-align: center; }
  .f-media { gap: 20px 28px; }
}
@media (prefers-reduced-motion: reduce) { .f-track { animation: none; } }
