/* ==========================================================================
   نظام التصميم
   اللون: مينا الأجهزة (أبيض دافئ) + بترولي عميق + برتقالي الشعلة للأزرار
   الخط: Cairo (400 للنص، 600 و700 للعناوين)
   ========================================================================== */

:root {
  --enamel:     #FBFAF7;
  --enamel-2:   #F3F0E6;
  --surface:    #FFFFFF;
  --line:       #E3DDCD;

  /* أخضر ودهبي كريازي */
  --green-900:  #123615;
  --green-700:  #205C22;
  --gold:       #CCA250;
  --gold-deep:  #A87C2E;

  --steel-900:  #18221A;
  --steel-700:  #3E4C40;
  --steel-400:  #5F6B60;
  --flame:      var(--gold);
  --flame-deep: var(--gold-deep);
  --wa:         #1EA952;

  --radius:     10px;
  --radius-sm:  6px;
  --wrap:       1080px;

  --h1: clamp(1.9rem, 5.2vw, 3rem);
  --h2: clamp(1.4rem, 3.4vw, 2rem);
  --h3: 1.14rem;

  --shadow-lift: 0 2px 0 var(--line);
}

*, *::before, *::after { box-sizing: border-box; }

/* أي عنصر فيه hidden يختفي حتى لو ليه display في الـ CSS */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--enamel);
  color: var(--steel-900);
  font-family: 'Cairo', system-ui, 'Segoe UI', sans-serif;
  font-size: 1.02rem;
  line-height: 1.9;
  /* مساحة لشريط الاتصال الثابت على الموبايل */
  padding-bottom: 72px;
}

h1, h2, h3, .display {
  font-family: 'Cairo', system-ui, sans-serif;
  line-height: 1.3;
  letter-spacing: 0;
  margin: 0 0 .6em;
  font-weight: 600;
}

h1 { font-size: var(--h1); font-weight: 700; }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); font-weight: 600; }

p  { margin: 0 0 1.1em; max-width: 68ch; }
a  { color: var(--flame-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }

:focus-visible {
  outline: 3px solid var(--flame);
  outline-offset: 2px;
  border-radius: 3px;
}

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.section { padding: 3.2rem 0; }
.section + .section { border-top: 1px solid var(--line); }
.lead { font-size: 1.12rem; color: var(--steel-700); }
.small { font-size: .88rem; color: var(--steel-400); line-height: 1.7; }

/* ---------- أزرار ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .82rem 1.5rem;
  border: 0;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease;
}
.btn-call { background: var(--gold); color: #172A18; }
.btn-call:hover { background: #DDB86A; }
.btn-wa   { background: var(--wa); color: #fff; }
.btn-wa:hover { filter: brightness(.93); }
.btn-ghost {
  background: transparent;
  color: var(--steel-900);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--enamel-2); }

/* ---------- الهيدر ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40;
  background: rgba(251, 250, 247, .95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-in { display: flex; align-items: center; gap: .75rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; }
.brand-text { display: none; }                    /* موبايل: الأيقونة بس */
.brand-name { display: block; font-weight: 700; font-size: 1.02rem; line-height: 1.25; }
.brand-sub  { display: block; font-size: .72rem; color: var(--steel-400); line-height: 1.25; }

.nav { display: none; gap: 1.05rem; margin-inline-start: auto; }
.nav a { color: var(--steel-700); text-decoration: none; font-size: .92rem; white-space: nowrap; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--green-700); }
.nav a[aria-current='page'] { font-weight: 700; }

.header-call { margin-inline-start: auto; padding: .6rem 1rem; font-size: .95rem; }

.menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--steel-900); cursor: pointer;
}
.menu-btn:hover { background: var(--enamel-2); }

@media (min-width: 640px) {
  .brand-text { display: block; }                 /* تابلت وأكبر: الاسم يرجع */
}
@media (min-width: 1100px) {
  .nav { display: flex; }
  .header-call { margin-inline-start: 0; }
  .menu-btn { display: none; }
}

/* ---------- القائمة الجانبية (موبايل) ---------- */
.oc-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(10, 20, 11, .5);
  opacity: 0; transition: opacity .2s ease;
}
.offcanvas {
  position: fixed; z-index: 61;
  top: 0; bottom: 0; inset-inline-end: 0;          /* بتطلع من ناحية زرار القائمة */
  width: min(86vw, 360px);
  background: var(--enamel);
  display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top, 0px) + .8rem) 1.1rem calc(env(safe-area-inset-bottom, 0px) + 1rem);
  box-shadow: 0 0 40px rgba(0, 0, 0, .18);
  transform: translateX(-100%);                    /* RTL: inline-end = اليسار */
  transition: transform .22s ease;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.oc-open .oc-backdrop { opacity: 1; }
