/* Nbader — home (لوحة ألوان مستوحاة من هوية جامعية: أخضر غامق + زمردي + ذهبي) */
:root {
  /* أخضر رسمي */
  --nb-green-deep: #005844;
  --nb-green-forest: #0a3d34;
  --nb-green-shadow: #032920;
  /* زمردي / أزرق-أخضر للأزرار الثانوية والأرقام */
  --nb-emerald: #268a73;
  --nb-emerald-dark: #1e6f5d;
  --nb-emerald-light: #34a38c;
  /* ذهبي معدني */
  --nb-gold: #b58d3d;
  --nb-gold-light: #d4b56a;
  --nb-gold-dark: #8f6f2e;
  /* واجهات */
  --nb-ink: #12131a;
  --nb-muted: #4a5050;
  --nb-muted-light: #6d7373;
  --nb-surface: #f7f9f8;
  --nb-surface-2: #eef2f0;
  --nb-card: #ffffff;
  --nb-radius: 14px;
  --nb-radius-sm: 10px;
  --nb-radius-lg: 22px;
  --nb-shadow: 0 1px 0 rgba(0, 56, 44, 0.05), 0 16px 48px rgba(0, 56, 44, 0.08);
  --nb-shadow-hover: 0 1px 0 rgba(0, 56, 44, 0.06), 0 24px 56px rgba(0, 56, 44, 0.12);
  --nb-nav-blur: 16px;
  --nb-line: rgba(0, 88, 68, 0.1);
  /* مسافة بيضاء واضحة بين الشريط الثابت والهيرو الأخضر */
  --nb-hero-under-nav-gap: clamp(0.75rem, 2.2vw, 1.35rem);
  --nb-hero-pad-top: calc(3.5rem + clamp(56px, 10vw, 96px) + var(--nb-hero-under-nav-gap));
  /* مسافة بين الخط الذهبي وبطاقة الشعار */
  --nb-hero-goldline-gap: clamp(0.9rem, 2.8vw, 1.75rem);
}

@media (max-width: 991px) {
  :root {
    --nb-hero-pad-top: calc(3.25rem + 72px + var(--nb-hero-under-nav-gap));
  }
}

.nb-site-header {
  position: relative;
  z-index: 1035;
  background: #fff;
}

#hero-area.nb-hero {
  background: linear-gradient(165deg, var(--nb-green-deep) 0%, var(--nb-green-forest) 42%, var(--nb-green-shadow) 100%) !important;
  background-clip: content-box;
}

.nb-main {
  overflow-x: hidden;
}

