/* آفاق العالمية — هيدر + هيرو مطابقان للصورة المرجعية */

:root {
  --af-ivory: #F6F8FC;
  --af-blue: #0a1852;
  --af-blue-deep: #050c29;
  --af-ink: #0a1852;
  --af-muted: #4a6288;
  --af-line: #EEF1F5;
  --af-yellow: #E2BE48;
  --header-height: 5.15rem;
}

body.rf-home {
  background: var(--af-ivory);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: #fff;
  border-bottom: none;
  box-shadow: none;
}

.rf-home .site-header,
.rf-home.rf-home .site-header {
  position: sticky;
  inset-inline: 0;
  background: #fff;
  border-bottom: none;
  box-shadow: none;
}

.header-inner {
  max-width: 1240px;
  padding-inline: 1.75rem;
  gap: 1.5rem;
}

.logo,
.logo-link--academy {
  flex-shrink: 0;
}

.site-header .logo {
  transform: translateX(22px);
}

.site-header .logo-img,
.site-header .logo-img.logo-img--afaq {
  height: 3.6rem;
  max-height: 3.6rem;
  width: auto;
  filter: none;
  transform: scale(1.55);
  transform-origin: 100% 50%;
}

.nav-main {
  flex: 1;
  justify-content: flex-start;
  gap: 0.35rem;
}

.nav-link {
  padding: 0.45rem 0.85rem;
  border-radius: 0;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--af-ink);
  background: transparent;
}

.nav-link:hover {
  background: transparent;
  color: var(--af-blue-deep);
}

.nav-link.is-active,
.nav-link.active {
  color: var(--af-ink);
  background: transparent;
  font-weight: 600;
}

.nav-link.is-active::after,
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0.12rem;
  inset-inline: 1.05rem;
  height: 2px;
  width: 1.35rem;
  margin-inline: auto;
  left: 0;
  right: 0;
  border-radius: 99px;
  background: var(--af-ink);
}

.rf-home .nav-link,
.rf-home .nav-link:hover,
.rf-home .nav-link.active,
.rf-home .nav-link.is-active {
  color: var(--af-ink);
  background: transparent;
}

.rf-home .nav-link:hover,
.rf-home .nav-link.is-active,
.rf-home .nav-link.active {
  color: var(--af-blue-deep);
}

.rf-home .logo,
.rf-home .logo-sub {
  color: var(--af-ink);
}

.header-actions {
  margin-inline-end: 0;
  gap: 0.55rem;
}

.hdr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.45rem;
  padding: 0.42rem 1.15rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.hdr-btn--solid {
  background: var(--af-blue);
  color: #fff;
  border: 1px solid var(--af-blue);
}

.hdr-btn--solid:hover {
  background: var(--af-blue-deep);
  color: #fff;
}

.hdr-btn--outline {
  background: #fff;
  color: var(--af-blue);
  border: 1.5px solid var(--af-blue);
}

.hdr-btn--outline:hover {
  background: #f4f6f9;
  color: var(--af-blue-deep);
}

.rf-home .header-actions .hdr-btn--solid {
  background: var(--af-blue);
  color: #fff;
  border-color: var(--af-blue);
}

.rf-home .header-actions .hdr-btn--outline {
  background: #fff;
  color: var(--af-blue);
  border-color: var(--af-blue);
}

.rf-home .icon-btn {
  color: #4a5b76;
  background: #fff;
  border-color: var(--af-line);
}

.rf-home .user-name {
  color: var(--af-ink);
}

.af-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--af-ivory);
  padding: 0;
  overflow-x: clip;
  overflow-y: visible;
}

.af-hero-wrap {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  width: 100%;
  margin-inline: auto;
  padding: clamp(1.75rem, 4.5vh, 2.6rem) 1.75rem 1.1rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  min-height: clamp(28rem, 60vh, 36rem);
}

.af-hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: start;
  width: min(38rem, 42%);
  margin-inline-end: auto;
  padding-top: 0;
  padding-bottom: 0.5rem;
  position: relative;
  z-index: 2;
}

.af-hero-art {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(-12%, -50%);
  width: min(62vw, 56rem);
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
  direction: ltr;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.af-wing-img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  object-fit: contain;
  object-position: left center;
  -webkit-user-drag: none;
  user-select: none;
  animation: afWingLaunch .95s cubic-bezier(.16,1,.3,1) both;
}

@keyframes afWingLaunch {
  0% {
    opacity: 0;
    transform: translateX(-22%);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .af-wing-img { animation: none; }
}

.af-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.95rem;
  color: #8b98ab;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.af-hero-kicker::before {
  content: '';
  width: 0.42rem;
  height: 0.42rem;
  background: var(--af-blue);
  flex-shrink: 0;
}

