/* Premium Command Footer */
.q-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(2.4rem, 5vw, 4.4rem) 0 1.25rem;
  color: var(--q-text);
  border-top: 1px solid rgba(244, 63, 94, 0.35);
  background:
    radial-gradient(ellipse 74% 56% at 78% 4%, rgba(244, 63, 94, 0.18), transparent 62%),
    radial-gradient(ellipse 62% 48% at 12% 76%, rgba(245, 158, 11, 0.14), transparent 66%),
    linear-gradient(180deg, #0c0a09 0%, #15100f 44%, #0c0a09 100%);
}

.q-footer__backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.q-footer__grid-light {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background:
    linear-gradient(rgba(244, 63, 94, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(251, 191, 36, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 24%, #000 76%, transparent 100%);
}

.q-footer__glow {
  position: absolute;
  width: min(44vw, 560px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(38px);
  opacity: 0.5;
}

.q-footer__glow--rose {
  top: -20%;
  inset-inline-end: 6%;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.22), transparent 68%);
}

.q-footer__glow--gold {
  bottom: -34%;
  inset-inline-start: -8%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.2), transparent 70%);
}

.q-footer a {
  color: inherit;
  text-decoration: none;
}

.q-footer__cta {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
  padding: clamp(1.15rem, 3vw, 2.05rem);
  border: 1px solid transparent;
  border-radius: clamp(22px, 3vw, 34px);
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(41, 37, 36, 0.74), rgba(12, 10, 9, 0.78)) padding-box,
    linear-gradient(135deg, rgba(244, 63, 94, 0.62), rgba(251, 191, 36, 0.38), rgba(34, 211, 238, 0.18)) border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 28px 72px rgba(0, 0, 0, 0.34),
    0 0 46px rgba(244, 63, 94, 0.1);
}

.q-footer__cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 52% 72% at 82% 24%, rgba(251, 191, 36, 0.14), transparent 66%),
    linear-gradient(115deg, transparent 0 34%, rgba(244, 63, 94, 0.1) 48%, transparent 68%);
  pointer-events: none;
}

.q-footer__cta-content,
.q-footer__cta-actions {
  position: relative;
  z-index: 1;
}

.q-footer__eyebrow {
  margin: 0 0 0.45rem;
  color: var(--q-gold);
  font-size: 0.84rem;
  font-weight: 800;
}

.q-footer__cta h2,
.q-footer__brand h2,
.q-footer__column h3 {
  margin: 0;
  font-family: var(--q-font-display);
  color: #fff;
}

.q-footer__cta h2 {
  max-width: 17ch;
  font-size: clamp(1.6rem, 3.4vw, 3.05rem);
  line-height: 1.18;
  letter-spacing: 0;
}

.q-footer__cta p:last-child {
  max-width: 66ch;
  margin: 0.65rem 0 0;
  color: var(--q-text-muted);
  line-height: 1.85;
}

.q-footer__cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.q-footer__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  min-width: 9.5rem;
  padding: 0.78rem 1.15rem;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.93rem;
  transition:
    transform var(--q-dur-fast, 160ms) var(--q-ease-out),
    box-shadow var(--q-dur-fast, 160ms) var(--q-ease-out),
    border-color var(--q-dur-fast, 160ms) var(--q-ease-out);
}

.q-footer__btn--primary {
  color: #0c0a09;
  background: linear-gradient(135deg, var(--q-cyan), var(--q-gold));
  box-shadow: 0 16px 34px rgba(244, 63, 94, 0.25);
}

.q-footer__btn--ghost {
  color: #fff;
  border: 1px solid rgba(244, 63, 94, 0.34);
  background: rgba(255, 255, 255, 0.045);
}

.q-footer__main {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(150px, 0.65fr) minmax(150px, 0.65fr) minmax(270px, 1fr);
  gap: clamp(1rem, 2.4vw, 1.8rem);
  align-items: stretch;
}