.oc-open .offcanvas { transform: translateX(0); }

.oc-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.oc-close {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--steel-900); cursor: pointer; border-radius: var(--radius-sm);
}
.oc-close:hover { background: var(--enamel-2); }

.oc-nav { display: flex; flex-direction: column; padding: .4rem 0; }
.oc-label { margin: 1rem 0 .3rem; font-size: .78rem; font-weight: 700; color: var(--steel-400); letter-spacing: .02em; }
.oc-nav a {
  display: flex; align-items: center; gap: .6rem;
  padding: .72rem .4rem;
  color: var(--steel-900); text-decoration: none; font-size: 1rem;
  border-bottom: 1px solid var(--line);
}
.oc-nav a:hover { background: var(--enamel-2); }
.oc-nav a[aria-current='page'] { color: var(--green-700); font-weight: 700; }

.oc-actions { margin-top: auto; padding-top: 1rem; display: grid; gap: .5rem; }

@media (prefers-reduced-motion: reduce) {
  .offcanvas, .oc-backdrop { transition: none; }
}

/* ---------- الهيرو ---------- */
.hero { padding: 2.6rem 0 2rem; }
.hero h1 { margin-bottom: .35em; }
.hero-sub { font-size: 1.14rem; color: var(--steel-700); max-width: 54ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.6rem 0 .6rem; }
.hero-actions .btn { flex: 1 1 190px; }

.hotline {
  font-family: 'Cairo', system-ui, sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: .02em;
  direction: ltr;
  display: inline-block;
}

/* ---------- محدد العطل (العنصر المميز في الصفحة) ---------- */
.picker {
  margin-top: 2.2rem;
  background: var(--green-900);
  color: #EDEFEA;
  border-radius: var(--radius);
  padding: 1.5rem 1.2rem 1.2rem;
}
.picker h2 { color: #fff; font-size: 1.22rem; margin-bottom: 1rem; }
.picker-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.1rem; }
.picker-tab {
  background: transparent;
  color: #D6DBD6;
  border: 1px solid #3C6B3E;
  border-radius: 999px;
  padding: .42rem 1rem;
  font: inherit;
  font-size: .95rem;
  cursor: pointer;
}
.picker-tab[aria-selected='true'] { background: var(--gold); border-color: var(--gold); color: #172A18; font-weight: 600; }
.picker-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.picker-list a {
  display: block;
  color: #E7EAE6;
  text-decoration: none;
  padding: .62rem .2rem;
  border-bottom: 1px solid #234926;
  font-size: .99rem;
}
.picker-list a:hover { color: #fff; background: #1A4A1D; }
.picker-note { margin: .9rem 0 0; font-size: .85rem; color: #9DB39E; }

/* ---------- شبكة الأجهزة ---------- */
.grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-lift);
}
.card:hover { border-color: var(--steel-400); }
.card h3 { margin-bottom: .25em; }
.card p  { margin: 0; font-size: .92rem; color: var(--steel-700); }
.card-icon { font-size: 1.5rem; line-height: 1; margin-bottom: .5rem; display: block; }

/* ---------- قائمة الأعطال في صفحة الجهاز ---------- */
.faults { display: grid; gap: 1rem; }
.fault {
  background: var(--surface);
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.2rem;
}
.fault h3 { margin-bottom: .45em; }
.fault p { margin-bottom: .6em; font-size: .97rem; }
.fault p:last-child { margin-bottom: 0; }
.fault-diy {
  background: var(--enamel-2);
  border-radius: var(--radius-sm);
  padding: .7rem .85rem;
  font-size: .93rem;
  color: var(--steel-700);
}
.fault-diy b { color: var(--steel-900); }

/* ---------- الجداول ---------- */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .96rem; min-width: 420px; }
th, td { text-align: start; padding: .72rem .8rem; border-bottom: 1px solid var(--line); }
th { font-weight: 600; background: var(--enamel-2); }

/* ---------- الأسئلة الشائعة ---------- */
.faq { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  padding: 1rem 0;
  font-weight: 600;
  font-family: 'Cairo', system-ui, sans-serif;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--gold-deep); font-size: 1.3rem; line-height: 1; }
.faq[open] summary::after { content: '−'; }
.faq p { padding-bottom: .6rem; font-size: .97rem; color: var(--steel-700); }