/* ——— Navbar ——— */
.nb-navbar {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid transparent;
  transition: background 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.nb-navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

.nb-navbar__brand {
  margin-top: 0;
  margin-bottom: 0;
  flex-shrink: 1;
  min-width: 0;
  gap: 0.65rem;
  margin-inline-end: clamp(1.1rem, 3.2vw, 2rem);
}

.site-logo--observatory {
  max-height: 72px;
  width: auto;
  max-width: min(220px, 40vw);
  object-fit: contain;
}

@media (min-width: 992px) {
  .site-logo--observatory {
    max-height: 82px;
    max-width: min(240px, 28vw);
  }
}

.nb-navbar__toggler {
  flex-shrink: 0;
  margin-left: auto;
}

[dir="rtl"] .nb-navbar__toggler {
  margin-left: 0;
  margin-right: auto;
}

@media (min-width: 992px) {
  .nb-navbar__toggler {
    margin-left: 0;
    margin-right: 0;
  }

  [dir="rtl"] .nb-navbar__toggler {
    margin-right: 0;
  }
}

/* LTR و RTL: تجميع القائمة + زر الدعوة مباشرة بعد الشعار (لا دفع لأقصى الجانب الآخر) */
.nb-navbar .nb-navbar__collapse {
  flex-grow: 1;
  justify-content: flex-start;
  align-items: center;
  gap: 0.45rem 0.55rem;
}

@media (min-width: 992px) {
  .nb-navbar .nb-navbar__collapse {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-start;
  }

  /* القائمة بعرض محتواها فقط — زر «بادر» / Start من هنا مباشرة بعد آخر رابط */
  .nb-navbar .nb-navbar__nav {
    flex: 0 1 auto !important;
    width: max-content !important;
    max-width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    gap: 0.4rem 0.45rem;
  }
}

/* روابط القائمة: خلفية وحدود بارزة مثل أسلوب الزر (نسخة فاتحة) */
.nb-navbar .navbar-nav .nav-link,
.nb-navbar .navbar-nav .nav-link.nb-nav-link {
  font-weight: 800;
  font-size: clamp(0.92rem, 1.05vw, 1.06rem);
  letter-spacing: 0.02em;
  padding: 0.62rem 1.2rem !important;
  border-radius: 999px;
  color: var(--nb-ink) !important;
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(180deg, #ffffff 0%, #eef4f1 100%);
  border: 2px solid rgba(0, 88, 68, 0.22);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 2px 10px rgba(0, 56, 44, 0.09),
    0 0 0 1px rgba(255, 255, 255, 0.65);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.nb-navbar .navbar-nav .nav-item.active .nav-link {
  color: var(--nb-green-deep) !important;
  background: linear-gradient(180deg, #e8f4ef 0%, #d8ebe3 100%);
  border-color: rgba(0, 88, 68, 0.4);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 3px 12px rgba(0, 88, 68, 0.14);
}

.nb-nav-link__icon {
  flex-shrink: 0;
  width: 1.35em;
  text-align: center;
  font-size: 1.2em;
  opacity: 1;
  line-height: 1;
  color: var(--nb-green-deep);
}

.nb-nav-link__label {
  line-height: 1.3;
}

.nb-navbar .navbar-nav .nav-link .fa.nb-nav-link__icon {
  margin-left: 0;
  margin-right: 0;
  vertical-align: middle;
}

.nb-navbar.navbar-expand-lg .navbar-nav .nav-link {
  line-height: 1.35 !important;
  text-transform: none;
}

.nb-navbar .navbar-nav .nav-link:hover {
  color: var(--nb-green-deep) !important;
  background: linear-gradient(180deg, #f5fbf8 0%, #e2f0ea 100%);
  border-color: rgba(0, 88, 68, 0.38);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 4px 16px rgba(0, 88, 68, 0.14);
}

.nb-navbar .navbar-nav .nav-link:focus {
  outline: none;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 2px 10px rgba(0, 56, 44, 0.09),
    0 0 0 3px rgba(0, 88, 68, 0.22);
}

.nb-header-cta {
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.65rem;
  font-weight: 800;
  font-size: clamp(0.9rem, 1.1vw, 1.05rem);
  line-height: 1.3;
  letter-spacing: 0.03em;
  text-align: center;
  white-space: nowrap;
  border-radius: 999px;
  text-decoration: none !important;
  color: #fff !important;
  -webkit-font-smoothing: antialiased;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  background: linear-gradient(160deg, #d4b86e 0%, var(--nb-gold) 35%, var(--nb-gold-dark) 72%, #7a5c24 100%);
  border: 2px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.35) inset,
    0 0 0 1px rgba(0, 40, 32, 0.2),
    0 10px 28px rgba(0, 40, 32, 0.38),
    0 4px 12px rgba(143, 111, 46, 0.35);
  transition: box-shadow 0.2s ease, filter 0.2s ease, border-color 0.2s ease;
}

.nb-header-cta:hover {
  color: #fff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  filter: brightness(1.06);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.4) inset,
    0 0 0 1px rgba(0, 40, 32, 0.25),
    0 14px 36px rgba(0, 40, 32, 0.45),
    0 6px 16px rgba(143, 111, 46, 0.42);
}

.nb-header-cta:focus {
  outline: none;
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.35) inset,
    0 0 0 1px rgba(0, 40, 32, 0.2),
    0 10px 28px rgba(0, 40, 32, 0.38),
    0 0 0 3px rgba(0, 88, 68, 0.35);
}

.nb-header-cta--toolbar {
  flex: 1 1 auto;
  min-width: 0;
  max-width: max-content;
  margin-left: auto;
  margin-right: 0.35rem;
}

[dir="rtl"] .nb-header-cta--toolbar {
  margin-left: 0.35rem;
  margin-right: auto;
}

.nb-header-cta--desktop {
  flex-shrink: 0;
  margin-left: 0;
  margin-right: 0;
}

.nb-bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 26px;
  height: 20px;
}

.nb-bars span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--nb-ink);
}

.top-nav-collapse.nb-navbar,
.nb-navbar.scrolled {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(var(--nb-nav-blur));
  -webkit-backdrop-filter: blur(var(--nb-nav-blur));
  border-bottom-color: var(--nb-line);
  box-shadow: 0 8px 32px rgba(0, 56, 44, 0.08);
}

.nb-navbar:not(.top-nav-collapse):not(.scrolled) {
  background: #fff !important;
  border-bottom-color: var(--nb-line);
  box-shadow: 0 1px 0 rgba(0, 56, 44, 0.04);
}

/* ——— Hero ——— */
.nb-hero {
  position: relative;
  color: var(--nb-ink);
  padding-bottom: clamp(3rem, 7vw, 4.5rem);
  padding-top: calc(4.75rem + clamp(68px, 11vw, 108px));
  overflow: hidden;
}

.nb-hero__accent {
  position: absolute;
  top: var(--nb-hero-pad-top);
  left: 0;
  right: 0;
  height: 3px;
  z-index: 2;
  background: linear-gradient(90deg, transparent, var(--nb-gold) 20%, var(--nb-gold-light) 50%, var(--nb-gold) 80%, transparent);
  opacity: 0.85;
  pointer-events: none;
}

.nb-hero__bg {
  position: absolute;
  top: var(--nb-hero-pad-top);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 18% 22%, rgba(38, 138, 115, 0.28), transparent 58%),
    radial-gradient(ellipse 50% 48% at 88% 78%, rgba(181, 141, 61, 0.14), transparent 52%),
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 255, 255, 0.025) 2px, rgba(255, 255, 255, 0.025) 4px);
}