.q-footer__brand,
.q-footer__column {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(168, 162, 158, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.q-footer__brand {
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 2.2vw, 1.4rem);
}

.q-footer__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 152px;
  height: 104px;
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)) padding-box,
    linear-gradient(135deg, rgba(244, 63, 94, 0.35), rgba(251, 191, 36, 0.22)) border-box;
  border: 1px solid transparent;
  transition:
    transform var(--q-dur-fast, 160ms) var(--q-ease-out),
    box-shadow var(--q-dur-fast, 160ms) var(--q-ease-out);
}

.q-footer__logo img {
  display: block;
  width: 132px;
  height: auto;
  max-height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.4));
}

.q-footer__brand h2 {
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  line-height: 1.2;
}

.q-footer__brand p {
  margin: 0.55rem 0 0;
  color: var(--q-text-muted);
  line-height: 1.85;
}

.q-footer__trust-list,
.q-footer__column ul,
.q-footer__indicators {
  list-style: none;
  margin: 0;
  padding: 0;
}

.q-footer__trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.q-footer__trust-list li,
.q-footer__indicators li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--q-text);
  font-size: 0.82rem;
  border: 1px solid rgba(168, 162, 158, 0.16);
  background: rgba(255, 255, 255, 0.04);
}

.q-footer__trust-list li {
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
}

.q-footer__trust-list li::before,
.q-footer__indicators li::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--q-gold);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.72);
}

.q-footer__column {
  padding: clamp(1rem, 2vw, 1.25rem);
}

.q-footer__column h3 {
  margin-bottom: 0.85rem;
  font-size: 1.05rem;
}

.q-footer__column li + li {
  margin-top: 0.52rem;
}

.q-footer__column a {
  display: inline-flex;
  max-width: 100%;
  color: var(--q-text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
  transition:
    color var(--q-dur-fast, 160ms) var(--q-ease-out),
    transform var(--q-dur-fast, 160ms) var(--q-ease-out);
}

.q-footer__contact ul {
  display: grid;
  gap: 0.58rem;
}

.q-footer__contact li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.62rem;
  align-items: center;
  min-width: 0;
  padding: 0.55rem;
  border-radius: 16px;
  background: rgba(12, 10, 9, 0.34);
  border: 1px solid rgba(168, 162, 158, 0.1);
}

.q-footer__contact li + li {
  margin-top: 0;
}

.q-footer__contact strong {
  display: block;
  margin-bottom: 0.05rem;
  color: #fff;
  font-size: 0.78rem;
}

.q-footer__contact-icon {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 14px;
  color: #0c0a09;
  font-size: 0.72rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--q-cyan), var(--q-gold));
  box-shadow: 0 12px 24px rgba(244, 63, 94, 0.2);
}

.q-footer__contact-icon--mail {
  font-size: 0.95rem;
}

.q-footer__bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin-top: clamp(1rem, 2.6vw, 1.8rem);
  padding-top: 1.15rem;
  border-top: 1px solid rgba(168, 162, 158, 0.14);
  color: var(--q-text-muted);
  font-size: 0.86rem;
}

.q-footer__bottom p {
  margin: 0;
}