.af-hero-title {
  margin: 0;
  color: var(--af-blue);
  font-size: clamp(2.6rem, 5.6vw, 4.1rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.af-hero-title span {
  display: block;
}

.af-hero-em {
  font-style: normal;
  position: relative;
  display: inline-block;
}

.af-hero-em::after {
  content: '';
  position: absolute;
  inset-inline: 12% 8%;
  bottom: 0.08em;
  height: 0.14em;
  background: var(--af-yellow);
  border-radius: 99px;
}

.af-hero-lead {
  margin: 1.2rem 0 1.7rem;
  max-width: 30rem;
  color: var(--af-muted);
  font-size: 1.08rem;
  font-weight: 400;
  line-height: 1.9;
}

.af-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.35rem;
}

.af-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.65rem 1.55rem;
  border-radius: 0.85rem;
  background: var(--af-blue);
  color: #fff;
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
}

.af-btn-primary:hover {
  background: var(--af-blue-deep);
  color: #fff;
}

.af-btn-text {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--af-blue);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}

.af-btn-text:hover {
  color: var(--af-blue-deep);
}

.af-btn-text .af-arrow {
  font-size: 1.1rem;
  line-height: 1;
}

.rf-home .rf-section--after-perks {
  padding-top: clamp(3.5rem, 6.5vw, 5.25rem);
}

.af-hero-metrics {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.75rem 2.1rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.35rem 1.4rem;
  border-bottom: 1px solid #e8edf3;
  box-sizing: border-box;
}

.af-metric {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.75rem;
  text-align: start;
  min-width: 0;
}

.af-metric-copy h3 {
  margin: 0;
  color: var(--af-ink);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.4;
}

.af-metric-copy p {
  margin: 0.35rem 0 0;
  color: var(--af-muted);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.75;
}

.af-metric-num {
  color: #c5ceda;
  font-size: 2.35rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  padding-top: 0.08rem;
}

.af-metric--accent .af-metric-num {
  color: #d2b44a;
}

.af-metric-mark {
  width: 0.42rem;
  height: 0.42rem;
  background: var(--af-yellow);
  flex-shrink: 0;
  margin-top: 0.55rem;
}

@media (max-width: 1024px) {
  :root { --header-height: 4.5rem; }

  .hdr-btn {
    display: none;
  }

  .nav-burger-foot a.btn {
    display: inline-flex !important;
  }

  .site-header .logo-img,
  .site-header .logo-img.logo-img--afaq {
    height: 2.7rem;
    max-height: 2.7rem;
    transform: scale(1.4);
    transform-origin: 100% 50%;
  }

  .af-hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem 1.25rem;
  }

  .af-hero-wrap {
    min-height: clamp(24rem, 52vh, 30rem);
    padding-top: 1.5rem;
  }

  .af-hero-copy {
    padding-top: 0.25rem;
    width: min(34rem, 48%);
  }

  .af-hero-art {
    width: min(58vw, 42rem);
    top: 50%;
    left: 0;
    transform: translate(-10%, -50%);
  }

  .af-hero-title {
    font-size: clamp(2.2rem, 7vw, 3.2rem);
  }
}

@media (max-width: 768px) {
  :root { --header-height: 4.25rem; }

  .rf-home .site-header {
    position: sticky;
    background: #fff;
    backdrop-filter: none;
  }

  .hdr-btn {
    display: none;
  }

  .af-hero-wrap {
    order: 1;
    width: 100%;
    min-height: 0;
    padding: 1.75rem 1.15rem 1.25rem;
  }

  .af-hero-copy {
    width: 100%;
    flex: none;
  }

  .af-hero-art {
    order: 2;
    position: relative;
    left: 0;
    top: 0;
    transform: none;
    width: calc(100vw + 8%);
    max-width: none;
    margin-inline-start: calc(50% - 50vw - 8%);
  }

  .af-wing-img {
    width: 100%;
    object-position: left center;
  }

  .af-hero-metrics {
    order: 3;
    grid-template-columns: 1fr;
    padding-inline: 1.15rem;
  }

  .af-metric {
    justify-content: flex-start;
  }

  .af-metric-num {
    font-size: 2.1rem;
  }

  .af-metric-copy h3 {
    font-size: 1.12rem;
  }

  .af-metric-copy p {
    font-size: 0.98rem;
  }

  .af-hero-actions {
    width: 100%;
  }

  .af-btn-primary {
    width: 100%;
  }
}

.rf-home .rf-section {
  padding: clamp(3.5rem, 6.5vw, 5.25rem) 0;
}

.rf-home .rf-wrap {
  max-width: 1240px;
  padding-inline: 1.75rem;
}

.rf-home .rf-section--courses {
  background: #fff;
}

.rf-home .rf-section--path {
  background: var(--af-ivory);
}

.rf-home .rf-section--faq {
  background: #fff;
}

.rf-home .rf-head {
  max-width: 38rem;
  margin-bottom: 2.6rem;
}

.rf-home .rf-head h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.4rem);
  line-height: 1.4;
  color: var(--af-ink);
}

.rf-home .rf-head p {
  font-size: 1.05rem;
  line-height: 1.85;
}

.rf-home .rf-eyebrow {
  color: var(--af-muted);
}

.rf-home .rf-head h2 .rf-mark {
  color: var(--af-ink);
}

.rf-home .rf-head h2 .rf-mark::after {
  background: color-mix(in srgb, var(--af-yellow) 55%, transparent);
}

.rf-home .rf-courses {
  gap: 1.4rem;
}

