:root {
  --green-900: #12301f;
  --green-800: #1b4430;
  --green-700: #245a3e;
  --green-500: #3d8a5f;
  --sand-100: #f7f3ea;
  --sand-200: #efe6d3;
  --gold: #c8962e;
  --sea: #1f6f8b;
  --text: #1f2a24;
  --muted: #5c6b62;
  --white: #fff;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(18, 48, 31, .08);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: "Tajawal", system-ui, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.8;
  font-size: 17px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--green-900); }
h3 { font-size: 1.15rem; color: var(--green-800); }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 16px; }

.eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: .9rem;
  color: var(--gold);
  margin-bottom: .4em;
}

.btn {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  font-weight: 700;
  padding: .75em 1.6em;
  border-radius: 999px;
  border: 2px solid var(--gold);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: transform .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); background: #b5841f; }
.btn--ghost { background: transparent; border-color: var(--white); }
.btn--ghost:hover { background: rgba(255,255,255,.15); }
.btn--sm { padding: .35em 1.2em; font-size: .95rem; }

/* الشريط العلوي */
.topbar { background: var(--green-900); color: #cfe0d5; font-size: .85rem; }
.topbar__inner { display: flex; justify-content: space-between; gap: 1rem; padding-block: .45rem; flex-wrap: wrap; }
.topbar__contact, .topbar__links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.topbar a:hover { color: var(--white); }
.topbar .lang { color: var(--gold); font-weight: 700; }

/* الترويسة */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--sand-200);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; padding-block: .7rem; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .75rem; }
.brand strong { display: block; color: var(--green-900); font-size: 1.1rem; }
.brand small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.nav { display: flex; align-items: center; gap: 1.4rem; font-weight: 500; }
.nav a { white-space: nowrap; }
.nav a:not(.btn) { position: relative; padding-block: .3em; }
.nav a:not(.btn)::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px;
  background: var(--gold); transform: scaleX(0); transition: transform .25s;
}
.nav a:not(.btn):hover::after, .nav a.active::after { transform: scaleX(1); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.7rem; color: var(--green-900); cursor: pointer; }

/* الواجهة */
.hero { position: relative; min-height: min(82vh, 680px); display: flex; align-items: center; color: var(--white); overflow: hidden; background: var(--green-900); }
.hero__slides, .hero__slide { position: absolute; inset: 0; }
.hero__slide { background-size: cover; background-position: center; opacity: 0; transition: opacity 1.2s; transform: scale(1.05); }
.hero__slide.is-active { opacity: 1; animation: zoom 8s linear forwards; }
@keyframes zoom { to { transform: scale(1); } }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to left, rgba(18,48,31,.92) 0%, rgba(18,48,31,.6) 55%, rgba(18,48,31,.25) 100%);
}
.hero__content { position: relative; z-index: 2; padding-block: 4rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; color: var(--white); }
.hero p { max-width: 560px; font-size: 1.1rem; color: #e3ece6; }
.hero__actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero__dots { position: absolute; z-index: 2; bottom: 1.5rem; inset-inline: 0; display: flex; justify-content: center; gap: .5rem; }
.hero__dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,.45); cursor: pointer; padding: 0; transition: width .3s; }
.hero__dots button.is-active { background: var(--gold); width: 28px; border-radius: 6px; }

