/* هيرو آفاق — طبقة مصقولة أقرب للتصميم المرجعي */

body.rf-home {
  background: #f5f8fc;
  font-family: 'Cairo', 'IBM Plex Sans Arabic', sans-serif;
}

.nx-hero {
  --nx-navy: #163A7A;
  --nx-navy-deep: #102C5E;
  --nx-gold: #E2B33A;
  --nx-ink: #163A7A;
  position: relative;
  overflow: clip;
  background:
    radial-gradient(ellipse 52% 64% at 18% 40%, rgba(186, 216, 238, 0.38), transparent 68%),
    linear-gradient(180deg, #f7fbfe 0%, #f3f8fc 48%, #f7fbfe 100%);
  padding: 0.2rem 0 2rem;
}

.nx-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.nx-watermark {
  display: none;
}

.nx-shard {
  position: absolute;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(255,255,255,.82), rgba(186, 214, 240, .32) 48%, rgba(255,255,255,.12));
  transform: skewX(-32deg) rotate(-7deg);
}

.nx-shard--1 {
  width: 58%;
  height: 90%;
  left: -20%;
  top: -8%;
  opacity: 0.35;
}

.nx-shard--2 {
  width: 36%;
  height: 62%;
  left: 10%;
  top: -14%;
  opacity: 0.22;
}

.nx-shard--3 {
  width: 28%;
  height: 48%;
  left: 4%;
  bottom: -6%;
  opacity: 0.18;
  transform: skewX(-30deg) rotate(-4deg);
}

.nx-hero-main {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 2.2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(22rem, 0.92fr) minmax(28rem, 1.2fr);
  align-items: center;
  gap: 0.2rem 1rem;
  min-height: 32.5rem;
  padding: 0.8rem 0 0.2rem;
}

.nx-side-quotes {
  position: absolute;
  inset-inline-end: -2.2rem;
  top: 48%;
  transform: translateY(-50%);
  z-index: 4;
  width: 10.6rem;
  padding: 0;
  border-inline-start: 0;
  animation: nxFade 0.8s ease .35s both;
}

.nx-quotes {
  position: relative;
  min-height: 4.4rem;
  margin: 0 0 0.95rem;
  padding: 0;
}

.nx-quote {
  position: absolute;
  inset-inline: 0;
  top: 0;
  margin: 0;
  color: #4f6680;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.8;
  opacity: 0;
}

.nx-quote--1 { animation: nxQuoteCycle 12s ease 0s infinite both; }
.nx-quote--2 { animation: nxQuoteCycle 12s ease 4s infinite both; }
.nx-quote--3 { animation: nxQuoteCycle 12s ease 8s infinite both; }

.nx-quote-pager {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 1.1rem;
  padding-top: 0.15rem;
}

.nx-quote-pager .nx-page-n {
  position: relative;
  opacity: 0;
  color: #8aa0b8;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.nx-quote-pager .nx-page-n--1,
.nx-quote-pager .nx-page-n--2,
.nx-quote-pager .nx-page-n--3 {
  position: absolute;
  inset-inline-start: 0;
  top: 0.15rem;
}

.nx-quote-pager .nx-page-n--1 { animation: nxQuoteCycle 12s ease 0s infinite both; }
.nx-quote-pager .nx-page-n--2 { animation: nxQuoteCycle 12s ease 4s infinite both; }
.nx-quote-pager .nx-page-n--3 { animation: nxQuoteCycle 12s ease 8s infinite both; }

.nx-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin-inline-start: 3.7rem;
}

.nx-dot {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: #c9d6e6;
}

.nx-dot--1 { animation: nxDot 12s ease 0s infinite both; }
.nx-dot--2 { animation: nxDot 12s ease 4s infinite both; }
.nx-dot--3 { animation: nxDot 12s ease 8s infinite both; }

.nx-stats-pager {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 6.6rem;
  padding-inline-start: 3.5rem;
  color: #8aa0b8;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.nx-stats-pager .nx-page-n {
  position: absolute;
  inset-inline-start: 0;
  top: 50%;
  margin-top: -0.55em;
  opacity: 0;
}