.rf-home .rf-course {
  border: 1px solid #e4e9f1;
  box-shadow: 0 10px 28px -18px rgb(10 24 82 / .28);
}

.rf-home .rf-course-cover {
  height: 12.5rem;
}

.rf-home .rf-course-body {
  padding: 1.35rem 1.35rem 1.25rem;
}

.rf-home .rf-course-body h3 {
  font-size: 1.12rem;
  line-height: 1.5;
}

.rf-home .rf-course-cat {
  color: #6b7c9a;
  font-size: 0.8rem;
}

.rf-home .rf-path {
  gap: 1.25rem;
}

.rf-home .rf-path::before {
  display: none;
}

.rf-home .rf-step {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 1.25rem;
  padding: 1.55rem 1.1rem 1.45rem;
}

.rf-home .rf-step-node {
  width: 4.5rem;
  height: 4.5rem;
  margin-bottom: 1.05rem;
}

.rf-home .rf-step-node .ico {
  width: 1.7rem;
  height: 1.7rem;
  color: var(--af-blue);
}

.rf-home .rf-step-node b {
  background: var(--af-blue);
}

.rf-home .rf-step:hover .rf-step-node b {
  background: var(--af-blue-deep);
}

.rf-home .rf-step h3 {
  font-size: 1.08rem;
  color: var(--af-ink);
}

.rf-home .rf-step p {
  font-size: 0.92rem;
  line-height: 1.75;
}

.rf-home .rf-faq {
  max-width: 52rem;
  gap: 0.85rem;
}

.rf-home .rf-faq details {
  background: #fff;
  border: 1px solid #e8edf3;
  box-shadow: 0 8px 22px -16px rgb(10 24 82 / .16);
}

.rf-home .rf-faq summary {
  padding: 1.2rem 1.35rem;
  font-size: 1.02rem;
}

.rf-home .rf-faq-body {
  font-size: 0.97rem;
  padding: 0 1.35rem 1.25rem;
  line-height: 1.9;
}

.rf-home .rf-faq-ic {
  background: #eef2f8;
  color: var(--af-blue);
}

.rf-home .rf-faq details[open] .rf-faq-ic {
  background: var(--af-blue);
  color: #fff;
}

.rf-home .rf-cta {
  background: #fff;
  padding: 0 1.75rem clamp(1.5rem, 3vw, 2.25rem);
}

.rf-home .rf-cta-box {
  max-width: 1240px;
  border-radius: 1.75rem;
  background: linear-gradient(135deg, #1B356B 0%, #14265A 55%, #0E1C43 100%);
  padding: clamp(2.7rem, 4.5vw, 3.9rem) clamp(1.9rem, 3.6vw, 3.4rem);
  box-shadow: 0 26px 56px -32px rgba(10, 22, 74, 0.5);
}

.rf-home .rf-cta-text h2 {
  font-size: clamp(1.6rem, 2.7vw, 2.2rem);
  color: #fff;
  line-height: 1.45;
}

.rf-home .rf-cta-text p {
  font-size: 1.03rem;
  color: rgba(233, 240, 252, 0.82);
  line-height: 1.9;
}

.rf-home .rf-cta-actions {
  gap: 0.85rem;
}

.rf-home .rf-cta .rf-btn-light {
  background: #fff;
  color: var(--af-blue-deep);
  border: 1px solid #fff;
  border-radius: 0.85rem;
  padding: 0.82rem 1.55rem;
  font-weight: 700;
  box-shadow: 0 12px 26px -14px rgba(0, 0, 0, 0.45);
}

.rf-home .rf-cta .rf-btn-light:hover {
  background: #EAF1FF;
  color: var(--af-blue-deep);
}

.rf-home .rf-cta .rf-btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 0.85rem;
  padding: 0.82rem 1.55rem;
  font-weight: 600;
}

.rf-home .rf-cta .rf-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #fff;
  color: #fff;
}

.rf-home .rf-btn-dark {
  background: var(--af-blue);
  color: #fff;
  border-color: var(--af-blue);
}

.rf-home .rf-btn-dark:hover {
  background: var(--af-blue-deep);
  color: #fff;
}

@media (max-width: 768px) {
  .rf-home .rf-wrap,
  .rf-home .rf-cta {
    padding-inline: 1.15rem;
  }

  .rf-home .rf-section {
    padding: 2.65rem 0;
  }

  .rf-home .rf-head {
    margin-bottom: 1.8rem;
  }

  .rf-home .rf-course-cover {
    height: 11rem;
  }

  .rf-home .rf-step {
    padding: 1.35rem 1rem;
  }
}

/* ── تذييل آفاق: محصور في المنتصف، غير مقصوص، متناسق ── */
.footer {
  overflow-x: hidden;
  padding-inline: clamp(1rem, 4vw, 2rem);
  margin-top: 0;
}

.footer .footer-partners,
.footer .footer-nav,
.footer .footer-bottom {
  max-width: 1240px;
  margin-inline: auto;
  width: 100%;
}

.footer .footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem 0.9rem;
}

.footer a:hover {
  color: #8FC3F2;
}