/* ---------- المناطق ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0; }
.chips li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .3rem .8rem;
  font-size: .88rem;
  color: var(--steel-700);
}

/* ---------- شريط ثابت للاتصال (موبايل) ---------- */
.callbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.callbar a {
  display: flex; align-items: center; justify-content: center; gap: .45rem;
  padding: 1rem .5rem;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  font-size: 1rem;
}
.callbar .cb-call { background: var(--gold); color: #172A18; }
.callbar .cb-wa   { background: var(--wa); }

@media (min-width: 880px) {
  .callbar { display: none; }
  body { padding-bottom: 0; }
}

/* ---------- الفوتر ---------- */
.site-footer {
  background: var(--green-900);
  color: #B6C5B7;
  padding: 2.6rem 0 2rem;
  font-size: .93rem;
}
.site-footer a { color: #E4E8E4; }
.foot-title { color: #fff; font-weight: 700; font-size: 1rem; margin: 0 0 .6em; }
.copyright { margin: 1rem 0 0; font-size: .85rem; color: #B6C5B7; max-width: none; }
.footer-grid { display: grid; gap: 1.8rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.footer-list a { text-decoration: none; }
.footer-list a:hover { text-decoration: underline; }
.disclaimer {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid #2A4E2C;
  font-size: .85rem;
  color: #93A894;
  line-height: 1.8;
}

/* ---------- فتات الخبز ---------- */
.crumbs { font-size: .86rem; color: var(--steel-400); padding-top: 1.2rem; }
.crumbs a { color: var(--steel-700); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- قوائم داخل المقالات ---------- */
article ul { padding-inline-start: 1.2rem; margin: 0 0 1.2em; max-width: 68ch; }
article li { margin-bottom: .45em; }
article h2 { margin-top: 0; }

/* ---------- كارت أرقام الحجز ---------- */
.cc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem 1.1rem 1rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(18, 54, 21, .06);
}
.cc::before {                                   /* الشريط الملون فوق */
  content: ''; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(to left, var(--green-700), var(--gold));
}
.cc-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem; margin-bottom: 1rem; }
.cc-title { font-size: 1.15rem; margin: 0; }
.cc-status { display: inline-flex; align-items: center; gap: .45rem; margin: 0; font-size: .88rem; font-weight: 600; color: var(--steel-400); }
.cc-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--steel-400); }
.cc-status.is-open { color: var(--green-700); }
.cc-status.is-open .cc-dot { background: #1EA952; box-shadow: 0 0 0 0 rgba(30, 169, 82, .5); animation: cc-pulse 2s infinite; }
@keyframes cc-pulse { 70% { box-shadow: 0 0 0 7px rgba(30, 169, 82, 0); } 100% { box-shadow: 0 0 0 0 rgba(30, 169, 82, 0); } }

.cc-grid { display: grid; gap: .65rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.cc-tile {
  display: flex; align-items: center; gap: .8rem;
  padding: .85rem .9rem;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface);
  color: var(--steel-900); text-decoration: none;
  transition: border-color .15s ease, transform .15s ease;
  min-width: 0;
}
.cc-tile:hover { border-color: var(--gold); transform: translateY(-1px); }
.cc-icon {
  flex: none; width: 42px; height: 42px; border-radius: 10px;
  display: grid; place-items: center;
  background: #EEF4EE; color: var(--green-700);
}
.cc-icon svg { width: 20px; height: 20px; }
.cc-text { display: flex; flex-direction: column; min-width: 0; }
.cc-label { font-size: .8rem; color: var(--steel-400); line-height: 1.3; }
.cc-num { font-size: 1.12rem; font-weight: 700; line-height: 1.35; direction: ltr; text-align: right; letter-spacing: .01em; font-variant-numeric: tabular-nums; }

.cc-main { background: #FBF6EA; border-color: var(--gold); }
.cc-main .cc-icon { background: var(--green-700); color: #fff; }
.cc-main .cc-num { font-size: 1.45rem; color: var(--green-900); }

.cc-wa .cc-icon { background: #E3F5EA; color: #1EA952; }
.cc-wa .cc-num { color: #16803F; }

.section.cc-wrap { padding-top: .5rem; border-top: 0; }
.hero-cc { margin-top: 1.6rem; }
.cc-foot { margin: .9rem 0 0; font-size: .82rem; color: var(--steel-400); }

/* موبايل: الخط الساخن على عرض الكارت كله، والباقي عمودين */
@media (max-width: 520px) {
  .cc { padding: 1.1rem .8rem .9rem; }
  .cc-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .cc-main { grid-column: 1 / -1; }
  .cc-tile { flex-direction: column; align-items: flex-start; gap: .5rem; padding: .75rem; }
  .cc-main { flex-direction: row; align-items: center; }
  .cc-num { font-size: 1rem; }
  .cc-main .cc-num { font-size: 1.5rem; }
  .cc-icon { width: 36px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) { .cc-status.is-open .cc-dot { animation: none; } .cc-tile { transition: none; } }