.nb-hero__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, var(--nb-surface), transparent);
}

.nb-hero__inner {
  position: relative;
  z-index: 2;
}

.nb-hero--compact {
  padding-top: var(--nb-hero-pad-top) !important;
  padding-bottom: clamp(2rem, 5vw, 3rem) !important;
}

.nb-hero__row {
  min-height: 0;
}

.nb-hero__cluster--intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: var(--nb-hero-goldline-gap);
  padding-bottom: 0.5rem;
}

/* طبقة الهيرو: أبيض كامل */
.nb-hero__visual {
  margin: 0 auto;
  max-width: min(680px, 94vw);
  padding: clamp(1.25rem, 3.5vw, 2rem);
  border-radius: calc(var(--nb-radius-lg) + 6px);
  background: #fff;
  border: 1px solid var(--nb-line);
  box-shadow: 0 16px 48px rgba(0, 40, 32, 0.12);
}

@media (min-width: 992px) {
  .nb-hero__visual {
    max-width: min(720px, 88vw);
  }
}

.nb-hero__platform-mark {
  display: block;
  width: auto;
  max-width: min(280px, 82vw);
  max-height: min(120px, 22vh);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
}

@media (min-width: 992px) {
  .nb-hero__platform-mark {
    max-width: min(380px, 75vw);
    max-height: min(160px, 28vh);
  }
}

.nb-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--nb-gold) 0%, var(--nb-gold-dark) 100%);
  color: #fff !important;
  border: none;
  box-shadow: 0 8px 24px rgba(181, 141, 61, 0.38);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none !important;
}

.nb-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(181, 141, 61, 0.48);
  color: #fff !important;
}

.nb-btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.25rem;
  font-weight: 600;
  color: var(--nb-ink) !important;
  text-decoration: none !important;
  border-radius: 999px;
  border: 2px solid rgba(28, 29, 33, 0.12);
  background: rgba(255, 255, 255, 0.6);
  transition: border-color 0.2s, background 0.2s;
}

.nb-btn-ghost:hover {
  border-color: var(--nb-gold);
  background: #fff;
}

/* ——— Section shell ——— */
.nb-section {
  padding-top: clamp(3.25rem, 6vw, 4.75rem);
  padding-bottom: clamp(3.25rem, 6vw, 4.75rem);
}

.nb-section--muted {
  background: linear-gradient(180deg, var(--nb-surface) 0%, var(--nb-surface-2) 100%);
}

.nb-section--services {
  position: relative;
}

.nb-section--services::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, 86%);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--nb-line), transparent);
  pointer-events: none;
}

.nb-section__head {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto 3rem;
}

.nb-section__kicker {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--nb-gold-dark);
  margin-bottom: 0.65rem;
}

[dir="rtl"] .nb-section__kicker {
  letter-spacing: 0.12em;
}

.nb-section__title {
  font-size: clamp(1.6rem, 2.8vw, 2.125rem);
  font-weight: 800;
  color: var(--nb-ink);
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.nb-section__rule {
  display: block;
  width: 48px;
  height: 4px;
  margin: 1.25rem auto 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--nb-emerald), var(--nb-gold));
}

.nb-section__desc {
  margin-top: 0.75rem;
  color: var(--nb-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.nb-cards-row {
  --bs-gutter-x: 1.5rem;
}

/* ——— Initiative cards ——— */
.nb-card {
  position: relative;
  height: 100%;
  background: var(--nb-card);
  border-radius: var(--nb-radius-lg);
  padding: 1.85rem 1.65rem 2rem;
  box-shadow: var(--nb-shadow);
  border: 1px solid var(--nb-line);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
}

.nb-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--nb-gold-dark), var(--nb-gold-light), var(--nb-gold-dark));
  opacity: 0.9;
  pointer-events: none;
}

