/* ==========================================================================
   منصة قوى — الواجهة العامة (qiwa.sa) مطابقة للموقع الرسمي
   القيم مستخرجة من الأنماط المحسوبة في qiwa.sa/ar على عرض 1440px:
   الألوان والمقاسات والانتقالات (transition) كما هي.
   ========================================================================== */

:root {
  --q-ink: #161616;          /* النص الأساسي */
  --q-ink-2: #0D121C;        /* أغمق — الأسئلة والحقوق */
  --q-body: #20183B;         /* لون نص الجسم الافتراضي */
  --q-text: #384250;         /* الفقرات */
  --q-muted: #4D5761;
  --q-gray-500: #6C737F;
  --q-gray-400: #9DA4AE;
  --q-gray-300: #D2D6DB;
  --q-gray-200: #E5E7EB;
  --q-gray-100: #F3F4F6;
  --q-gray-50: #F9FAFB;
  --q-navy-800: #1F2A37;
  --q-navy-900: #111927;
  --q-focus: #182230;
  --q-green: #1B8354;
  --q-green-dark: #166A45;
  --q-green-light: #54C08A;
  --q-shadow-card: 0 2px 1px 0 rgba(0, 0, 0, .06);
  --q-shadow-pop: 0 8px 24px 0 rgba(0, 0, 0, .12), 0 2px 2px 0 rgba(0, 0, 0, .12);
  --q-font: 'IBM Plex Sans', 'IBM Plex Sans Arabic', sans-serif;
  --q-container: 1312px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.qp {
  margin: 0;
  font-family: var(--q-font);
  font-size: 16px;
  line-height: 24px;
  color: var(--q-body);
  background: #fff;
}
/* التصفير داخل :where() حتى لا يطغى على أنماط المكوّنات (تخصيصية صفرية) */
:where(.qp) a { color: inherit; text-decoration: none; }
:where(.qp) button { font-family: inherit; font-size: inherit; line-height: inherit; cursor: pointer; background: none; border: 0; padding: 0; color: inherit; }
:where(.qp) :where(p, h1, h2, h3, ul) { margin: 0; }
:where(.qp) ul { list-style: none; padding: 0; }
:where(.qp) img { max-width: 100%; display: block; }
:where(.qp) svg { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.q-container { width: 100%; max-width: var(--q-container); margin-inline: auto; padding-inline: 24px; }

/* الأيقونات: span بحجم ثابت والـ svg يملؤه */
.q-ic { display: inline-flex; flex: none; width: 24px; height: 24px; border-radius: 9999px; }
.q-ic svg { width: 100%; height: 100%; }
.q-ic--20 { width: 20px; height: 20px; }
.q-ic--16 { width: 16px; height: 16px; }
/* في الاتجاه العربي تُعكس أيقونات الأسهم أفقياً كما في قوى */
[dir="rtl"] .q-inv { transform: scaleX(-1); }
/* السهم «>» يُدار ليصبح للأسفل/الأعلى */
.q-chev svg { transition: color .1s ease-in, transform .2s ease-in; transform: rotate(90deg); }
.q-chev.is-up svg { transform: rotate(-90deg); }

:focus-visible { outline: 3px solid var(--q-focus); outline-offset: 1px; }

/* ------------------------------- الأزرار ------------------------------- */

/* الزر الرمادي الثانوي (يتكرر في كل الأقسام) */
.q-btn {
  user-select: none;
  display: flex; align-items: center; justify-content: center;
  width: fit-content; height: 40px; padding: 8px 16px;
  border: 1px solid var(--q-gray-300); border-radius: 4px;
  background-color: var(--q-gray-100);
  font-size: 14px; font-weight: 500; line-height: 20.02px; color: var(--q-ink);
  transition: background-color .1s ease-in, border-color .1s ease-in;
  cursor: pointer; white-space: nowrap;
}
.q-btn:hover { background-color: var(--q-gray-200); border-color: var(--q-gray-200); }
.q-btn .q-ic { margin-inline-start: 8px; color: var(--q-ink); }
.q-btn--ghost { background-color: transparent; }
.q-btn--ghost:hover { background-color: var(--q-gray-200); border-color: var(--q-gray-300); }
.q-btn--ghost .q-ic { margin-inline-start: 0; margin-inline-end: 8px; }

.q-btn--dark {
  height: 44px; padding: 10px 20px;
  background-color: var(--q-ink-2); border-color: var(--q-gray-500);
  font-size: 16px; line-height: 24px; color: #fff;
}
.q-btn--dark:hover { background-color: var(--q-navy-800); border-color: var(--q-gray-500); }

/* زر أيقونة مربع/دائري */
.q-icon-btn {
  display: flex; align-items: center; justify-content: center; position: relative;
  width: 40px; height: 40px; min-width: 40px;
  border: 1px solid var(--q-gray-300); border-radius: 4px; background: #fff;
  transition: background-color .1s, border-color .1s;
}
.q-icon-btn:hover:not(:disabled) { background: var(--q-gray-100); border-color: var(--q-gray-200); }
.q-icon-btn:hover:not(:disabled) svg path { fill: var(--q-ink); }
.q-icon-btn--round { width: 44px; height: 44px; min-width: 44px; border-radius: 9999px; }
.q-icon-btn:disabled { background: var(--q-gray-200); cursor: default; }
.q-icon-btn:disabled .q-ic { color: var(--q-gray-400); }

/* ---------------------------- الشريط الحكومي ---------------------------- */

.gov { background: var(--q-gray-100); }
.gov__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 6px 0; }
.gov__title { display: flex; align-items: center; gap: 10px; }
.gov__flag { width: 24px; height: 24px; }
.gov__text { font-size: 14px; font-weight: 500; line-height: 20.02px; color: var(--q-ink); }
.gov__help { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20.02px; color: var(--q-green); }
.gov__help .q-chev { width: 21px; height: 21px; align-items: center; justify-content: center; }
.gov__help .q-ic--16 { color: var(--q-green); }

.gov__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s ease; }
.gov__panel > div { overflow: hidden; }
.gov.is-open .gov__panel { grid-template-rows: 1fr; }
.gov__body { display: flex; flex-direction: column; gap: 40px; padding: 40px 0 32px; }
.gov__items { display: flex; justify-content: flex-start; gap: 16px; }
.gov__item { display: flex; gap: 24px; flex: 1; }
.gov__item img { width: 48px; height: 48px; flex: none; }
.gov__item-text { display: flex; flex-direction: column; gap: 12px; }
.gov__item-title { font-size: 18px; font-weight: 600; line-height: 27px; color: var(--q-ink); }
.gov__item-title span { color: var(--q-green); }
.gov__item p { color: var(--q-ink); }
.gov__dga { display: flex; align-items: center; gap: 24px; background: #fff; padding: 8px 24px; border-radius: 8px; }
.gov__dga svg { width: 20px; height: 31px; flex: none; }
.gov__dga div { display: flex; align-items: center; gap: 12px; color: var(--q-ink); }
.gov__dga a { color: var(--q-green); text-decoration: underline; }

/* -------------------------------- الهيدر -------------------------------- */

.qh { position: sticky; top: 0; z-index: 102; display: flex; flex-direction: column; }
.qh__bar { background: #fff; border-bottom: 1px solid var(--q-gray-200); }
.qh__inner { display: flex; align-items: center; justify-content: space-between; height: 80px; position: relative; }
.qh__logo { display: flex; width: 64px; flex: none; }
.qh__logo img { width: 64px; }
.qh__navwrap { display: flex; align-items: center; justify-content: space-between; flex: 1; margin-inline-start: 36px; height: 100%; }
.qh__nav, .qh__tools { display: flex; align-items: center; }

/* عنصر القائمة: حشوة 24/16 + مؤشر سفلي بحجم 6px */
.qh-item {
  position: relative; display: inline-flex; align-items: center; gap: 4px;
  padding: 24px 16px; border-radius: 8px;
  font-size: 16px; font-weight: 500; line-height: 24px; color: var(--q-ink);
  background-color: transparent; transition: background-color .1s ease-in;
}
.qh-item::before {
  content: ''; position: absolute; bottom: 0; left: 16px;
  width: calc(100% - 32px); height: 6px; border-radius: 9999px;
  background-color: transparent;
}
.qh-item:hover, .qh-item[aria-expanded="true"] { background-color: var(--q-gray-100); }
.qh-item:hover::before, .qh-item[aria-expanded="true"]::before { background-color: var(--q-gray-400); }
.qh-item:active::before { background-color: var(--q-ink-2); }
.qh-item.is-active { background-color: var(--q-green); color: #fff; }
.qh-item.is-active::before { background-color: var(--q-green-light); }
.qh-item.is-active:hover { background-color: var(--q-green-dark); }
.qh-item .q-ic { color: currentColor; }
.qh-item__chev { display: inline-flex; transition: transform .2s; }
.qh-item[aria-expanded="true"] .qh-item__chev { transform: rotate(180deg); }
.qh-item__chev .q-ic svg { transform: rotate(90deg); }

/* القائمة الكبرى «مركز المعرفة» */
.mega {
  position: fixed; inset-inline: 0; z-index: 1;
  background: #fff; border-top: 1px solid var(--q-gray-300);
  border-radius: 0 0 16px 16px; box-shadow: var(--q-shadow-pop);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}
.mega.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .2s ease; }
.mega__grid { display: flex; gap: 40px; margin: 32px 0; }
.mega__col { flex: 1; display: flex; flex-direction: column; gap: 16px; }
.mega__head { display: flex; align-items: center; gap: 8px; }
.mega__bubble { display: flex; padding: 8px; border-radius: 9999px; background: var(--q-gray-100); color: var(--q-ink); }
.mega__bubble svg { width: 24px; height: 24px; }
.mega__title { font-size: 18px; font-weight: 600; line-height: 23.94px; color: var(--q-ink); }
.mega__links { display: flex; flex-direction: column; gap: 16px; padding-inline-start: 48px; align-items: flex-start; }
.mega__links a { color: var(--q-text); font-weight: 500; }
.mega__links a:hover { color: var(--q-muted); }
.mega__all { font-size: 14px; color: var(--q-text) !important; text-decoration: underline; }
.mega__all:hover { color: var(--q-gray-500) !important; }
.mega__col--side { gap: 24px; }
.mega__link-head { display: flex; align-items: center; gap: 8px; width: fit-content; }
.mega__link-head:hover .mega__title { color: var(--q-muted); }
.mega__card {
  margin-top: 8px; min-height: 250px; border-radius: 16px; padding: 24px 16px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
  background: #1F2A37 url('../assets/qiwa/imageCard.webp') center / cover no-repeat;
}
.mega__card-title { font-size: 24px; font-weight: 600; line-height: 34.08px; color: #fff; }
.mega__card-text { max-width: 170px; color: #fff; }
.mega__card .q-btn { align-self: flex-end; }

/* قائمة اللغة */
.lang { position: relative; }
.lang__menu {
  position: absolute; top: calc(100% + 4px); inset-inline-end: 0; width: 300px; z-index: 202;
  background: #fff; border: 1px solid var(--q-gray-300); border-radius: 8px; box-shadow: var(--q-shadow-pop);
  padding: 16px; display: flex; flex-direction: column; gap: 8px;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
}
.lang.is-open .lang__menu { opacity: 1; visibility: visible; transform: none; transition: opacity .15s ease, transform .15s ease; }
.lang__opt {
  display: flex !important; align-items: center; justify-content: space-between;
  width: 100%; padding: 8px 12px !important; border-radius: 4px;
  font-size: 16px; line-height: 24px; color: var(--q-ink) !important;
  transition: background-color .1s ease-in;
}
.lang__opt:hover, .lang__opt.is-on { background-color: var(--q-gray-100) !important; }

/* زر القائمة للجوال */
.qh__burger { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; color: var(--q-ink); }
.qh__burger svg { width: 24px; height: 24px; }

/* --------------------------------- الهيرو -------------------------------- */

.hero {
  background: radial-gradient(112.93% 601.3% at 106.8% 113.39%, #0D121C 0%, #111927 19.75%, #535F71 56.5%, #111927 100%);
}
.hero__inner {
  position: relative; min-height: 491px; padding: 40px 0;
  display: flex; align-items: center; gap: 48px;
  background: url('../assets/qiwa/kc-hero-image-ar.webp') left bottom / contain no-repeat;
}
.hero__text { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.hero__eyebrow { font-size: 14px; font-weight: 600; line-height: 20.02px; color: #fff; }
.hero__body { display: flex; flex-direction: column; gap: 32px; }
.hero__copy { display: flex; flex-direction: column; gap: 16px; }
.hero h1 { font-size: 48px; font-weight: 600; line-height: 1.29; color: #fff; }
.hero__lead { font-weight: 500; color: #fff; white-space: pre-line; }
.hero__spacer { width: 400px; min-width: 400px; }

/* ------------------------------ الأقسام العامة ----------------------------- */

.q-sec { padding: 40px 0; display: flex; flex-direction: column; gap: 64px; background: #fff; }
.q-sec > .q-container { display: flex; flex-direction: column; gap: 64px; }
.q-sec--gray { background: var(--q-gray-50); }

.q-head { display: flex; flex-direction: column; gap: 8px; }
.q-head__eyebrow { font-size: 14px; font-weight: 600; line-height: 20.02px; color: var(--q-muted); }
.q-head__row { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.q-h2 { font-size: 40px; font-weight: 600; line-height: 1.4; color: var(--q-ink); }
.q-head__lead { padding-top: 8px; color: var(--q-text); }

/* بطاقات بصورة خلفية (الفئات، الرؤية، المساعدة) */
.img-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  padding: 24px; border-radius: 16px; min-height: 360px;
  background-color: var(--q-navy-800); background-image: var(--bg); background-size: cover; background-position: center;
}
.img-card--bordered { border: 1px solid var(--q-gray-200); box-shadow: var(--q-shadow-card); }
.img-card__text { display: flex; flex-direction: column; gap: 4px; max-width: 60%; }
.img-card__title { font-size: 32px; font-weight: 600; line-height: 1.31; color: #fff; }
.img-card__desc { color: #fff; }
.img-card--light .img-card__title, .img-card--light .img-card__desc { color: var(--q-ink); }
.img-card__cta { margin-top: auto; display: flex; flex-direction: column; }

.audience__grid { display: flex; gap: 24px; }
.audience__grid > * { flex: 1; }

/* المحرّك الرقمي */
.engine { display: flex; gap: 32px; }
.engine__text { flex: 1; display: flex; flex-direction: column; gap: 64px; }
.engine__head { display: flex; flex-direction: column; gap: 24px; }
.engine__head p { color: var(--q-text); }
.engine__media { flex: 1; max-width: 624px; overflow: hidden; display: flex; }
.engine__media img { width: 100%; height: 100%; object-fit: cover; }

/* رقم + وصف */
.stat { display: flex; flex-direction: column; gap: 8px; }
.stat__num { font-size: 40px; font-weight: 600; line-height: 1.4; color: var(--q-ink); }
.stat__label { font-weight: 500; line-height: 1.5; color: var(--q-text); }

/* مركز المعرفة — الكاروسيل */
.kc { display: flex; flex-direction: column; }
.kc__viewport { overflow: hidden; margin-top: 32px; }
.kc__track { display: flex; margin-inline-start: -16px; transition: transform .5s cubic-bezier(.25, .8, .25, 1); }
.kc__slide { flex: 0 0 calc(100% / 3); padding-inline-start: 16px; display: flex; }
.kc-card {
  flex: 1; max-width: 458px; display: flex; flex-direction: column; gap: 24px;
  background: #fff; padding: 16px; border: 1px solid var(--q-gray-200); border-radius: 16px;
  box-shadow: var(--q-shadow-card); transition: background-color .1s ease-in;
}
.kc-card__body { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.kc-card__bubble { display: flex; width: 40px; height: 40px; padding: 8px; border-radius: 9999px; background: var(--q-gray-50); color: var(--q-body); }
.kc-card__bubble svg { width: 24px; height: 24px; }
.kc-card__title { font-size: 24px; font-weight: 600; line-height: 34.08px; color: var(--q-ink); overflow: hidden; }
.kc-card__desc { color: var(--q-text); overflow: hidden; }
.kc-card__foot { display: flex; flex-direction: column; align-items: flex-end; }
.kc__nav { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; }
.kc__dots { display: flex; gap: 8px; padding: 12px; }
.kc__dots button { width: 16px; height: 16px; border-radius: 50%; background: var(--q-gray-200); transition: background-color .2s; }
.kc__dots button.is-active { background: var(--q-ink-2); }
.kc__arrows { display: flex; gap: 12px; }
.kc__arrows .q-chev svg { transform: none; }
.kc__prev .q-ic svg { transform: rotate(180deg); }

/* قوى في أرقام */
.numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }

/* بوابة البيانات */
.portal {
  display: flex; justify-content: space-between; padding: 24px; border-radius: 16px; min-height: 520px;
  background: #1F2A37 url('../assets/qiwa/data-portal-ar.webp') center / cover no-repeat;
}
.portal__text { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.portal__copy { display: flex; flex-direction: column; gap: 4px; }
.portal__copy p { max-width: 472px; color: #fff; }
.portal__panel {
  width: 620px; min-height: 472px; display: flex; flex-direction: column; gap: 16px;
  background: #fff; padding: 24px; border-radius: 16px;
}
.portal__panel-title { font-size: 24px; font-weight: 600; line-height: 34.08px; color: var(--q-ink); }
.q-divider { height: 1px; background: var(--q-gray-200); }
.seg { display: flex; width: fit-content; max-width: 100%; background: var(--q-gray-100); border-radius: 8px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { max-width: 194px; border: 1px solid var(--q-gray-100); border-radius: 4px; overflow: hidden; flex: none; }
.seg button span { display: flex; gap: 8px; padding: 10px; font-size: 16px; font-weight: 600; line-height: 24px; color: var(--q-ink); white-space: nowrap; transition: background-color .1s ease-in, color .1s ease-in; }
.seg button:hover:not(.is-on) span { background: var(--q-gray-200); }
.seg button.is-on { border-color: var(--q-gray-200); }
.seg button.is-on span { background: var(--q-muted); color: #fff; }
.seg-panels { margin-top: 16px; }
.seg-panel { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.seg-panel[hidden] { display: none; }

/* الأسئلة الشائعة */
.faq__row { display: flex; background: #fff; transition: background-color .15s; }
.faq__row:hover { background: var(--q-gray-50); }
.faq__q { width: 100%; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 16px 0; text-align: start; }
.faq__q-text { margin: 0 8px; font-size: 16px; font-weight: 600; line-height: 24px; color: var(--q-ink-2); }
.faq__a { position: relative; height: 0; overflow: hidden; opacity: 0; visibility: hidden; transition: height .2s .2s, opacity .2s, visibility 0s .4s; }
.faq__a.is-open { opacity: 1; visibility: visible; transition: height .2s, opacity .2s .2s; }
.faq__a-inner { padding: 8px 0 24px; background: #fff; }
.faq__a-inner div { padding: 0 8px; }

/* تحتاج إلى مساعدة؟ */
.help__title { display: flex; align-items: baseline; gap: 8px; }
.copy-link { position: relative; display: flex; }
.copy-link button {
  width: 32px; height: 32px; min-width: 32px; border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: background-color .1s, opacity .15s;
}
.help__title:hover .copy-link button, .copy-link button:focus-visible { opacity: 1; }
.copy-link button:hover { background: var(--q-gray-50); }
.copy-link button:hover svg path { fill: var(--q-gray-500); }
.copy-link__tip {
  position: absolute; bottom: calc(100% + 8px); inset-inline-start: calc(50% - 50px);
  display: flex; white-space: nowrap; padding: 16px; background: #fff;
  border: 1px solid var(--q-gray-200); border-radius: 8px; box-shadow: var(--q-shadow-pop);
  font-size: 14px; line-height: 20px; color: var(--q-ink); opacity: 0; pointer-events: none; transition: opacity .15s;
}
.copy-link button:hover + .copy-link__tip, .copy-link.is-copied .copy-link__tip { opacity: 1; }
.help__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

/* تاريخ آخر تعديل */
.updated { display: flex; justify-content: flex-end; align-items: center; gap: 4px; padding: 16px 0; font-size: 14px; line-height: 20.02px; color: var(--q-ink); }

/* -------------------------------- الفوتر -------------------------------- */

.qf { background: var(--q-gray-100); padding: 48px 0 80px; }
.qf__inner { display: flex; flex-direction: column; gap: 56px; }
.qf__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 32px 24px; }
.qf__col { display: flex; flex-direction: column; gap: 16px; }
.qf__col--contact { grid-area: 1 / 5; gap: 32px; }
.qf__title { display: block; font-weight: 500; color: var(--q-ink); width: fit-content; }
.qf__acc-chev { display: none !important; }
a.qf__title:hover { color: var(--q-gray-500); }
.qf__line { height: 1px; background: var(--q-gray-200); }
.qf__links { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.qf__links li { display: flex; }
.qf__links a { font-size: 14px; font-weight: 500; line-height: 20.02px; color: var(--q-ink); }
.qf__links a:hover { color: var(--q-gray-500); }
.qf__block { display: flex; flex-direction: column; }
.qf__block-title { padding-bottom: 16px; font-weight: 500; color: var(--q-ink); }
.qf__social { display: flex; gap: 8px; padding-top: 16px; }
.qf__social a {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--q-gray-300); border-radius: 4px; color: var(--q-gray-500);
  transition: background-color .1s, border-color .1s;
}
.qf__social a:hover { background: var(--q-gray-100); border-color: var(--q-gray-200); color: var(--q-ink); }
.qf__social svg { width: 24px; height: 24px; }
.qf__tools { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; }
.qf__tools-row { display: flex; align-items: center; gap: 8px; }
.qf__tools .q-btn { width: auto; }
.qf__tools a.q-btn { width: fit-content; min-width: 220px; }
.qf__bottom { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.qf__legal { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.qf__copy { font-size: 14px; font-weight: 600; line-height: 20.02px; color: var(--q-ink-2); }
.qf__legal ul { display: flex; gap: 16px; flex-wrap: wrap; }
.qf__legal a { font-size: 14px; font-weight: 500; line-height: 20.02px; color: var(--q-text); text-decoration: underline; }
.qf__legal a:hover { color: var(--q-gray-500); }
.qf__logos { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.qf__logo-tk { width: 75px; height: 39px; }
.qf__logo-hrsd { width: 132px; height: 48px; object-fit: contain; }

/* -------------------------- شريط ملفات الارتباط -------------------------- */

.cookie {
  position: fixed; inset-inline: 0; bottom: 58px; z-index: 100000;
  max-width: 1128px; margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding: 32px 40px; background: #fff; border-radius: 16px; box-shadow: var(--q-shadow-pop);
  transition: opacity .2s ease, transform .2s ease;
}
.cookie.is-hiding { opacity: 0; transform: translateY(12px); }
.cookie__text { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.cookie__title { font-size: 20px; font-weight: 600; line-height: 1.4; color: var(--q-ink); }
.cookie__text p { color: var(--q-ink); }
.cookie__text a { color: var(--q-navy-800); font-weight: 500; text-decoration: underline; }

/* زر أدوات الوصول (أسفل اليسار) */
.a11y-fab {
  position: fixed; left: 21px; bottom: 21px; z-index: 99999;
  width: 50px; height: 50px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #0060FF; color: #fff;
  box-shadow: 0 0 0 3px #fff inset, 0 4px 12px rgba(0, 0, 0, .25);
  transition: transform .2s ease;
}
.a11y-fab:hover { transform: scale(1.06); }
.a11y-fab svg { width: 30px; height: 30px; }

/* ------------------------------- الاستجابة ------------------------------- */

@media (max-width: 1176px) {
  .q-container { max-width: 992px; }
  .hero__spacer { display: none; }
  .portal { flex-direction: column; gap: 24px; }
  .portal__panel { width: 100%; }
}

@media (max-width: 992px) {
  .qh__nav { display: none; }
  .qh__burger { display: inline-flex; }
  .qh__inner { height: 64px; }
  .qh__navwrap { justify-content: flex-end; }
  .qh.is-menu .qh__nav {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 100%; inset-inline: 0; background: #fff;
    padding: 8px 24px 16px; border-bottom: 1px solid var(--q-gray-200); box-shadow: var(--q-shadow-pop);
  }
  .qh-item { padding: 12px 16px; }
  .qh-item::before { display: none; }
  .mega { display: none; }
  .engine, .audience__grid { flex-direction: column; }
  .kc__slide { flex-basis: 50%; }
}

@media (max-width: 768px) {
  .q-container { padding-inline: 16px; }
  /* هيدر الجوال كما في قوى: شعار 48px + أزرار أيقونات دائرية 40px بفاصل 16px */
  .qh__inner { height: 64px; }
  .qh__logo, .qh__logo img { width: 48px; }
  .qh__navwrap { margin-inline-start: 16px; }
  .qh__tools { gap: 16px; }
  .qh__tools .qh-item, .qh__burger {
    width: 40px; height: 40px; padding: 0; border-radius: 9999px; justify-content: center; gap: 0;
  }
  .qh__tools .qh-item::before { display: none; }
  .qh__tools .qh-item__label, #langBtn > span:not(:first-child) { display: none; }
  .hero { background: radial-gradient(881.92% 475.17% at -29.56% -13.35%, #0D121C 0%, #111927 19.75%, #535F71 56.5%, #111927 100%); }
  .hero__inner { flex-direction: column; align-items: stretch; justify-content: center; background: none; }
  .hero__text { flex: none; }
  .hero h1 { font-size: 32px; line-height: 41.92px; }
  .q-btn { width: 100%; }
  .cookie { bottom: 0; margin: 0; max-width: none; border-radius: 12px 12px 0 0; padding: 24px 16px 40px; flex-direction: column; align-items: stretch; }
  .cookie .q-btn { width: 100%; }
  .cookie__title { font-size: 16px; line-height: 24px; }
  /* مقاسات الجوال كما في قوى */
  .q-h2 { font-size: 32px; line-height: 41.92px; }
  .img-card__title, .kc-card__title { font-size: 24px; line-height: 34.08px; }
  .stat__num { font-size: 36px; line-height: 47.88px; }
  .stat__label { font-size: 14px; line-height: 20.02px; }
  /* الفوتر على الجوال: أكورديون */
  .qf__grid { grid-template-columns: 1fr; gap: 0; }
  .qf__col { gap: 0; }
  .qf__col > .qf__title { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 16px 8px; font-weight: 600; }
  .qf__col > .qf__line { order: 3; }
  .qf__col > .qf__links { order: 2; display: none; padding: 0 8px 16px; }
  .qf__col.is-open > .qf__links { display: flex; }
  .qf__acc-chev { display: inline-flex !important; }
  .qf__col.is-open .qf__acc-chev svg { transform: rotate(-90deg); }
  .qf__col--contact { padding-top: 24px; order: 10; }
  /* الأقسام على الجوال: فاصل 32 بدل 64، بطاقات 250px بحشوة 16 وصور الجوال */
  .q-sec > .q-container { gap: 32px; }
  .img-card { min-height: 250px; padding: 16px; background-image: var(--bg-m, var(--bg)); }
  .engine__text { gap: 32px; }
  .engine__head { gap: 16px; }
  .gov__row { gap: 8px; }
  /* الكاروسيل على الجوال: شريحة 281px تُظهر طرف التالية، بفاصل 8px */
  .kc__track { margin-inline-start: -8px; }
  .kc__slide { flex: 0 0 calc(100% - 70px); padding-inline-start: 8px; }
  .kc__nav { margin-top: 16px; }
  .kc__viewport { margin-top: 24px; }
  .kc-card { gap: 16px; }
  .engine__media { max-width: none; }
  .q-head__row { gap: 8px; }
  .stat { gap: 4px; }
  .portal { padding: 24px 16px; gap: 24px; background-image: url('../assets/qiwa/data-portal-mobile-ar.webp'); }
  .portal__text { display: contents; }
  .portal__copy { order: 1; }
  .portal__panel { order: 2; min-height: 533px; padding: 16px; }
  .portal__text > .q-btn { order: 3; }
  .updated { flex-direction: column; align-items: flex-start; gap: 0; padding: 16px 0; }
  .qf__block-title { padding: 16px 8px; }
  .qf__social { padding-top: 20px; }
  .img-card__text { max-width: 100%; }
  .q-head__row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .numbers { grid-template-columns: 1fr; }
  .help__grid { grid-template-columns: 1fr; }
  .gov__items { flex-direction: column; }
  .qf__col--contact { grid-area: auto; }
  .seg-panel { grid-template-columns: 1fr; }
  .qf__bottom { flex-direction: column; align-items: flex-start; }
}