.nx-stats-pager .nx-page-n--1 { animation: nxQuoteCycle 12s ease 0s infinite both; }
.nx-stats-pager .nx-page-n--2 { animation: nxQuoteCycle 12s ease 4s infinite both; }
.nx-stats-pager .nx-page-n--3 { animation: nxQuoteCycle 12s ease 8s infinite both; }

.nx-pager-btns {
  display: inline-flex;
  gap: 0.22rem;
}

.nx-arrow {
  display: grid;
  place-items: center;
  width: 1.32rem;
  height: 1.32rem;
  border: 1px solid #c9d7e8;
  border-radius: 4px;
  color: #5d7394;
  cursor: default;
  font-size: 0.9rem;
  line-height: 1;
  background: #fff;
}

.nx-page-n {
  display: inline-flex;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
}

.nx-hero-art {
  position: relative;
  min-height: 32rem;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
  padding-inline-end: 8.4rem;
  transform: translateX(-2rem);
}

.nx-hero-mark-wrap {
  width: min(100%, 33rem);
  animation: nxMarkEnter 0.9s cubic-bezier(.22,1,.36,1) both;
}

.nx-hero-mark {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  display: block;
  object-fit: contain;
  mix-blend-mode: multiply;
  pointer-events: none;
  animation: nxMarkFloat 8s ease-in-out 1s infinite;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  -webkit-mask-image: linear-gradient(118deg, transparent 0%, transparent 6%, #000 26%);
  mask-image: linear-gradient(118deg, transparent 0%, transparent 6%, #000 26%);
}

.nx-stat strong {
  direction: ltr;
  unicode-bidi: isolate;
}

.nx-title-a,
.nx-title-b {
  display: block;
}

.nx-title-b {
  white-space: nowrap;
}

.nx-hero-copy {
  padding-block: 1.6rem 0.6rem;
  max-width: 34rem;
  margin-inline-start: 0;
  margin-inline-end: auto;
  padding-inline-start: 0.15rem;
  justify-self: start;
  position: relative;
  z-index: 3;
}

.nx-kicker {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.7rem;
  margin: 0 0 0.8rem;
  color: #8094ab;
  font-size: 0.9rem;
  font-weight: 600;
  animation: nxRise 0.7s cubic-bezier(.22,1,.36,1) .06s both;
}

.nx-kicker span {
  display: block;
  width: 2.7rem;
  height: 1px;
  background: #c5d3e4;
}

.nx-title {
  margin: 0;
  font-family: "El Messiri", "Readex Pro", "Cairo", sans-serif;
  font-size: clamp(2.85rem, 4.3vw, 3.85rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
  background: linear-gradient(105deg, #102C5E 0%, #1a4a8a 58%, #2d74c4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: nxRise 0.8s cubic-bezier(.22,1,.36,1) .14s both;
}

.nx-lead {
  margin: 0.45rem 0 0;
  max-width: none;
  color: #1d4478;
  font-family: "El Messiri", "Readex Pro", "Cairo", sans-serif;
  font-size: 1.48rem;
  font-weight: 600;
  line-height: 1.5;
  animation: nxRise 0.85s cubic-bezier(.22,1,.36,1) .24s both;
}

.nx-lead::after {
  content: "";
  display: block;
  width: 3.4rem;
  height: 2px;
  margin-top: 0.85rem;
  border-radius: 99px;
  background: linear-gradient(90deg, #f5a322, #ffd46a);
}

.nx-note {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  margin: 0.55rem 0 0;
  max-width: none;
  padding: 0;
  border: 0;
  color: #4d6582;
  font-size: 1.16rem;
  font-weight: 600;
  line-height: 1.35;
  animation: nxRise 0.9s cubic-bezier(.22,1,.36,1) .36s both;
}

.nx-note span {
  display: block;
  white-space: nowrap;
  line-height: 1.35;
}

.nx-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.25rem;
  animation: nxRise 0.9s cubic-bezier(.22,1,.36,1) .46s both;
}
.nx-hero-go {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0.15rem 1.15rem 0.15rem 0.32rem;
  border-radius: 999px;
  background: var(--nx-navy);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.25s ease;
}
.nx-hero-go:hover { color: #fff; transform: translateY(-3px); }
.nx-hero-go i {
  position: relative;
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 50%;
  background: #f5a322;
}
.nx-hero-go i::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.42rem;
  height: 0.42rem;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  transform: translate(-35%, -50%) rotate(45deg);
}
.nx-hero-ghost {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1.2rem;
  border-radius: 999px;
  border: 1px solid rgb(22 58 122 / .22);
  background: #fff;
  color: var(--nx-navy);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.nx-hero-ghost:hover {
  color: var(--nx-navy);
  border-color: var(--nx-navy);
  transform: translateY(-3px);
}

.nx-feats {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 2.2rem));
  margin: 0.45rem auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 1rem 1.2rem;
  padding: 0.85rem 0 0.2rem;
  animation: nxRise 0.9s cubic-bezier(.22,1,.36,1) .48s both;
}

.nx-feat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.28rem;
  color: var(--nx-ink);
}

.nx-feat-ic {
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  margin-bottom: 0.35rem;
  color: #163A7A;
  background: #fff;
  border: 1px solid rgb(30 80 150 / .08);
  border-radius: 8px;
  box-shadow: 0 10px 22px rgb(22 58 122 / .06);
}

.nx-feat-ic svg { width: 1.15rem; height: 1.15rem; }

.nx-feat strong {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.nx-feat small {
  max-width: 13.5rem;
  color: #7a8ea6;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.65;
}

@keyframes nxMarkEnter {
  from { opacity: 0; transform: translate3d(-18px, 0, 0); }
  to { opacity: 1; transform: none; }
}

@keyframes nxMarkFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

@keyframes nxFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes nxRise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes nxQuoteCycle {
  0%, 5% { opacity: 0; transform: translateY(10px); }
  12%, 26% { opacity: 1; transform: translateY(0); }
  34%, 100% { opacity: 0; transform: translateY(-8px); }
}

@keyframes nxDot {
  0%, 6% { background: #c9d6e6; transform: scale(1); }
  10%, 28% { background: #163A7A; transform: scale(1.2); }
  33%, 100% { background: #c9d6e6; transform: scale(1); }
}

@media (max-width: 1100px) {
  .nx-hero {
    padding: 0.4rem 0 1.6rem;
    overflow: clip;
  }
  .nx-hero-main {
    width: min(1280px, calc(100% - 1.6rem));
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.18fr);
    min-height: 0;
    gap: 0.5rem 0.7rem;
    padding: 0.85rem 0 0.25rem;
    align-items: center;
  }
  .nx-hero-copy {
    order: 0;
    margin: 0;
    max-width: none;
    padding-block: 0.4rem 0.2rem;
    padding-inline-start: 0;
    justify-self: stretch;
    text-align: start;
  }
  .nx-kicker { justify-content: flex-start; }
  .nx-lead,
  .nx-note {
    margin-inline: 0;
    max-width: 28rem;
  }
  .nx-hero-art {
    order: 0;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(7.2rem, 8.8rem);
    align-items: center;
    justify-content: center;
    gap: 0.25rem 0.45rem;
    padding-inline-end: 0;
    transform: none;
    max-width: none;
    margin-inline: 0;
    width: 100%;
  }
  .nx-hero-mark-wrap {
    order: 0;
    width: min(100%, 22rem);
    justify-self: center;
  }
  .nx-side-quotes {
    position: relative;
    inset: auto;
    top: auto;
    transform: none;
    width: auto;
    max-width: none;
    padding: 0;
    border-inline-start: 0;
    animation: nxFade 0.8s ease .2s both;
    order: 1;
    text-align: start;
  }
  .nx-quotes { min-height: 3.8rem; margin-bottom: 0.7rem; }
  .nx-quote { font-size: 0.95rem; line-height: 1.7; }
  .nx-feats {
    width: min(1280px, calc(100% - 1.6rem));
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.15rem 0.85rem;
    margin-top: 0.7rem;
  }
}

@media (max-width: 640px) {
  .nx-hero {
    display: block;
    min-height: 0;
    padding: 0.85rem 0 1.7rem;
    overflow: clip;
  }
  .nx-hero-actions {
    justify-content: center;
    margin-top: 0.95rem;
  }
  .nx-hero-main {
    width: calc(100% - 1.7rem);
    grid-template-columns: 1fr;
    justify-items: center;
    align-items: stretch;
    padding: 0.2rem 0 0;
    gap: 0.75rem;
  }
  .nx-hero-copy {
    order: 1;
    width: 100%;
    max-width: 22.5rem;
    margin: 0 auto;
    padding-block: 0.1rem;
    text-align: center;
    justify-self: center;
  }
  .nx-kicker { justify-content: center; }
  .nx-title {
    font-size: clamp(2.15rem, 9vw, 2.55rem);
    line-height: 1.25;
  }
  .nx-lead {
    margin-inline: auto;
    max-width: 20rem;
    font-size: 1.12rem;
    line-height: 1.6;
    text-align: center;
  }
  .nx-lead::after {
    margin-inline: auto;
  }
  .nx-note {
    align-items: center;
    margin-top: 0.8rem;
    margin-inline: auto;
    max-width: 21rem;
    font-size: 1rem;
    line-height: 1.4;
    text-align: center;
  }
  .nx-note span {
    white-space: normal;
  }
  .nx-hero-art {
    order: 0;
    grid-template-columns: 1fr;
    justify-items: center;
    max-width: 20rem;
    width: 100%;
    gap: 0.65rem;
  }
  .nx-hero-mark-wrap {
    order: 0;
    width: min(72%, 15.5rem);
  }
  .nx-side-quotes {
    display: block;
    order: 1;
    position: relative;
    inset: auto;
    top: auto;
    transform: none;
    width: 100%;
    max-width: 14rem;
    margin: 0 auto;
    padding: 0;
    border-inline-start: 0;
    text-align: center;
  }
  .nx-side-quotes::before {
    content: none;
  }
  .nx-quotes { min-height: 2.6rem; margin-bottom: 0.4rem; }
  .nx-quote {
    font-size: 0.88rem;
    line-height: 1.65;
    text-align: center;
  }
  .nx-quote-pager { justify-content: center; }
  .nx-quote-pager .nx-page-n,
  .nx-quote-pager .nx-page-n--1,
  .nx-quote-pager .nx-page-n--2,
  .nx-quote-pager .nx-page-n--3 { display: none; }
  .nx-dots { margin-inline-start: 0; }
  .nx-feats {
    width: calc(100% - 1.4rem);
    align-self: auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin-top: 0.55rem;
    padding-top: 1.2rem;
  }
  .nx-feat {
    gap: 0.32rem;
    padding: 0 0.35rem;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .nx-feat + .nx-feat {
    border-inline-start: 1px solid #d7e3f0;
  }
  .nx-feat-ic {
    width: 1.4rem;
    height: 1.4rem;
    margin: 0 auto 0.25rem;
    display: block;
    background: none;
    border-radius: 0;
    color: #163A7A;
  }
  .nx-feat-ic svg { width: 100%; height: 100%; }
  .nx-feat strong {
    font-size: 0.7rem;
    line-height: 1.4;
  }
  .nx-feat small { display: none; }
}

@media (max-width: 380px) {
  .nx-title { font-size: 1.32rem; }
  .nx-hero-mark-wrap { width: min(78%, 14.2rem); }
  .nx-feat strong { font-size: 0.64rem; }
}

@media (prefers-reduced-motion: reduce) {
  .nx-kicker,
  .nx-title,
  .nx-lead,
  .nx-note,
  .nx-hero-actions,
  .nx-hero-go,
  .nx-hero-ghost,
  .nx-hero-mark-wrap,
  .nx-hero-mark,
  .nx-side-quotes,
  .nx-feats,
  .nx-quote,
  .nx-quote-pager .nx-page-n,
  .nx-stats-pager .nx-page-n,
  .nx-quote-bar::after,
  .nx-dot { animation: none !important; }
  .nx-quote--1,
  .nx-page-n--1 { opacity: 1 !important; }
  .nx-quote--2,
  .nx-quote--3,
  .nx-page-n--2,
  .nx-page-n--3 { display: none; }
}