.nb-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--nb-shadow-hover);
  border-color: rgba(181, 141, 61, 0.22);
}

.nb-card__icon {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--nb-gold-dark);
  font-size: 1.45rem;
  margin-bottom: 1.35rem;
  border: 1px solid rgba(0, 88, 68, 0.1);
  box-shadow: 0 4px 14px rgba(0, 56, 44, 0.06);
}

.nb-card__icon .fa {
  line-height: 1;
}

.nb-card__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--nb-ink);
  margin: 0 0 0.85rem;
  line-height: 1.4;
}

.nb-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nb-card__title a:hover {
  color: var(--nb-gold-dark);
}

.nb-card__text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--nb-muted);
}

/* ——— Stats (بطاقات ملوّنة — بدون صورة خلفية) ——— */
#counter.nb-stats,
.nb-stats {
  position: relative;
  background: #fff !important;
  color: var(--nb-ink);
  overflow: hidden;
}

#counter.nb-stats {
  background-image: none !important;
}

.nb-stats__title {
  color: var(--nb-green-deep) !important;
}

.nb-stats .container {
  position: relative;
  z-index: 1;
}

.nb-stat {
  text-align: center;
  padding: 2rem 1.5rem 2.25rem;
  border-radius: var(--nb-radius);
  height: 100%;
  border: none;
  box-shadow: 0 14px 40px rgba(28, 29, 33, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  color: #fff;
}

.nb-stat:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 50px rgba(28, 29, 33, 0.18);
}

/* ذهبي — جديد / تحت الدراسة */
.nb-stat--amber {
  background: linear-gradient(145deg, var(--nb-gold-light) 0%, var(--nb-gold) 42%, var(--nb-gold-dark) 100%);
}

/* زمردي — مقبول */
.nb-stat--emerald {
  background: linear-gradient(145deg, var(--nb-emerald-light) 0%, var(--nb-emerald) 45%, var(--nb-emerald-dark) 100%);
}

/* أخضر رسمي — منجز */
.nb-stat--indigo {
  background: linear-gradient(145deg, #0d5c4a 0%, var(--nb-green-deep) 45%, var(--nb-green-shadow) 100%);
}

.nb-stat__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.25rem;
  height: 4.25rem;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  font-size: 1.85rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.nb-stat__icon .fa {
  line-height: 1;
}

.nb-stat__value {
  font-size: clamp(2rem, 4vw, 2.85rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.65rem;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.nb-stat__label {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.5;
}

/* ——— News ——— */
.nb-news-card {
  height: 100%;
  background: var(--nb-card);
  border-radius: var(--nb-radius-lg);
  overflow: hidden;
  border: 1px solid var(--nb-line);
  box-shadow: var(--nb-shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.28s ease, transform 0.28s ease;
}

.nb-news-card:hover {
  box-shadow: var(--nb-shadow-hover);
  transform: translateY(-3px);
}

.nb-news-card__body {
  padding: 1.35rem 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.nb-news-card__date {
  font-size: 0.75rem;
  color: var(--nb-gold-dark);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.nb-news-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--nb-ink);
  margin: 0 0 0.65rem;
  line-height: 1.4;
}

.nb-news-card__excerpt {
  font-size: 0.875rem;
  color: var(--nb-muted);
  line-height: 1.65;
  margin: 0;
  flex: 1;
}

/* ——— Footer polish ——— */
.site-footer {
  background: linear-gradient(180deg, var(--nb-green-deep) 0%, var(--nb-green-shadow) 100%);
  color: rgba(255, 255, 255, 0.9);
  padding: 2rem 0;
  margin-top: 0;
}

.site-footer a.nav-link {
  display: inline-block;
  padding: 0.25rem 0.5rem !important;
  color: var(--nb-gold) !important;
}

.site-footer a.nav-link:hover {
  color: #fff !important;
}

@media (max-width: 991px) {
  .nb-hero {
    padding-top: calc(4rem + 72px + var(--nb-hero-under-nav-gap));
    text-align: center;
  }

  .nb-hero--compact {
    padding-top: var(--nb-hero-pad-top) !important;
    padding-bottom: 1.75rem !important;
  }

  .nb-hero__cluster--intro {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .nb-hero__row {
    justify-content: center !important;
  }
}

@media (max-width: 767px) {
  .nb-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .nb-navbar__brand {
    max-width: calc(100% - 9.5rem);
  }

  .site-logo--observatory {
    max-height: 52px;
    max-width: min(150px, 36vw);
  }
}
