/* الفوتر — فاتح بهوية آفاق */

.nx-foot {
  --nx-navy: #163A7A;
  position: relative;
  overflow: clip;
  direction: rtl;
  margin: 0;
  font-family: 'Cairo', 'IBM Plex Sans Arabic', sans-serif;
  color: #5d738c;
  background:
    radial-gradient(ellipse 50% 70% at 100% 0%, rgb(91 167 214 / .10), transparent 60%),
    linear-gradient(180deg, #f4f8fc 0%, #eef4fa 100%);
  border-top: 1px solid rgb(30 80 150 / .08);
}

.nx-foot::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #f5a322 0%, #2f6ec0 45%, #163a7a 100%);
}

.nx-foot-deco {
  position: absolute;
  left: -30px;
  bottom: 40px;
  width: 360px;
  height: 260px;
  pointer-events: none;
}

/* بدون z-index عشان mix-blend-mode حق الشعار يمزج مع خلفية الفوتر */
.nx-foot-inner {
  position: relative;
  width: min(1180px, calc(100% - 2.4rem));
  max-width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .75fr) minmax(0, .85fr) minmax(0, 1.6fr);
  gap: 2.4rem;
  padding: 3.4rem 0 2.8rem;
}
.nx-foot-brand,
.nx-foot-col,
.nx-foot-partners { min-width: 0; }

.nx-foot h2 {
  position: relative;
  margin: 0 0 1.05rem;
  padding-right: 1.55rem;
  color: var(--nx-navy);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.4;
}
.nx-foot h2::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.5rem;
  width: 0.62rem;
  height: 0.42rem;
  border-radius: 2px;
  background: #f5a322;
  box-shadow: 0.42rem 0.3rem 0 #2f6ec0;
  transform: translateY(-75%) skewX(-28deg);
}

.nx-foot-logo {
  display: block;
  width: min(20rem, 100%);
  max-width: 100%;
  margin-bottom: 0.9rem;
  overflow: hidden;
}
.nx-foot-logo img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.nx-foot-brand p {
  margin: 0;
  max-width: 21rem;
  color: #5d738c;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.9;
}

.nx-foot-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.nx-foot-col a {
  position: relative;
  padding: 0.32rem 0;
  color: #4f6680;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}
.nx-foot-col a::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 0.55rem;
  border-radius: 1.5px;
  background: #c3d4e8;
  transform: skewX(-20deg);
  vertical-align: middle;
  transition: background 0.2s ease;
}
.nx-foot-col a:hover {
  color: var(--nx-navy);
  transform: translateX(-3px);
}
.nx-foot-col a:hover::before { background: #f5a322; }

.nx-foot-logos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}
.nx-foot-logo-card {
  position: relative;
  overflow: hidden;
  height: 5.6rem;
  background: #fff;
  border: 1px solid rgb(30 80 150 / .10);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgb(22 58 122 / .05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.nx-foot-logo-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgb(22 58 122 / .09);
}
/* الصور فيها هوامش بيضاء كبيرة؛ النِّسب مضبوطة على محتوى كل شعار */
.nx-foot-logo-card img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: auto;
  height: auto;
  max-width: 84%;
  max-height: 78%;
  transform: translate(-50%, -50%);
}
.nx-foot-logo-card--vision img {
  max-width: 88%;
  max-height: 86%;
}
/* الملف أبيض على شفاف؛ الفلتر يحوّله للكحلي عشان يبان على البطاقة البيضاء */
.nx-foot-logo-card--tvtc img {
  width: 94%;
  max-width: none;
  max-height: none;
  filter: brightness(0) saturate(100%) invert(17%) sepia(62%) saturate(2150%) hue-rotate(205deg) brightness(92%) contrast(96%);
}
.nx-foot-logo-card--nelc img {
  width: 102%;
  max-width: none;
  max-height: none;
}
.nx-foot-logo-card--afaq img {
  width: 104%;
  max-width: none;
  max-height: none;
  transform: translate(-50%, -47%);
}

.nx-foot-bar {
  position: relative;
  z-index: 1;
  background: #0c2d5e;
}
.nx-foot-bar-inner {
  width: min(1180px, calc(100% - 2.4rem));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
  padding: 0.95rem 0;
  color: rgb(255 255 255 / .92);
  font-size: 0.8rem;
  font-weight: 600;
}
.nx-foot-meta { color: rgb(255 255 255 / .72); }

@media (max-width: 1000px) {
  .nx-foot-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.2rem 2rem;
  }
}

@media (max-width: 640px) {
  .nx-foot-deco { display: none; }
  .nx-foot-inner {
    width: calc(100% - 1.6rem);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.85rem 1.15rem;
    padding: 2.15rem 0 1.9rem;
  }
  .nx-foot-brand,
  .nx-foot-partners,
  .nx-foot-col { min-width: 0; }
  .nx-foot-brand,
  .nx-foot-partners { grid-column: 1 / -1; }
  .nx-foot-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .nx-foot-logo {
    width: min(15rem, 88%);
    margin-inline: auto;
    margin-bottom: 1.05rem;
  }
  .nx-foot-brand p {
    font-size: 0.86rem;
    line-height: 1.85;
    max-width: 22rem;
  }
  .nx-foot h2 {
    margin-bottom: 0.75rem;
    padding-right: 1.3rem;
    font-size: 0.92rem;
  }
  .nx-foot-col a { font-size: 0.84rem; padding: 0.4rem 0; }
  .nx-foot-logos { gap: 0.7rem; }
  .nx-foot-logo-card { height: 6.2rem; }
  .nx-foot-logo-card img {
    inset: auto;
    top: 50%;
    left: 50%;
    width: auto;
    height: auto;
    max-width: 92%;
    max-height: 88%;
    object-fit: contain;
    transform: translate(-50%, -50%);
  }
  .nx-foot-logo-card--vision img {
    width: auto;
    height: auto;
    max-width: 92%;
    max-height: 82%;
  }
  .nx-foot-logo-card--nelc img {
    width: 108%;
    max-width: none;
    max-height: none;
  }
  .nx-foot-logo-card--afaq img {
    width: 108%;
    max-width: none;
    max-height: none;
    transform: translate(-50%, -50%);
  }
  .nx-foot-logo-card--tvtc img {
    width: 92%;
    max-width: 92%;
    height: auto;
    max-height: none;
  }
  .nx-foot-bar-inner {
    width: calc(100% - 1.6rem);
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.45rem;
    padding: 1.05rem 0;
    font-size: 0.76rem;
    line-height: 1.65;
  }
  .nx-foot-bar-inner span {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nx-foot-col a,
  .nx-foot-logo-card { transition: none; }
}