/* أرقام */
.stats { background: var(--green-800); color: var(--white); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; padding-block: 1.8rem; }
.stat b { display: block; font-size: 2.2rem; font-weight: 800; color: var(--gold); line-height: 1.2; }
.stat span { color: #cfe0d5; font-size: .95rem; }

/* أقسام عامة */
.section { padding-block: 5rem; }
.section--tint { background: var(--sand-100); }
.section__head { text-align: center; max-width: 680px; margin: 0 auto 2.5rem; }
.section__head p { color: var(--muted); }
.section__head--row { display: flex; justify-content: space-between; align-items: end; text-align: start; max-width: none; }
.link-more { color: var(--green-700); font-weight: 700; }

.cards { display: grid; gap: 1.4rem; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(18,48,31,.13); }
.card p { color: var(--muted); margin: 0; font-size: .97rem; }

/* عن المركز */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: start; }
.about__text > p { color: var(--muted); }
.mission { background: var(--sand-100); border-inline-start: 4px solid var(--gold); padding: 1.2rem 1.4rem; border-radius: 8px; margin-top: 1.5rem; }
.mission p { margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; inset-inline-start: 34px; top: 8px; bottom: 8px; width: 2px; background: var(--sand-200); }
.timeline li { display: flex; gap: 1rem; align-items: center; padding-block: .7rem; position: relative; }
.timeline b {
  flex: 0 0 70px; text-align: center; background: var(--green-700); color: var(--white);
  border-radius: 999px; padding: .2em 0; font-size: .95rem; position: relative; z-index: 1;
}
.timeline span { color: var(--text); }
.goals__title { margin-top: 3.5rem; font-size: 1.4rem; }
.goals { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem 2rem; counter-reset: g; }
.goals li { counter-increment: g; display: flex; gap: .9rem; color: var(--muted); }
.goals li::before {
  content: counter(g); flex: 0 0 32px; height: 32px; border-radius: 50%;
  background: var(--sand-200); color: var(--green-800); font-weight: 800;
  display: grid; place-items: center;
}

/* الأقسام */
.dept__icon { font-size: 2rem; width: 60px; height: 60px; display: grid; place-items: center; background: var(--sand-100); border-radius: 50%; margin-bottom: 1rem; }
.stations { margin-top: 3rem; text-align: center; }
.stations__list { display: flex; justify-content: center; gap: .8rem; flex-wrap: wrap; }
.stations__list span { background: var(--green-800); color: var(--white); padding: .5em 1.3em; border-radius: 999px; font-weight: 500; }

/* المناطق المحمية */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-bottom: 2rem; }
.filter { font: inherit; padding: .4em 1.3em; border-radius: 999px; border: 1.5px solid var(--sand-200); background: var(--white); cursor: pointer; color: var(--text); }
.filter.is-active { background: var(--green-800); color: var(--white); border-color: var(--green-800); }
.area { border-top: 4px solid var(--green-500); }
.area[data-type="marine"], .area--sea { border-top-color: var(--sea); }
.cards--2x { grid-template-columns: repeat(2, 1fr); }
.muted { color: var(--muted); }
.area.is-hidden { display: none; }
.tag { display: inline-block; font-size: .8rem; font-weight: 700; color: var(--green-700); background: #e6f1ea; padding: .15em .8em; border-radius: 999px; margin-bottom: .7rem; }
.tag--sea { color: var(--sea); background: #e2f0f5; }

/* الأخبار */
.news { padding: 0; overflow: hidden; }
.news__img { aspect-ratio: 16/10; background: var(--sand-200) center/cover; }
.news__body { padding: 1.3rem 1.5rem 1.6rem; }
.news time { color: var(--gold); font-size: .85rem; font-weight: 700; }
.service { border-inline-start: 4px solid var(--gold); }
img.news__img { width: 100%; object-fit: cover; }

/* شريط صور مختصر */
.strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: .8rem; }
.strip a { border-radius: 10px; overflow: hidden; }
.strip img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .4s; }
.strip a:hover img { transform: scale(1.06); }

/* صور داخل المحتوى */
.figure { margin: 1.8rem 0; }
.figure img { width: 100%; border-radius: var(--radius); margin: 0; }
.figure figcaption { color: var(--muted); font-size: .88rem; text-align: center; margin-top: .5rem; }
.figure-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.figure-row img { aspect-ratio: 4/3; object-fit: cover; }
.figure-row--full { align-items: start; }
.figure-row--full img { aspect-ratio: auto; }