.q-footer__bottom-links,
.q-footer__indicators {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.q-footer__bottom-links {
  justify-content: center;
  gap: 0.8rem;
}

.q-footer__bottom-links a {
  color: var(--q-text-muted);
}

.q-footer__indicators {
  justify-content: flex-end;
  gap: 0.55rem;
}

.q-footer__indicators li {
  padding: 0.36rem 0.55rem;
  border-radius: 999px;
  margin: 0;
}

@media (hover: hover) and (pointer: fine) {
  .q-footer__btn:hover,
  .q-footer__logo:hover {
    transform: translateY(-2px);
  }

  .q-footer__btn--primary:hover {
    box-shadow: 0 20px 44px rgba(244, 63, 94, 0.34);
  }

  .q-footer__btn--ghost:hover {
    border-color: rgba(251, 191, 36, 0.48);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
  }

  .q-footer__column a:hover,
  .q-footer__bottom-links a:hover {
    color: var(--q-gold);
    transform: translateX(-3px);
  }
}

.q-footer a:focus-visible,
.q-footer__btn:focus-visible,
.q-footer__logo:focus-visible {
  outline: 2px solid var(--q-gold);
  outline-offset: 3px;
}

@media (max-width: 1040px) {
  .q-footer__cta,
  .q-footer__main,
  .q-footer__bottom {
    grid-template-columns: minmax(0, 1fr);
  }

  .q-footer__cta-actions,
  .q-footer__bottom-links,
  .q-footer__indicators {
    justify-content: flex-start;
  }

  .q-footer__main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .q-footer {
    padding: 2rem 0 calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  .q-footer__cta {
    border-radius: 24px;
    padding: 1rem;
  }

  .q-footer__cta h2 {
    max-width: none;
    font-size: clamp(1.35rem, 7vw, 1.9rem);
  }

  .q-footer__cta p:last-child {
    font-size: 0.92rem;
    line-height: 1.75;
  }

  .q-footer__cta-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .q-footer__btn {
    width: 100%;
    min-width: 0;
    min-height: 2.75rem;
  }

  .q-footer__main {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.82rem;
  }

  .q-footer__brand,
  .q-footer__column {
    border-radius: 20px;
  }

  .q-footer__logo {
    width: 132px;
    height: 90px;
  }

  .q-footer__logo img {
    width: 116px;
    max-height: 78px;
  }

  /* العلامة التجارية: كل المحتوى في المنتصف */
  .q-footer__brand {
    justify-items: center;
    text-align: center;
  }

  .q-footer__brand > div {
    max-width: 48ch;
  }

  .q-footer__trust-list {
    justify-content: center;
  }

  /* التواصل: محاذاة لبداية السطر (اليمين في RTL) — لا توسيط */
  .q-footer__contact {
    text-align: start;
  }

  .q-footer__contact h3 {
    text-align: start;
    margin-bottom: 0.75rem;
  }

  .q-footer__contact li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: stretch;
    align-items: center;
    gap: 0.62rem;
    text-align: start;
  }

  .q-footer__contact li > span:last-child {
    text-align: start;
    min-width: 0;
  }

  /* الشريط السفلي: حقوق + روابط + شارات في المنتصف */
  .q-footer__bottom {
    gap: 0.8rem;
    text-align: center;
    justify-items: center;
  }

  .q-footer__bottom > p {
    max-width: 34ch;
    margin-inline: auto;
  }

  .q-footer__bottom-links {
    justify-content: center;
    gap: 0.65rem 1rem;
  }

  .q-footer__indicators {
    justify-content: center;
  }

  /* أعمدة الروابط/القانوني: عنوان في المنتصف، قائمة عمودين (يمين/يسار في RTL) */
  nav.q-footer__column h3 {
    text-align: center;
    margin-bottom: 0.75rem;
  }

  nav.q-footer__column ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem 0.75rem;
    align-items: start;
  }

  nav.q-footer__column li + li {
    margin-top: 0;
  }

  nav.q-footer__column li {
    min-width: 0;
  }

  nav.q-footer__column a {
    display: flex;
    justify-content: center;
    text-align: center;
    width: 100%;
    padding-block: 0.3rem;
    line-height: 1.45;
  }
}

@media (max-width: 420px) {
  .q-footer__cta,
  .q-footer__brand,
  .q-footer__column {
    padding: 0.86rem;
  }

  .q-footer__trust-list,
  .q-footer__indicators {
    gap: 0.42rem;
  }

  .q-footer__trust-list li,
  .q-footer__indicators li {
    font-size: 0.76rem;
  }

  .q-footer__contact li {
    padding: 0.48rem;
  }

  .q-footer__contact-icon {
    width: 2.08rem;
    height: 2.08rem;
    border-radius: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .q-footer__btn,
  .q-footer__logo,
  .q-footer__column a,
  .q-footer__bottom-links a {
    transition: none;
  }
}

/* حركات دخول الأقسام */
.q-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s var(--q-ease-out),
    transform 0.7s var(--q-ease-out);
}

.q-reveal.is-inview {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .q-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
