/* =========================================================
   Alpha 20 — الفوتر + الأزرار العائمة
   (يعتمد على المتغيرات المعرّفة في contact.css)
   ========================================================= */

#footer.cf-footer {
  /* ألوان الفوتر (أسود) */
  --ft-bg: var(--cf-black);
  --ft-ink: var(--cf-white);
  --ft-muted: rgba(255, 255, 255, 0.72);
  --ft-soft: rgba(255, 255, 255, 0.55);
  --ft-line: rgba(255, 255, 255, 0.14);
  --ft-hover: var(--cf-orange);
  position: relative;
  z-index: 1;
  background: var(--ft-bg);
  color: var(--ft-ink);
  font-family: var(--cf-font-ar);
  padding-top: clamp(24px, 4vw, 48px);
}
html[lang^="en"] #footer.cf-footer,
html[dir="ltr"] #footer.cf-footer { font-family: var(--cf-font-en); }

.cf-footer a { color: inherit; text-decoration: none; }
.cf-footer ul { list-style: none; margin: 0; padding: 0; }

.cf-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(32px, 4vw, 56px);
  padding-block: clamp(48px, 6vw, 80px);
  border-top: 1px solid var(--ft-line);
}

/* ---------- الشعار ---------- */
.cf-footer__logo { display: inline-block; }
.cf-footer__logo img { display: block; height: 56px; width: auto; }

.cf-footer__desc {
  margin: 22px 0 28px;
  max-width: 36ch;
  font-size: 1rem;
  line-height: 1.9;
  color: var(--ft-muted);
}

/* ---------- السوشال ميديا ---------- */
.cf-social { display: flex; flex-wrap: wrap; gap: 12px; }

.cf-footer .cf-social__link {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--cf-surface);
  color: var(--cf-white);
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.cf-social__link svg,
.cf-footer__icon svg,
.cf-fab-wa svg,
.cf-to-top svg {
  width: 20px; height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cf-social__link .cf-fill { fill: currentColor; stroke: none; }

.cf-footer .cf-social__link:hover {
  background: var(--cf-orange);
  color: var(--cf-black);
  transform: translateY(-2px);
}
.cf-social__link:focus-visible,
.cf-footer__list a:focus-visible,
.cf-footer__contact a:focus-visible,
.cf-footer__logo:focus-visible {
  outline: 2px solid var(--cf-orange);
  outline-offset: 3px;
  border-radius: 6px;
}
.cf-social__link:focus-visible { border-radius: 50%; }

/* ---------- الأعمدة ---------- */
.cf-footer__title {
  margin: 8px 0 24px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ft-ink);
}

.cf-footer__list { display: grid; gap: 14px; }
.cf-footer__list a {
  color: var(--ft-muted);
  transition: color .2s ease;
}
.cf-footer__list a:hover { color: var(--ft-hover); }

.cf-footer__contact { display: grid; gap: 16px; }
.cf-footer__contact li {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ft-muted);
}
.cf-footer__contact a { transition: color .2s ease; }
.cf-footer__contact a:hover { color: var(--ft-hover); }
html[dir="rtl"] .cf-footer__contact a[dir="ltr"] { text-align: right; }

/* الرقم الضريبي والسجل التجاري: عنوان صغير فوق الرقم */
.cf-footer__meta { display: grid; gap: 2px; }
.cf-footer__meta-label { font-size: .85rem; color: var(--ft-soft); }
.cf-footer__meta-value {
  direction: ltr;
  unicode-bidi: isolate;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--ft-ink);
}
html[dir="rtl"] .cf-footer__meta-value { text-align: right; }

.cf-footer__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--cf-surface);
  color: var(--cf-orange);
}

/* ---------- الحقوق ---------- */
.cf-footer__bottom {
  padding-block: 26px;
  border-top: 1px solid var(--ft-line);
  text-align: center;
  font-size: .95rem;
  color: var(--ft-soft);
}
.cf-footer__bottom p { margin: 0; }

/* ---------- الأزرار العائمة ---------- */
.cf-fab-wa {
  position: fixed;
  right: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 900;
  display: grid;
  place-items: center;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--cf-black);
  color: var(--cf-white);
  box-shadow: 0 0 0 2px var(--cf-white), 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: transform .2s ease;
}
.cf-fab-wa svg { width: 28px; height: 28px; stroke-width: 1.9; }
.cf-fab-wa:hover { transform: scale(1.06); }
.cf-fab-wa:focus-visible { outline: 2px solid var(--cf-white); outline-offset: 4px; }

.cf-to-top {
  position: fixed;
  left: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 900;
  display: grid;
  place-items: center;
  width: 50px; height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: var(--cf-surface);
  color: var(--cf-white);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s, background-color .2s ease;
}
.cf-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.cf-to-top:hover { background: var(--cf-orange); color: var(--cf-black); border-color: transparent; }
.cf-to-top:focus-visible { outline: 2px solid var(--cf-orange); outline-offset: 3px; }

/* ---------- تجاوب ---------- */
@media (max-width: 1024px) {
  .cf-footer__top { grid-template-columns: 1fr 1fr; }
  .cf-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .cf-footer__top { grid-template-columns: 1fr 1fr; gap: 36px 20px; }
  .cf-footer__top > .cf-footer__col:last-child { grid-column: 1 / -1; }
  .cf-fab-wa { right: 16px; width: 52px; height: 52px; }
  .cf-to-top { left: 16px; width: 46px; height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  .cf-social__link, .cf-to-top, .cf-fab-wa { transition: none; }
}

/* شعار الضريبة والسجل التجاري */
.cf-footer__badge {
  flex: none;
  display: block;
  width: auto;
  height: 56px;
  border-radius: 6px;
}
@media (max-width: 560px) {
  .cf-footer__badge { height: 48px; }
}