/* معرض الصور */
.gallery-grid { columns: 3 260px; column-gap: 1rem; }
.gallery-item {
  display: block; width: 100%; break-inside: avoid; margin: 0 0 1rem; padding: 0; border: 0;
  position: relative; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: var(--sand-200);
}
.gallery-item img { width: 100%; display: block; transition: transform .5s; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item span {
  position: absolute; inset-inline: 0; bottom: 0; padding: 2rem .9rem .7rem; text-align: start;
  color: var(--white); font: inherit; font-size: .9rem; background: linear-gradient(transparent, rgba(0,0,0,.7));
}
.gallery-item.is-hidden { display: none; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 94vh; overflow: visible; }
.lightbox::backdrop { background: rgba(6, 20, 12, .9); }
.lightbox img { max-width: 100%; max-height: 82vh; margin: 0 auto; border-radius: 8px; }
.lightbox p { color: var(--white); text-align: center; margin: .8rem 0 0; }
.lightbox button {
  position: fixed; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.15); color: var(--white); font-size: 1.6rem; cursor: pointer;
}
.lightbox button:hover { background: var(--gold); }
.lightbox .lb-prev { right: 16px; }
.lightbox .lb-next { left: 16px; }
.lightbox .lb-close { top: 32px; left: 16px; transform: none; }

/* روابط */
.partners { background: var(--sand-200); }
.partners__inner { display: flex; gap: .6rem 1.8rem; flex-wrap: wrap; align-items: center; padding-block: 1.2rem; font-size: .95rem; }
.partners span { font-weight: 700; color: var(--green-900); }
.partners a { color: var(--green-700); }
.partners a:hover { text-decoration: underline; }

/* تواصل */
.contact { background: var(--green-900); color: var(--white); }
.contact h2 { color: var(--white); }
.contact__grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 3rem; }
.contact__list { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.contact__list li { display: flex; gap: 1rem; padding-block: .7rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.contact__list b { min-width: 70px; color: var(--gold); }
.form { display: grid; gap: 1rem; background: rgba(255,255,255,.05); padding: 1.8rem; border-radius: var(--radius); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form label { display: grid; gap: .3rem; font-size: .92rem; color: #cfe0d5; }
.form input, .form textarea {
  font: inherit; color: var(--text); padding: .65em .9em; border-radius: 8px;
  border: 1.5px solid transparent; background: var(--white);
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--gold); }
.form .btn { justify-self: start; }
.form__note { margin: 0; font-size: .92rem; color: var(--gold); min-height: 1.4em; }

.footer { background: #0c2116; color: #9fb5a8; font-size: .92rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; padding-block: 3.5rem 2rem; }
.footer__brand img { width: 72px; height: 72px; object-fit: contain; margin-bottom: .8rem; background: var(--white); border-radius: 50%; padding: 6px; }
.footer h4 { color: var(--white); font-size: 1rem; margin: 0 0 .8rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.footer__social { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: .8rem; }
.footer__social a { color: var(--gold); }
.footer__inner { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1.2rem; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.08); }
.footer p { margin: 0; }
.footer a:hover { color: var(--white); }

/* قائمة الأقسام المنسدلة */
.nav__item { position: relative; }
.subnav {
  position: absolute; top: 100%; inset-inline-start: -1rem; min-width: 250px;
  background: var(--white); border-radius: 10px; box-shadow: 0 12px 32px rgba(18,48,31,.15);
  padding: .5rem; display: none; z-index: 60;
}
.subnav a { display: block; padding: .5em .9em !important; border-radius: 6px; }
.subnav a::after { display: none; }
.subnav a:hover { background: var(--sand-100); color: var(--green-700); }
.nav__item:hover .subnav, .nav__item:focus-within .subnav { display: block; }

/* ترويسة الصفحات الداخلية */
.page-hero {
  position: relative; color: var(--white); padding-block: 4.5rem 3.5rem;
  background: var(--green-900) var(--bg, none) center/cover;
}
.page-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to left, rgba(18,48,31,.94), rgba(18,48,31,.65)); }
.page-hero .container { position: relative; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); color: var(--white); margin-bottom: .3em; }
.page-hero p { color: #dce8e0; max-width: 640px; margin: 0; font-size: 1.08rem; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .9rem; color: #b8cdbf; margin-bottom: 1rem; }
.breadcrumb a { color: var(--gold); }
.breadcrumb span::before { content: "‹"; margin-inline-end: .4rem; }

/* تخطيط بمحتوى وشريط جانبي */
.layout { display: grid; grid-template-columns: 1fr 300px; gap: 3rem; align-items: start; }
.prose h2 { font-size: 1.5rem; margin-top: 2.2rem; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: #3c4a42; }
.prose ul, .prose ol { padding-inline-start: 1.3rem; }
.prose li { margin-bottom: .45rem; }
.prose li::marker { color: var(--gold); }
.prose img { border-radius: var(--radius); margin-block: 1.5rem; }
.quote {
  font-size: 1.2rem; font-weight: 700; color: var(--green-800); background: var(--sand-100);
  border-inline-start: 4px solid var(--gold); padding: 1.1rem 1.4rem; border-radius: 8px; margin: 0 0 1rem;
}
.quote small { display: block; font-size: .85rem; color: var(--gold); margin-bottom: .2rem; }
.vm { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.vm .quote { margin: 0; font-size: 1.05rem; }
.pills { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0 !important; list-style: none; }
.pills li { background: #e6f1ea; color: var(--green-800); padding: .3em 1em; border-radius: 999px; font-size: .92rem; margin: 0; }
.notice { background: #fff8e8; border: 1px dashed var(--gold); color: #7a5a14; padding: .8rem 1rem; border-radius: 8px; font-size: .9rem; }

.sidebar { position: sticky; top: 100px; display: grid; gap: 1.2rem; }
.side-box { background: var(--sand-100); border-radius: var(--radius); padding: 1.3rem; }
.side-box h3 { font-size: 1rem; margin-bottom: .7rem; }
.side-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.side-box li a { display: block; padding: .45em .8em; border-radius: 6px; color: var(--text); }
.side-box li a:hover, .side-box li a.current { background: var(--white); color: var(--green-700); font-weight: 700; }
.side-box--dark { background: var(--green-800); color: #dce8e0; }
.side-box--dark h3 { color: var(--white); }
.side-box--dark a { color: var(--gold); }

/* عن المركز */
.htimeline { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; position: relative; }
.htimeline::before { content: ""; position: absolute; top: 22px; inset-inline: 10%; height: 2px; background: var(--sand-200); }
.htimeline li { text-align: center; position: relative; }
.htimeline b { display: inline-block; background: var(--green-700); color: var(--white); padding: .35em 1.1em; border-radius: 999px; position: relative; }
.htimeline span { display: block; margin-top: .7rem; color: var(--muted); font-size: .95rem; }
.person { display: flex; gap: 1.2rem; align-items: center; }
.person__avatar { flex: 0 0 76px; height: 76px; border-radius: 50%; background: var(--green-700); color: var(--white); display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; }
.person p { margin: 0; }

/* بطاقات قابلة للنقر */
.card--link { display: flex; flex-direction: column; }
.card--link .more { margin-top: auto; padding-top: 1rem; color: var(--green-700); font-weight: 700; font-size: .95rem; }

/* المناطق المحمية - تفاصيل */
.facts { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin: 1rem 0 0; font-size: .92rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; color: var(--green-900); }

/* الأخبار */
.featured { display: grid; grid-template-columns: 1.2fr 1fr; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 2.5rem; }
.featured__img { min-height: 320px; background: var(--sand-200) center/cover; }
.featured__body { padding: 2rem; display: flex; flex-direction: column; justify-content: center; }
.featured__body h2 { font-size: 1.6rem; }
.featured__body p { color: var(--muted); }
.cat { display: inline-block; font-size: .78rem; font-weight: 700; background: #e6f1ea; color: var(--green-700); padding: .1em .8em; border-radius: 999px; margin-inline-start: .5rem; }
.archive { list-style: none; padding: 0; margin: 0; }
.archive li { display: flex; justify-content: space-between; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--sand-200); }
.archive a:hover { color: var(--green-700); }
.archive time { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.article-meta { display: flex; flex-wrap: wrap; gap: 1.2rem; color: #b8cdbf; font-size: .92rem; margin-top: .6rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .8rem; margin-block: 1.5rem; }
.gallery img { margin: 0; aspect-ratio: 4/3; object-fit: cover; width: 100%; background: var(--sand-200); }
.share { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--sand-200); }
.share a { background: var(--sand-100); padding: .3em 1em; border-radius: 999px; font-size: .9rem; }
.post-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; }
.post-nav a { color: var(--green-700); font-weight: 700; max-width: 48%; }

/* صفحة الأخبار: الخبر الرئيسي والبطاقات والأرشيف */
.nx-lead { border-radius: 20px; overflow: hidden; margin-bottom: 2.5rem; box-shadow: 0 20px 50px rgba(18,48,31,.18); }
.nx-lead__link { display: block; position: relative; min-height: clamp(360px, 44vw, 480px); color: var(--white); }
.nx-lead__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.nx-lead__link::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,28,18,.94) 0%, rgba(10,28,18,.55) 50%, rgba(10,28,18,.05) 100%); }
.nx-lead__link:hover .nx-lead__img { transform: scale(1.05); }
.nx-lead__body { position: absolute; z-index: 1; inset-inline: 0; bottom: 0; padding: clamp(1.4rem, 4vw, 2.8rem); max-width: 780px; }
.nx-lead h2 { color: var(--white); font-size: clamp(1.45rem, 3.2vw, 2.4rem); font-weight: 800; margin-bottom: .4em; }
.nx-lead p { color: rgba(255,255,255,.86); margin-bottom: 1.2rem; }
.nx-meta { display: flex; align-items: center; gap: .8rem; margin-bottom: .9rem; font-size: .9rem; }
.nx-meta time { color: rgba(255,255,255,.85); }
.nx-chip { display: inline-block; font-size: .75rem; font-weight: 700; padding: .25em .9em; border-radius: 999px; background: #e6f1ea; color: var(--green-700); }
.nx-chip--gold { background: var(--gold); color: var(--white); }
.nx-more { display: inline-flex; align-items: center; gap: .4em; font-weight: 700; font-size: .95rem; color: var(--green-700); transition: gap .25s; }
a:hover .nx-more { gap: .8em; }
.nx-lead .nx-more { color: var(--white); background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); padding: .45em 1.3em; border-radius: 999px; backdrop-filter: blur(6px); }

.nx-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.nx-card { display: flex; flex-direction: column; background: var(--white); border-radius: 16px; overflow: hidden; border: 1px solid rgba(18,48,31,.08); transition: transform .3s, box-shadow .3s, border-color .3s; }
.nx-card:hover, .nx-card.is-visible:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(18,48,31,.14); border-color: transparent; }
.nx-card__media { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--sand-200); }
.nx-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.nx-card:hover .nx-card__media img { transform: scale(1.07); }
.nx-date { position: absolute; top: .8rem; inset-inline-start: .8rem; background: rgba(255,255,255,.95); color: var(--green-900); border-radius: 12px; padding: .4em .75em; text-align: center; line-height: 1.2; font-size: .72rem; font-weight: 700; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.nx-date b { display: block; font-size: 1.35rem; font-weight: 800; color: var(--gold); }
.nx-card__body { display: flex; flex-direction: column; flex: 1; padding: 1.2rem 1.3rem 1.4rem; }
.nx-card__body .nx-chip { align-self: flex-start; }
.nx-card h3 { font-size: 1.08rem; line-height: 1.55; color: var(--green-900); margin: .7rem 0 .45rem; }
.nx-card p { color: var(--muted); font-size: .93rem; margin: 0 0 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nx-card .nx-more { margin-top: auto; }

.nx-year { display: grid; grid-template-columns: 140px 1fr; gap: 2rem; align-items: start; }
.nx-year__label { position: sticky; top: 110px; margin: 0; font-size: 3rem; font-weight: 800; line-height: 1; color: var(--gold); }
.nx-list { list-style: none; margin: 0; padding: 0; border-inline-start: 2px solid var(--sand-200); }
.nx-list a { position: relative; display: grid; grid-template-columns: 100px 1fr auto; gap: 1rem; align-items: center; padding: 1rem 1.3rem; margin-inline-start: 1.2rem; border-radius: 12px; transition: background .25s; }
.nx-list a::before { content: ""; position: absolute; top: 50%; inset-inline-start: calc(-1.2rem - 7px); width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 3px solid var(--green-500); transform: translateY(-50%); transition: background .25s, border-color .25s; }
.nx-list a:hover { background: var(--sand-100); }
.nx-list a:hover::before { background: var(--gold); border-color: var(--gold); }
.nx-list time { color: var(--muted); font-size: .88rem; }
.nx-list span { font-weight: 500; }
.nx-list i { font-style: normal; color: var(--gold); opacity: 0; transform: translateX(6px); transition: opacity .25s, transform .25s; }
.nx-list a:hover i { opacity: 1; transform: none; }

/* ظهور تدريجي */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* الشاشات المتوسطة والصغيرة */
@media (max-width: 1000px) {
  .cards--4 { grid-template-columns: repeat(2, 1fr); }
  .cards--3 { grid-template-columns: repeat(2, 1fr); }
  .about, .contact__grid, .layout, .featured { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .htimeline { grid-template-columns: 1fr; text-align: start; }
  .htimeline::before { display: none; }
  .htimeline li { display: flex; gap: 1rem; align-items: center; text-align: start; }
  .htimeline span { margin: 0; }
  .featured__img { min-height: 220px; }
}
@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; inset-inline: 0; background: var(--white);
    flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 16px 1rem;
    box-shadow: var(--shadow); display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: .7em 0; border-bottom: 1px solid var(--sand-100); }
  .nav .btn { margin-top: .8rem; text-align: center; }
  .subnav { position: static; display: block; box-shadow: none; padding: 0 1rem 0 0; min-width: 0; }
  .subnav a { border-bottom: 0 !important; font-size: .95rem; color: var(--muted); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .topbar__contact { display: none; }
  .brand small { display: none; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
  .cards--3, .cards--4, .goals, .form__row, .vm, .footer__grid { grid-template-columns: 1fr; }
  .archive li { flex-direction: column; gap: .2rem; }
  .strip { grid-template-columns: repeat(3, 1fr); }
  .figure-row { grid-template-columns: 1fr; }
  .lightbox button { width: 40px; height: 40px; top: auto; bottom: 16px; transform: none; }
  .lightbox .lb-close { top: 16px; bottom: auto; }
  .post-nav { flex-direction: column; }
  .post-nav a { max-width: none; }
  .section { padding-block: 3.5rem; }
  .section__head--row { flex-direction: column; align-items: start; }
  .nx-grid { grid-template-columns: 1fr; }
  .nx-lead__link { min-height: 440px; }
  .nx-year { grid-template-columns: 1fr; gap: 1rem; }
  .nx-year__label { position: static; font-size: 2.2rem; }
  .nx-list a { grid-template-columns: 1fr; gap: .15rem; padding: .8rem 1rem; }
  .nx-list i { display: none; }
}
@media (min-width: 641px) and (max-width: 1100px) {
  .nx-grid { grid-template-columns: repeat(2, 1fr); }
}
