:root {
  /* Colors */
  --color-green-1: #147E49;
  /* extracted from logo */
  --color-green-2: #0f5f39;
  --color-green-3: #0a4b2c;
  --color-orange: #FE9007;
  /* extracted from logo */
  --color-gold: #d6b46d;
  --color-cream: #f7f4ee;
  --color-ink: #0b1a12;
  --color-muted: #5b6b60;
  --color-page-bg: #2d4a3e;
  --color-white: #ffffff;
  --color-active-bg: rgba(254, 144, 7, .18);
  --color-surface: #ffffff;
  --color-surface-warm: rgba(247, 244, 238, .92);
  --color-surface-warm-strong: rgba(247, 244, 238, .98);
  --color-surface-glass: rgba(255, 255, 255, .10);
  --color-border-card: rgba(20, 126, 73, .10);
  --color-border-soft: rgba(20, 126, 73, .12);
  --color-border-strong: rgba(20, 126, 73, .18);
  --color-border-white: rgba(255, 255, 255, .18);
  --color-border-white-soft: rgba(255, 255, 255, .12);
  --color-ink-strong: rgba(11, 26, 18, .86);

  /* Spacing */
  --space-2xs: 6px;
  --space-xs: 10px;
  --space-sm: 14px;
  --space-md: 18px;
  --space-lg: 22px;
  --space-xl: 28px;
  --space-2xl: 36px;
  --space-3xl: 44px;
  --space-4xl: 54px;
  --space-section: 48px;
  --space-section-lg: clamp(42px, 4.5vw, 58px);

  /* Radius */
  --radius-pill: 999px;
  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 12px;
  --radius-xs: 10px;

  /* Shadows */
  --shadow-lg: 0 16px 45px rgba(0, 0, 0, .10);
  --shadow-md: 0 12px 28px rgba(0, 0, 0, .08);
  --shadow-sm: 0 10px 22px rgba(0, 0, 0, .08);
  --shadow-card-strong: 0 24px 55px rgba(0, 0, 0, .18);
  --shadow-button: 0 4px 16px rgba(20, 126, 73, .22);
  --shadow-button-hover: 0 8px 24px rgba(20, 126, 73, .26);

  /* Component tokens */
  --header-height: 80px;
  --section-padding: var(--space-section);
  --section-padding-lg: var(--space-section-lg);
  --card-padding: var(--space-xl);
  --card-radius: var(--radius-xl);
  --card-shadow: var(--shadow-md);
  --card-border: 1px solid var(--color-border-card);
  --card-bg: var(--color-surface);
  --card-glass-bg: var(--color-surface-glass);
  --card-glass-border: 1px solid var(--color-border-white);
  --card-glass-shadow: var(--shadow-card-strong);
  --btn-padding-y: 16px;
  --btn-padding-x: 28px;
  --btn-radius: var(--radius-pill);
  --btn-border: none;
  --btn-shadow-hover: var(--shadow-button-hover);
  --btn-primary-shadow: var(--shadow-button);
  --btn-secondary-bg: rgba(255, 255, 255, .94);
  --btn-secondary-bg-hover: rgba(255, 255, 255, 1);
  --btn-secondary-shadow: 0 2px 10px rgba(0, 0, 0, .07);
  --btn-secondary-border: 1px solid rgba(20, 126, 73, .20);
  --btn-ghost-bg: transparent;
  --btn-ghost-bg-hover: rgba(20, 126, 73, .07);
  --btn-ghost-border: 1.5px solid rgba(20, 126, 73, .28);
  --btn-ghost-color: var(--green-3);
  --btn-dark-bg: var(--color-ink-strong);
  --btn-dark-border: 1px solid var(--color-border-white-soft);

  /* Legacy aliases */
  --green: var(--color-green-1);
  --green-2: var(--color-green-2);
  --green-3: var(--color-green-3);
  --orange: var(--color-orange);
  --gold: var(--color-gold);
  --active-bg: var(--color-active-bg);
  --cream: var(--color-cream);
  --ink: var(--color-ink);
  --muted: var(--color-muted);
  --shadow: var(--shadow-lg);
  --shadow-soft: var(--shadow-md);
  --shadow-white-soft: var(--shadow-sm);

  /* Typography */
  --font-latin-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-ku-sans: "Vazirmatn", "Noto Naskh Arabic", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-ar-sans: "Tajawal", "Noto Naskh Arabic", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-rtl-serif: "Amiri", "Noto Naskh Arabic", serif;
  --font-heading-active: var(--font-display);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  background-color: var(--color-page-bg);
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .3) transparent;
}

html::-webkit-scrollbar {
  width: 8px;
}

html::-webkit-scrollbar-track {
  background: transparent;
}

html::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .28);
  border-radius: 999px;
}

html::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, .5);
}

body {
  margin: 0;
  margin-top: -1px;
  padding-top: 1px;
  font-family: var(--font-latin-sans);
  background-color: var(--color-page-bg);
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: touch;
  color: var(--ink);
  line-height: 1.7;
  transition: opacity .16s ease;
}

/* Browsers don't inherit font-family on form elements — force it */
input, button, select, textarea {
  font-family: inherit;
}

html.nhc-page-leaving {
  pointer-events: none;
}

html.nhc-page-leaving body {
  opacity: .22;
}

body[dir="rtl"] {
  font-family: var(--font-ku-sans);
  --font-heading-active: var(--font-rtl-serif);
}

html[lang="ar"] body {
  font-family: var(--font-ar-sans);
  --font-heading-active: var(--font-rtl-serif);
}

html[lang="ku"] body {
  font-family: var(--font-ku-sans);
  --font-heading-active: var(--font-rtl-serif);
}

img {
  max-width: 100%;
  height: auto
}

a {
  color: inherit;
  text-decoration: none
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid rgba(20, 126, 73, .42);
  outline-offset: 2px
}

.btn,
.input,
.select,
.menu-toggle,
.sbtn {
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease
}

.btn:hover {
  box-shadow: var(--btn-shadow-hover)
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s ease, transform .7s ease
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0)
}

@keyframes floaty {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-8px)
  }
}

@keyframes shimmer {
  0% {
    background-position: 0% 50%
  }

  100% {
    background-position: 100% 50%
  }
}

@keyframes bounce-down {

  0%,
  100% {
    transform: translateX(-50%) translateY(0)
  }

  50% {
    transform: translateX(-50%) translateY(6px)
  }
}

@keyframes hero-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-fade-up-center {
  from {
    opacity: 0;
    transform: translate(-50%, 14px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes about-logo-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(-10px);
  }
}

@supports (view-transition-name: root) {
  @view-transition {
    navigation: auto;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: .22s;
    animation-timing-function: cubic-bezier(.22, 1, .36, 1);
  }

  ::view-transition-old(root) {
    animation-name: nhc-view-out;
  }

  ::view-transition-new(root) {
    animation-name: nhc-view-in;
  }
}

@keyframes nhc-view-out {
  from {
    opacity: 1
  }

  to {
    opacity: .88
  }
}

@keyframes nhc-view-in {
  from {
    opacity: .9
  }

  to {
    opacity: 1
  }
}

html.nhc-hero-intro .hero h1,
html.nhc-hero-intro .hero p,
html.nhc-hero-intro .hero .btn-row,
html.nhc-hero-intro .hero .stats,
html.nhc-hero-intro .about-hero-content>*,
html.nhc-hero-intro .news-hero-inner>*,
html.nhc-hero-intro .cp-info-card>.cp-title,
html.nhc-hero-intro .cp-info-card>.cp-subtitle,
html.nhc-hero-intro .cp-info-card>.cp-details,
html.nhc-hero-intro .cp-info-card>.cp-socials,
html.nhc-hero-intro .cp-form-inner>.cp-form-heading,
html.nhc-hero-intro .cp-form-inner>.cp-form-desc,
html.nhc-hero-intro .cp-form-inner>.cp-form,
html.nhc-hero-intro .pub-hero-slide:not(.clone) .pub-hero-badge,
html.nhc-hero-intro .pub-hero-slide:not(.clone) .pub-hero-content>*,
html.nhc-hero-intro .pub-hero-slide:not(.clone) .pub-hero-book {
  opacity: 0;
  transform: translateY(14px);
  animation: hero-fade-up .5s cubic-bezier(.22, 1, .36, 1) forwards;
  will-change: opacity, transform;
}

html.nhc-hero-intro .hero h1 {
  animation-delay: .04s
}

html.nhc-hero-intro .hero p {
  animation-delay: .12s
}

html.nhc-hero-intro .hero .btn-row {
  animation-delay: .2s
}

html.nhc-hero-intro .hero .stats {
  animation-delay: .28s
}

html.nhc-hero-intro .about-hero-content>*:nth-child(1) {
  animation-delay: .06s
}

html.nhc-hero-intro .about-hero-content>*:nth-child(2) {
  animation-delay: .14s
}

html.nhc-hero-intro .about-hero-content>.about-hero-logo {
  animation-name: about-logo-fade-up
}

html.nhc-hero-intro .news-hero-inner>*:nth-child(1) {
  animation-delay: .06s
}

html.nhc-hero-intro .news-hero-inner>*:nth-child(2) {
  animation-delay: .14s
}

html.nhc-hero-intro .news-hero-inner>*:nth-child(3) {
  animation-delay: .22s
}

html.nhc-hero-intro .cp-info-card>.cp-title {
  animation-delay: .05s
}

html.nhc-hero-intro .cp-info-card>.cp-subtitle {
  animation-delay: .12s
}

html.nhc-hero-intro .cp-info-card>.cp-details {
  animation-delay: .2s
}

html.nhc-hero-intro .cp-info-card>.cp-socials {
  animation-delay: .28s
}

html.nhc-hero-intro .cp-form-inner>.cp-form-heading {
  animation-delay: .12s
}

html.nhc-hero-intro .cp-form-inner>.cp-form-desc {
  animation-delay: .2s
}

html.nhc-hero-intro .cp-form-inner>.cp-form {
  animation-delay: .28s
}

html.nhc-hero-intro .pub-hero-slide:not(.clone) .pub-hero-badge {
  animation-delay: .04s
}

html.nhc-hero-intro .pub-hero-slide:not(.clone) .pub-hero-badge {
  transform: translate(-50%, 14px);
  animation-name: hero-fade-up-center;
}

html.nhc-hero-intro .pub-hero-slide:not(.clone) .pub-hero-book {
  animation-delay: .14s
}

html.nhc-hero-intro .pub-hero-slide:not(.clone) .pub-hero-content>*:nth-child(1) {
  animation-delay: .12s
}

html.nhc-hero-intro .pub-hero-slide:not(.clone) .pub-hero-content>*:nth-child(2) {
  animation-delay: .18s
}

html.nhc-hero-intro .pub-hero-slide:not(.clone) .pub-hero-content>*:nth-child(3) {
  animation-delay: .24s
}

html.nhc-hero-intro .pub-hero-slide:not(.clone) .pub-hero-content>*:nth-child(4) {
  animation-delay: .3s
}

@media (prefers-reduced-motion: reduce) {
  body {
    transition: none;
  }

  html.nhc-page-leaving body {
    opacity: 1;
  }

  html.nhc-hero-intro .hero h1,
  html.nhc-hero-intro .hero p,
  html.nhc-hero-intro .hero .btn-row,
  html.nhc-hero-intro .hero .stats,
  html.nhc-hero-intro .about-hero-content>*,
  html.nhc-hero-intro .news-hero-inner>*,
  html.nhc-hero-intro .cp-info-card>.cp-title,
  html.nhc-hero-intro .cp-info-card>.cp-subtitle,
  html.nhc-hero-intro .cp-info-card>.cp-details,
  html.nhc-hero-intro .cp-info-card>.cp-socials,
  html.nhc-hero-intro .cp-form-inner>.cp-form-heading,
  html.nhc-hero-intro .cp-form-inner>.cp-form-desc,
  html.nhc-hero-intro .cp-form-inner>.cp-form,
  html.nhc-hero-intro .pub-hero-slide:not(.clone) .pub-hero-badge,
  html.nhc-hero-intro .pub-hero-slide:not(.clone) .pub-hero-content>*,
  html.nhc-hero-intro .pub-hero-slide:not(.clone) .pub-hero-book {
    animation: none;
    opacity: 1;
    transform: none;
  }

  html.nhc-hero-intro .pub-hero-slide:not(.clone) .pub-hero-badge {
    transform: translateX(-50%);
  }

  html.nhc-hero-intro .about-hero-content>.about-hero-logo {
    transform: translateY(-10px);
  }
}



.kicker {
  letter-spacing: .22em;
  text-transform: uppercase;
  font-size: .78rem;
  color: rgba(214, 180, 109, .8);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.kicker::before {
  content: '';
  display: block;
  width: 20px;
  height: 1.5px;
  background: rgba(214, 180, 109, .55);
  border-radius: 1px;
  flex-shrink: 0;
}

[dir="rtl"] .kicker { flex-direction: row-reverse; }

body[dir="rtl"] .kicker {
  letter-spacing: 0;
  text-transform: none
}

.h-title {
  font-family: var(--font-heading-active);
  letter-spacing: .02em;
}

body[dir="rtl"] .h-title {
  font-family: inherit;
  letter-spacing: 0;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-cream);
  border-bottom: 1px solid rgba(20, 126, 73, .08);
  transition: background .35s cubic-bezier(.4,0,.2,1), box-shadow .35s cubic-bezier(.4,0,.2,1), border-color .35s cubic-bezier(.4,0,.2,1);
}

.header.scrolled {
  background: rgba(247, 244, 238, .97);
  box-shadow: 0 1px 8px rgba(0, 0, 0, .04), 0 4px 20px rgba(0, 0, 0, .03);
  border-bottom-color: rgba(20, 126, 73, .12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 8px 0;
  transition: padding .35s cubic-bezier(.4,0,.2,1);
}

.brand { grid-column: 1; }
.nav { grid-column: 2; }
.header-actions { grid-column: 3; }

.header.scrolled .header-inner {
  padding: 4px 0;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  transition: gap .3s ease, transform .3s ease;
}

[dir="rtl"] .brand {
  gap: 16px;
}

.brand img {
  width: 52px;
  height: 52px;
  border-radius: 0;
  border: 0;
  background: transparent;
  object-fit: contain;
  margin: -4px 0;
  transform: scale(1.15);
  transform-origin: center;
  transition: width .35s cubic-bezier(.4,0,.2,1), height .35s cubic-bezier(.4,0,.2,1), transform .35s cubic-bezier(.4,0,.2,1), margin .35s cubic-bezier(.4,0,.2,1);
}

.brand:hover img {
  transform: scale(1.18);
}

.header.scrolled .brand img {
  width: 42px;
  height: 42px;
  transform: scale(1.1);
  margin: -2px 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand .name {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--green-3);
  line-height: 1.15;
  transition: font-size .3s ease;
}

.brand .tagline {
  font-size: .73rem;
  color: var(--color-muted);
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1.2;
  opacity: .75;
  max-height: 1.4em;
  overflow: hidden;
  transition: opacity .35s cubic-bezier(.4,0,.2,1), max-height .35s cubic-bezier(.4,0,.2,1), margin .35s cubic-bezier(.4,0,.2,1);
}

[dir="rtl"] .brand .tagline {
  letter-spacing: 0;
  font-size: .78rem;
}

.header.scrolled .brand .tagline {
  opacity: 0;
  max-height: 0;
  margin: 0;
}

/* Navigation bar */
.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-divider {
  width: 1px;
  height: 20px;
  background: rgba(20, 126, 73, .12);
  margin: 0 12px;
  flex-shrink: 0;
}

.nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-radius: 10px;
  color: rgba(11, 26, 18, .62);
  font-weight: 500;
  font-size: .88rem;
  letter-spacing: .01em;
  transition: color .25s ease, background .25s ease;
  white-space: nowrap;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: var(--color-gold);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1), opacity .3s ease;
  opacity: 0;
}

.nav a:hover {
  color: var(--green-3);
  background: rgba(20, 126, 73, .04);
}

.nav a:hover::after {
  transform: translateX(-50%) scaleX(.5);
  opacity: .4;
}

.nav a.active {
  color: var(--green-3);
  font-weight: 600;
  background: rgba(20, 126, 73, .08);
}

.nav a.active::after {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
}

.nav a.active:hover::after {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
}

.nav a .icon {
  width: 17px;
  height: 17px;
  opacity: .6;
  flex-shrink: 0;
  transition: opacity .25s ease, transform .25s ease;
}

.nav a.nav-tadabbur .icon {
  width: 19px;
  height: 19px;
}

.nav a:hover .icon {
  opacity: .8;
  transform: scale(1.06);
}

.nav a.active .icon {
  opacity: 1;
}

/* Secondary nav: slightly subdued */
.nav-secondary a {
  font-size: .84rem;
  color: rgba(11, 26, 18, .52);
}

.nav-secondary a .icon {
  width: 15px;
  height: 15px;
}

/* Scroll compact: shrink nav links */
.header.scrolled .nav a {
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: .84rem;
}

.header.scrolled .nav a .icon {
  width: 15px;
  height: 15px;
}

.header.scrolled .nav a::after {
  bottom: 2px;
  height: 2.5px;
}

/* Language switcher */
.lang {
  display: flex;
  align-items: center;
  position: relative;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(20, 126, 73, .12);
}

.lang select {
  border: 0;
  background: transparent;
  outline: none;
  font: inherit;
  color: #000;
  font-weight: 650;
}

.lang select option {
  color: var(--ink);
}

.lang select option:checked {
  color: #000;
}

.lang--custom {
  padding: 0;
  gap: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}

.lang--custom select {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.lang-trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid rgba(20, 126, 73, .14);
  color: rgba(11, 26, 18, .72);
  font: inherit;
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}

.lang-trigger:hover {
  color: var(--green-3);
  background: rgba(20, 126, 73, .04);
  border-color: rgba(20, 126, 73, .22);
}

.lang-trigger:focus-visible {
  outline: 3px solid rgba(20, 126, 73, .42);
  outline-offset: 2px;
}

.lang-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lang-icon .icon {
  width: 16px;
  height: 16px;
  opacity: .7;
  transition: opacity .2s ease;
}

.lang-trigger:hover .lang-icon .icon {
  opacity: .85;
}

.lang-label {
  color: var(--green-3);
  font-weight: 650;
  letter-spacing: .01em;
}

.lang-label-short {
  display: none;
}

.lang-option-short {
  display: none;
}

.lang-label[lang="ar"],
.lang-option-full[lang="ar"],
.lang-label-short[lang="ar"],
.lang-option-short[lang="ar"] {
  font-family: var(--font-ar-sans);
  letter-spacing: 0;
}

.lang-label[lang="ku"],
.lang-option-full[lang="ku"],
.lang-label-short[lang="ku"],
.lang-option-short[lang="ku"] {
  font-family: var(--font-ku-sans);
  letter-spacing: 0;
}

[dir="rtl"] .lang-label[lang="en"],
[dir="rtl"] .lang-option-full[lang="en"],
[dir="rtl"] .lang-label-short[lang="en"],
[dir="rtl"] .lang-option-short[lang="en"] {
  direction: ltr;
  unicode-bidi: isolate;
}

.lang-caret {
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 2px;
  opacity: .7;
  transition: transform .25s ease, opacity .25s ease;
}

.lang--custom.open .lang-caret {
  transform: rotate(-135deg);
  opacity: .8;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  background: rgba(255, 255, 255, .98);
  border: 1px solid rgba(20, 126, 73, .12);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  z-index: 100;
}

[dir="rtl"] .lang-menu {
  right: auto;
  left: 0;
}

.lang--custom.open .lang-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.lang-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: rgba(11, 26, 18, .48);
  font: inherit;
  font-weight: 500;
  font-size: .9rem;
  letter-spacing: .01em;
  border-radius: 10px;
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
  text-align: center;
}

.lang-option:hover {
  color: var(--green-3);
  background: rgba(20, 126, 73, .05);
}

.lang-option[aria-selected="true"] {
  color: var(--green-3);
  font-weight: 600;
  background: rgba(20, 126, 73, .07);
}

.lang-option[aria-selected="true"]::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2.5px;
  border-radius: 999px;
  background: var(--color-gold);
}

/* Header actions & menu toggle */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 65;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  row-gap: 7px;
  width: 44px;
  height: 44px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background-color: var(--green);
  margin: 0;
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.menu-toggle.is-active span {
  background-color: #fff;
  width: 22px;
}

.menu-toggle.is-active span:nth-child(1) {
  transform: translateY(4.25px) rotate(45deg);
}

.menu-toggle.is-active span:nth-child(2) {
  transform: translateY(-4.25px) rotate(-45deg);
}

/* Mobile drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  z-index: 60;
  background: linear-gradient(165deg, #1a9456 0%, var(--green) 40%, #0d6b3a 100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .28s cubic-bezier(0.4, 0, 0.2, 1), visibility .28s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-panel {
  width: 100%;
  height: 100%;
  padding: calc(var(--header-height) + env(safe-area-inset-top)) 20px max(14px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Drawer brand watermark */
.drawer-brand {
  display: flex;
  justify-content: center;
  padding-top: clamp(6px, 1.5vh, 16px);
  padding-bottom: clamp(2px, .5vh, 8px);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity .4s cubic-bezier(0.4, 0, 0.2, 1), transform .4s cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: 0s;
}

.mobile-drawer.open .drawer-brand {
  opacity: 1;
  transform: scale(1);
  transition-delay: .02s;
}

.drawer-brand img {
  width: clamp(36px, 7vh, 56px);
  height: clamp(36px, 7vh, 56px);
  object-fit: contain;
  opacity: .15;
}

/* Drawer nav links */
.drawer-links {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  gap: clamp(.5rem, 1.8vh, 1.8rem);
  padding-block: clamp(4px, 1vh, 14px);
}

.drawer-links a {
  display: block;
  font-family: var(--font-heading-active);
  font-size: clamp(1rem, 4vh, 2.2rem);
  font-weight: 300;
  color: rgba(255, 255, 255, .88);
  margin: 0;
  letter-spacing: -0.02em;
  text-align: center;
  background: transparent;
  text-transform: capitalize;
  line-height: 1.08;
  padding: clamp(2px, 0.6vh, 8px) clamp(8px, 4vw, 18px);
  border-radius: 14px;
  position: relative;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .3s cubic-bezier(0.4, 0, 0.2, 1), transform .3s cubic-bezier(0.4, 0, 0.2, 1), color .2s ease, background .2s ease;
  transition-delay: 0s;
}

[dir="rtl"] .drawer-links a {
  text-transform: none;
  letter-spacing: 0;
}

.drawer-links a:hover {
  color: rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .05);
}

.drawer-links a.active {
  color: #fff;
  font-weight: 400;
}

.drawer-links a.active::after {
  content: '';
  position: absolute;
  bottom: clamp(2px, .4vh, 6px);
  left: 50%;
  transform: translateX(-50%);
  width: clamp(20px, 3vw, 32px);
  height: 2.5px;
  border-radius: 999px;
  background: var(--color-gold);
  opacity: .8;
}

.mobile-drawer.open .drawer-links a {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation for drawer links */
.mobile-drawer.open .drawer-links a:nth-child(1) { transition-delay: .03s; }
.mobile-drawer.open .drawer-links a:nth-child(2) { transition-delay: .06s; }
.mobile-drawer.open .drawer-links a:nth-child(3) { transition-delay: .09s; }
.mobile-drawer.open .drawer-links a:nth-child(4) { transition-delay: .12s; }
.mobile-drawer.open .drawer-links a:nth-child(5) { transition-delay: .15s; }
.mobile-drawer.open .drawer-links a:nth-child(6) { transition-delay: .18s; }
.mobile-drawer.open .drawer-links a:nth-child(7) { transition-delay: .21s; }
.mobile-drawer.open .drawer-links a:nth-child(8) { transition-delay: .24s; }

/* Drawer socials */
.drawer-socials {
  display: flex;
  gap: 16px;
  margin-top: clamp(6px, 1.5vh, 18px);
  width: 100%;
  justify-content: center;
  flex-wrap: nowrap;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
}

.drawer-socials .sbtn {
  width: 32px;
  height: 32px;
  background: transparent;
  border: 0;
  color: #ea9629;
  opacity: .8;
}

.drawer-socials .icon,
.drawer-socials svg {
  width: 24px;
  height: 24px;
  transform: none;
}

.drawer-socials .sbtn:hover {
  opacity: 1;
}

/* Drawer language switcher (injected by JS) */
.drawer-lang {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  padding: clamp(8px, 1.4vh, 16px) 0 clamp(10px, 2vh, 24px);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .3s cubic-bezier(0.4, 0, 0.2, 1), transform .3s cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: 0s;
}

[dir="rtl"] .drawer-lang {
  padding-top: clamp(8px, 1.4vh, 16px);
}

[dir="rtl"] .drawer-socials {
  padding-left: clamp(14px, 3.5vw, 28px);
}

.mobile-drawer.open .drawer-lang {
  opacity: 1;
  transform: translateY(0);
  transition-delay: .2s;
}

.drawer-lang-btn {
  position: relative;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, .45);
  font-family: inherit;
  font-size: clamp(.85rem, 1.7vh, 1rem);
  font-weight: 500;
  letter-spacing: .01em;
  padding: clamp(8px, 1.5vh, 12px) clamp(10px, 2.8vw, 18px);
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
  transition: color .25s ease, opacity .25s ease;
  white-space: nowrap;
}

[dir="rtl"] .drawer-lang-btn {
  letter-spacing: 0;
}

.drawer-lang-btn:hover {
  color: rgba(255, 255, 255, .7);
}

.drawer-lang-btn.active {
  color: var(--color-gold);
  font-weight: 700;
}

.drawer-lang-btn.active::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 2.5px;
  border-radius: 999px;
  background: var(--color-gold);
}

.drawer-lang-btn+.drawer-lang-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, .2);
}

[dir="rtl"] .drawer-lang-btn+.drawer-lang-btn::before {
  left: auto;
  right: 0;
}

.mobile-drawer.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.drawer-open {
  overflow: hidden
}

/* Hero */
.hero-shell {
  position: relative;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: blur(6px) saturate(1.1) brightness(.95);
  transform: scale(1.04);
}

.hero-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(135deg, rgba(10, 75, 44, .82) 0%, rgba(15, 95, 57, .72) 50%, rgba(10, 75, 44, .80) 100%),
    radial-gradient(circle at 25% 20%, rgba(254, 144, 7, .10), transparent 45%),
    radial-gradient(circle at 80% 40%, rgba(214, 180, 109, .08), transparent 50%);
  background-attachment: scroll;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: none;
  z-index: 1;
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  min-height: calc(100svh - var(--header-height));
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border-bottom: none;
  z-index: 2;
  backface-visibility: hidden;
  perspective: 1000px;
  transform: translate3d(0, 0, 0);
}

.hero::before,
.hero::after {
  content: none
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: clamp(32px, 8vh, 72px) 0;
  min-height: calc(100vh - var(--header-height));
  min-height: calc(100svh - var(--header-height));
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  align-items: center
}

.hero-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px
}

.badge-card {
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius-xl);
  padding: 12px 14px;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .16)
}

.badge-card b {
  color: rgba(255, 255, 255, .95)
}

.badge-card span {
  color: rgba(255, 255, 255, .78);
  font-size: .92rem
}

.badge-card:hover {
  transform: translateY(-2px)
}

.hero h1 {
  font-family: var(--font-heading-active);
  color: white;
  font-size: clamp(2.2rem, 4.4vw, 3.8rem);
  line-height: 1.08;
  margin: 0 0 18px;
  letter-spacing: -0.015em;
  text-shadow: 0 4px 20px rgba(0, 0, 0, .20);
}

.hero h1 .accent {
  color: var(--color-gold);
  opacity: .9;
  text-shadow: 0 4px 16px rgba(6, 34, 20, .35);
}

.hero p {
  color: rgba(255, 255, 255, .82);
  margin: 0 0 26px;
  max-width: 52ch;
  font-size: 1.02rem;
  line-height: 1.7;
  text-shadow: 0 2px 10px rgba(6, 34, 20, .25);
}

.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px
}

/* Hero ornament */
.hero-ornament {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

html.nhc-hero-intro .hero-ornament {
  opacity: 0;
  animation: hero-fade-up .5s cubic-bezier(.22,1,.36,1) 0s forwards;
}

.hero-orn-line {
  width: 40px;
  height: 1px;
  background: rgba(214, 180, 109, .5);
  flex-shrink: 0;
}

.hero-orn-diamond {
  width: 8px;
  height: 8px;
  color: rgba(214, 180, 109, .6);
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--btn-radius);
  padding: var(--btn-padding-y) var(--btn-padding-x);
  font-weight: 600;
  font-size: 1.05rem;
  border: var(--btn-border);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease;
  user-select: none;
  text-decoration: none;
  cursor: pointer;
}

.btn:focus-visible {
  outline: 3px solid rgba(20, 126, 73, .42);
  outline-offset: 3px;
}

.btn.primary {
  background: var(--color-green-1);
  color: #fff;
  letter-spacing: .01em;
  box-shadow: var(--btn-primary-shadow);
}

.btn.primary:hover {
  background: color-mix(in srgb, var(--color-green-1) 88%, #000);
  transform: translateY(-2px);
  box-shadow: var(--btn-shadow-hover);
}

.btn.primary:active {
  transform: scale(0.97);
  background: color-mix(in srgb, var(--color-green-1) 80%, #000);
  box-shadow: 0 2px 8px rgba(20, 126, 73, .16);
}

/* Hero primary button — gold on dark green background */
.hero .btn.primary {
  background: var(--color-gold);
  color: #1b1608;
  box-shadow: 0 4px 18px rgba(214, 180, 109, .32);
}

.hero .btn.primary:hover {
  background: color-mix(in srgb, var(--color-gold) 92%, #fff);
  box-shadow: 0 8px 26px rgba(214, 180, 109, .44);
}

.hero .btn.primary:active {
  background: color-mix(in srgb, var(--color-gold) 88%, #000);
  box-shadow: 0 2px 8px rgba(214, 180, 109, .2);
}

.btn.secondary {
  background: var(--btn-secondary-bg);
  color: var(--green-3);
  font-weight: 600;
  box-shadow: var(--btn-secondary-shadow);
  border: var(--btn-secondary-border);
}

.btn.secondary:hover {
  background: var(--btn-secondary-bg-hover);
  border-color: rgba(20, 126, 73, .38);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .09);
}

.btn.secondary:active {
  transform: scale(0.97);
  background: rgba(240, 248, 244, 1);
  border-color: rgba(20, 126, 73, .28);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .06);
}

.btn.ghost {
  background: var(--btn-ghost-bg);
  color: var(--btn-ghost-color);
  font-weight: 600;
  border: var(--btn-ghost-border);
  box-shadow: none;
}

.btn.ghost:hover {
  background: var(--btn-ghost-bg-hover);
  border-color: rgba(20, 126, 73, .45);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(20, 126, 73, .1);
}

.btn.ghost:active {
  transform: scale(0.97);
  background: rgba(20, 126, 73, .1);
  border-color: rgba(20, 126, 73, .38);
}

.hero-card {
  background: var(--card-glass-bg);
  border: var(--card-glass-border);
  border-radius: var(--card-radius);
  padding: 20px 18px;
  box-shadow: var(--card-glass-shadow);
  backdrop-filter: blur(10px);
}

.hero-card h3 {
  margin: 0 0 8px;
  color: white
}

.hero-card ul {
  margin: 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, .86)
}

body[dir="rtl"] .hero-card ul {
  padding-left: 0;
  padding-right: 18px
}

.hero-card li {
  margin: 6px 0
}

.scroll-indicator {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .92);
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .28);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
  animation: bounce-down 2.4s ease-in-out infinite;
  pointer-events: none;
  z-index: 45;
  transition: opacity .18s ease, transform .18s ease;
}

.scroll-indicator svg {
  width: 16px;
  height: 16px
}

body[dir="rtl"] .scroll-indicator svg {
  transform: scaleX(-1)
}

.scroll-indicator.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
  animation: none;
}

/* Stats */
.stats {
  margin-top: 32px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 18px;
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
}

.stat {
  padding: 20px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.stat + .stat {
  border-inline-start: 1px solid rgba(255, 255, 255, .08);
}

.stat .num {
  font-family: var(--font-heading-active);
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
  color: rgba(214, 180, 109, 1);
  font-weight: 700;
}

.stat .label {
  color: rgba(255, 255, 255, .72);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: .72rem
}

body[dir="rtl"] .stat .label {
  letter-spacing: 0;
  text-transform: none
}

.stat .label {
  line-height: 1.2;
  min-height: 2.4em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 14ch;
  margin: 0 auto;
  text-wrap: balance;
}

.stat+.stat {
  border-left: 1px solid rgba(255, 255, 255, .12)
}

body[dir="rtl"] .stat+.stat {
  border-left: none;
  border-right: 1px solid rgba(255, 255, 255, .12)
}

body[data-page="home"] .hero-inner {
  justify-content: center
}

body[data-page="home"] .hero-grid {
  justify-items: center;
  text-align: center;
  width: 100%
}

body[data-page="home"] .hero-grid>div {
  display: flex;
  flex-direction: column;
  align-items: center
}

body[data-page="home"] .hero p {
  margin-left: auto;
  margin-right: auto
}

body[data-page="home"] .hero-badges {
  justify-content: center
}

body[data-page="home"] .btn-row {
  justify-content: center
}

body[data-page="home"] .stats {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto
}

body[data-page="home"] .stat {
  padding: 18px 12px;
  min-height: 132px;
}

body[data-page="home"] .stat .num {
  font-size: clamp(1.6rem, 2.5vw, 2.3rem)
}

body[dir="rtl"][data-page="home"] .stat .label {
  font-family: var(--font-ku-sans);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.2;
  min-height: 2.4em;
  max-width: 12ch;
}

body[dir="rtl"][data-page="home"] .hero h1 {
  font-family: var(--font-rtl-serif);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
}

/* Section */
.section {
  padding: var(--section-padding) 0
}

.section.soft {
  background: linear-gradient(180deg, #f7f4ee, #f3efe6)
}

.section .title {
  margin: 6px 0 16px;
  font-size: clamp(1.5rem, 2.8vw, 2.4rem);
  color: var(--green-3);
  position: relative;
  padding-bottom: 18px;
}

.section .title.h-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 32px;
  height: 2px;
  background: var(--color-gold);
  border-radius: 1px;
}

.section .title.h-title.no-line::after {
  display: none;
}

/* prog-section uses same light bg — title underline inherits from .section .title.h-title::after */

.card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  border: var(--card-border);
}

.pad {
  padding: var(--card-padding)
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 18px;
  align-items: stretch
}

.welcome-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(20, 126, 73, .08);
  border: 1px solid rgba(20, 126, 73, .12);
  font-size: .86rem;
  color: var(--green-3);
}

.mini {
  font-size: .92rem;
  color: var(--muted);
  line-height: 1.75
}

.divider {
  position: relative;
  width: 100%;
  height: 160px;
  background: url("../img/divider.svg") bottom center/cover no-repeat;
  pointer-events: none;
  z-index: 2;
}

.wave-divider {
  width: 100%;
  height: 96px;
  background-color: var(--cream);
  background-image: url("../img/divider.svg");
  background-repeat: repeat-x;
  background-position: bottom center;
  background-size: auto 96px;
}

#welcome {
  padding-bottom: 52px
}

#programs {
  padding-top: var(--section-padding-lg);
  padding-bottom: var(--section-padding-lg);
  position: relative;
  overflow: visible;
  background-color: var(--cream);
}

#programs .title {
  margin-top: 0;
}

#latest-activities::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../img/GeometricPattern.png");
  background-repeat: repeat;
  background-size: 1400px;
  opacity: .02;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 65%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 65%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
  z-index: 0;
}

#latest-activities .container {
  position: relative;
  z-index: 1;
}

#latest-activities {
  position: relative;
  overflow: hidden;
  padding-top: var(--section-padding-lg);
  padding-bottom: var(--section-padding-lg);
  background-color: var(--cream);
}

/* Vision/Mission */
.vlist {
  display: flex;
  flex-direction: column;
  gap: var(--welcome-text-gap, 1.2rem);
  height: 100%;
  padding-left: 2.5rem;
  position: relative;
}

.vlist::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  border-radius: 1px;
  background: linear-gradient(to bottom, transparent, rgba(212, 175, 55, .6) 15%, rgba(212, 175, 55, .6) 85%, transparent);
  display: none;
}

.vitem {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 14px;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  --shift-x: 0px;
  --shift-y: 0px;
  transform: translate(var(--shift-x), var(--shift-y));
  transition: transform .25s ease, background .25s ease;
}

.vitem:hover {
  transform: translate(var(--shift-x), calc(var(--shift-y) - 3px));
  background: rgba(20, 126, 73, .02);
}

.vitem .badge {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(20, 126, 73, .12), rgba(20, 126, 73, .04));
  border: 1px solid rgba(20, 126, 73, .10);
  color: var(--green-3);
  box-shadow: 0 2px 8px rgba(20, 126, 73, .06);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease, color .2s ease;
  flex: 0 0 auto;
  margin-top: 0;
}

.vitem .badge .icon {
  width: 22px;
  height: 22px;
  display: block;
  stroke-width: 1.8;
}

.vitem .badge.badge-gold {
  background: linear-gradient(145deg, rgba(214, 180, 109, .18), rgba(214, 180, 109, .06));
  border-color: rgba(214, 180, 109, .28);
  color: rgba(160, 120, 40, .95);
  box-shadow: 0 2px 8px rgba(214, 180, 109, .12);
}

.vitem:hover .badge {
  box-shadow: 0 4px 14px rgba(20, 126, 73, .15);
  transform: scale(1.06);
}

.vitem:hover .badge.badge-gold {
  box-shadow: 0 4px 14px rgba(214, 180, 109, .2);
}

.vitem:hover .badge {
  transform: scale(1.05);
  background: linear-gradient(145deg, rgba(254, 144, 7, .16), rgba(254, 144, 7, .06));
  border-color: rgba(254, 144, 7, .18);
  color: var(--orange);
  box-shadow: 0 2px 10px rgba(254, 144, 7, .08);
}

.vitem h4 {
  margin: 0 0 3px;
  color: var(--green-3);
  font-weight: 600;
  font-size: 1.15rem
}

.vitem p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.65
}

/* Program cards (arch style) */
.programs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px
}

.program {
  position: relative;
  padding: 22px 18px 18px;
  overflow: hidden;
}

.program::before {
  content: "";
  position: absolute;
  inset: 16px 16px auto 16px;
  height: 210px;
  border-radius: 120px 120px 18px 18px;
  background: linear-gradient(180deg, rgba(247, 244, 238, 1), rgba(239, 233, 221, 1));
  border: 1px solid rgba(20, 126, 73, .10);
}

.program .inner {
  position: relative;
  z-index: 1;
  text-align: center
}

.program .picon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 126, 73, .08);
  border: 1px solid rgba(20, 126, 73, .16);
  margin: 0 auto 10px;
}

.program h3 {
  margin: 8px 0 8px;
  font-size: 1.15rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green-3);
}

body[dir="rtl"] .program h3 {
  letter-spacing: 0;
  text-transform: none
}

.program .ring {
  width: 92px;
  height: 92px;
  border-radius: 999px;
  border: 2px solid rgba(214, 180, 109, .55);
  margin: 12px auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 650;
  background: rgba(255, 255, 255, .75);
}

.program p {
  margin: 0;
  color: var(--muted)
}

/* Lists */
.list {
  display: grid;
  gap: 12px
}

.item {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(20, 126, 73, .10);
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .05);
}

.item h3 {
  margin: 0 0 4px;
  color: var(--green-3)
}

.meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: .92rem
}

.tag {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(20, 126, 73, .14);
  background: rgba(20, 126, 73, .06);
  font-size: .84rem;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px
}

.welcome-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 1rem;
  margin-bottom: 0;
  align-self: flex-start;
}

body[dir="rtl"] .welcome-actions {
  justify-content: flex-end;
  align-self: flex-end;
  width: 100%;
}

body[dir="rtl"] #welcome .welcome-content {
  text-align: right;
  align-items: flex-end;
}

body[dir="rtl"] #welcome .welcome-content>* {
  text-align: right;
  align-self: flex-end;
}

body[dir="rtl"] #welcome .kicker,
body[dir="rtl"] #welcome .welcome-left .title {
  width: 100%;
  text-align: right;
}

body[dir="rtl"] #welcome .welcome-left .title {
  font-family: var(--font-rtl-serif);
  font-weight: 700;
  letter-spacing: 0;
  margin-top: .45rem;
}

html[lang="ku"] #welcome .welcome-left .title {
  margin-top: .7rem;
}

body[dir="rtl"] #welcome .welcome-actions {
  justify-content: flex-end;
  align-self: stretch;
  width: 100%;
}

body[dir="rtl"] #welcome .welcome-actions .btn {
  direction: rtl;
  gap: 10px;
  margin-left: auto;
}

body[dir="rtl"] #welcome .welcome-left .mini {
  margin-left: auto;
  margin-right: 0;
}

body[dir="rtl"] .welcome-readmore-text {
  position: relative;
  top: -1px;
}

body[dir="rtl"] .welcome-readmore-arrow {
  display: inline-block;
  transform: rotate(180deg);
}

@media (min-width: 981px) {
  body[dir="rtl"] #welcome .welcome-content {
    padding-top: calc(var(--welcome-content-pad) + .35rem);
    padding-bottom: calc(var(--welcome-content-pad) + .9rem);
  }

  body[dir="rtl"] #welcome .welcome-left .title {
    font-size: 2.2rem;
    line-height: 1.25;
    margin-bottom: 1.85rem;
  }

  body[dir="rtl"] #welcome .welcome-left .mini {
    max-width: 50ch;
    font-size: 1.12rem;
    line-height: 1.9;
  }

  body[dir="rtl"] #welcome .welcome-actions {
    margin-top: 1.5rem;
  }
}

#welcome {
  position: relative;
  overflow: visible;
  --welcome-content-pad: 1.4rem;
  --welcome-title-offset: calc(var(--welcome-content-pad) + 1.326rem + 14px);
  --welcome-text-gap: 1.5rem;
  --welcome-min-height: clamp(620px, 86vh, 920px);
}

#welcome .container {
  width: min(1200px, 92%);
  min-height: var(--welcome-min-height);
}

#welcome .container {
  position: relative;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#welcome .container::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/calligraphy.svg") no-repeat center center / contain;
  opacity: .025;
  pointer-events: none;
  z-index: -1;
}

#welcome .welcome-grid {
  width: 100%;
}

#welcome .welcome-left {
  position: relative;
  isolation: isolate;
  display: flex;
  justify-content: center;
}

#welcome .welcome-content {
  position: relative;
  z-index: 2;
  padding: var(--welcome-content-pad);
  overflow: hidden;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  display: flex;
  flex-direction: column;
  flex: 1;
  margin-inline: auto;
}

#welcome .welcome-content::before {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  border-radius: inherit;
  z-index: 0;
}

#welcome .welcome-content>* {
  position: relative;
  z-index: 1;
}

#welcome .kicker {
  position: relative;
  display: inline-block;
  padding-bottom: 6px;
  font-weight: 700;
  color: var(--green-3);
}

#welcome .welcome-left .title {
  margin-bottom: var(--welcome-text-gap);
  font-size: 2rem;
  font-weight: 600;
}

#welcome .welcome-left .mini {
  max-width: 60ch;
  line-height: 1.6;
  font-size: 1rem;
  color: #0f2a1a;
  margin-top: 0;
}

#welcome .kicker::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: clamp(38px, 45%, 70px);
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), rgba(214, 180, 109, 0));
  display: none;
}

body[dir="rtl"] #welcome .kicker::after {
  left: auto;
  right: 0;
  background: linear-gradient(270deg, var(--gold), rgba(214, 180, 109, 0));
  display: none;
}

body[dir="rtl"] .vlist {
  padding-left: 0;
  padding-right: 2.5rem;
  border-left: 0;
  border-right: 0;
}

body[dir="rtl"] .vlist::before {
  left: auto;
  right: 0;
}

body[dir="rtl"] #welcome .welcome-left::before {
  left: auto;
  right: -18px;
  clip-path: ellipse(62% 52% at 54% 40%);
}

.input-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center
}

.input {
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(20, 126, 73, .14);
  background: rgba(255, 255, 255, .9);
  outline: none;
  min-width: 220px;
}

.select {
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(20, 126, 73, .14);
  background: rgba(255, 255, 255, .9);
  outline: none;
}

.small {
  font-size: .92rem;
  color: var(--muted)
}

hr.sep {
  border: 0;
  border-top: 1px solid rgba(20, 126, 73, .10);
  margin: 18px 0
}

/* Activities page - Editorial Design */
.news-page {
  background: var(--color-cream);
  min-height: 100vh;
}

.news-hero {
  position: relative;
  padding: clamp(80px, 12vw, 140px) 0 clamp(60px, 8vw, 100px);
  background: linear-gradient(165deg, var(--color-green-3) 0%, var(--color-green-1) 50%, var(--color-green-2) 100%);
  overflow: hidden;
}

.news-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("../img/centerBuilding.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.12;
  filter: blur(1px);
  pointer-events: none;
}

.news-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 70% 20%, rgba(0, 0, 0, .15), transparent 60%);
}

.news-hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.news-hero-label {
  display: none;
}

.news-hero-title {
  font-family: var(--font-heading-active);
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 700;
  color: white;
  margin: 0 0 16px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .2);
}

.news-hero-desc {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, .85);
  margin: 0;
  line-height: 1.6;
  max-width: 50ch;
  margin-inline: auto;
}

.news-toolbar {
  position: sticky;
  top: var(--header-sticky-offset, var(--header-height));
  z-index: 20;
  background: var(--color-cream);
  border-bottom: 1px solid rgba(20, 126, 73, .08);
  padding: 12px 0 16px;
}

body[data-page="news"] .header,
body[data-page="news"] .header.scrolled {
  background: var(--color-cream);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  border-bottom: 1px solid rgba(20, 126, 73, .12);
}

body[data-page="news"] .news-toolbar {
  background: var(--color-cream);
  box-shadow: none;
  border-top: 0;
  border-bottom: 1px solid rgba(20, 126, 73, .12);
}

.news-toolbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.news-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}

.news-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--color-muted);
  pointer-events: none;
}

body[dir="rtl"] .news-search-icon {
  left: auto;
  right: 16px;
}

.news-search {
  width: 100%;
  padding: 12px 16px 12px 46px;
  border: 1px solid rgba(20, 126, 73, .12);
  border-radius: 12px;
  background: white;
  font-size: 0.95rem;
  color: var(--color-ink);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

body[dir="rtl"] .news-search {
  padding: 12px 46px 12px 16px;
}

.news-search:focus {
  border-color: var(--color-green-1);
  box-shadow: 0 0 0 3px rgba(20, 126, 73, .1);
}

.news-search::placeholder {
  color: var(--color-muted);
}

.news-filter-wrap {
  min-width: 200px;
  position: relative;
}

.custom-multiselect {
  position: relative;
  width: 100%;
}

.multiselect-trigger {
  width: 100%;
  position: relative;
  padding: 12px 40px 12px 16px;
  border: 1px solid rgba(20, 126, 73, .12);
  border-bottom: 1px solid rgba(20, 126, 73, .12);
  border-radius: 12px;
  background: white;
  font-size: 0.95rem;
  color: var(--color-ink);
  outline: none;
  cursor: pointer;
  transition: all .2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

body[dir="rtl"] .multiselect-trigger {
  direction: rtl;
  text-align: right;
  padding: 12px 16px 12px 40px;
}

.multiselect-trigger:hover {
  border-color: var(--color-green-1);
  box-shadow: 0 2px 8px rgba(20, 126, 73, .08);
}

.multiselect-trigger:focus {
  border-color: var(--color-green-1);
  box-shadow: 0 0 0 3px rgba(20, 126, 73, .1);
}

.custom-multiselect.active .multiselect-trigger {
  border-color: var(--color-green-1);
  border-bottom: 1px solid var(--color-green-1);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.multiselect-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.multiselect-arrow {
  width: 20px;
  height: 20px;
  color: var(--color-muted);
  transition: transform .2s ease;
  flex-shrink: 0;
  margin-left: 0;
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}

body[dir="rtl"] .multiselect-arrow {
  right: auto;
  left: 14px;
  margin-right: 0;
}

.custom-multiselect.active .multiselect-arrow {
  transform: translateY(-50%) rotate(180deg);
}

.multiselect-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid transparent;
  border-top: none;
  border-radius: 0 0 12px 12px;
  box-shadow: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
  z-index: 100;
}

.custom-multiselect.active .multiselect-dropdown {
  border: 1px solid var(--color-green-1);
  border-top: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
  max-height: 300px;
  overflow-y: auto;
}

.multiselect-options {
  padding: 8px 0;
}

.multiselect-option {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  cursor: pointer;
  transition: background .15s ease;
  user-select: none;
}

body[dir="rtl"] .multiselect-option {
  direction: rtl;
  text-align: right;
}

.multiselect-option:hover {
  background: rgba(20, 126, 73, .05);
}

.multiselect-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  cursor: pointer;
  accent-color: var(--color-green-1);
}

body[dir="rtl"] .multiselect-option input[type="checkbox"] {
  margin-right: 0;
  margin-left: 12px;
}

.multiselect-option label {
  flex: 1;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--color-ink);
}

.multiselect-option.checked {
  background: rgba(20, 126, 73, .08);
}

.news-filter {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(20, 126, 73, .12);
  border-radius: 12px;
  background: white;
  font-size: 0.95rem;
  color: var(--color-ink);
  outline: none;
  cursor: pointer;
  transition: border-color .2s ease;
}

.news-filter:focus {
  border-color: var(--color-green-1);
}

.news-count-wrap {
  margin-left: auto;
}

body[dir="rtl"] .news-count-wrap {
  margin-left: 0;
  margin-right: auto;
}

.news-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-green-1);
  background: rgba(20, 126, 73, .08);
  padding: 8px 16px;
  border-radius: 999px;
}

.news-content {
  padding: clamp(32px, 5vw, 56px) 0 clamp(48px, 8vw, 80px);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

body[data-page="news"] .news-card {
  background: var(--color-cream);
  border: 1px solid rgba(20, 126, 73, .10);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body[data-page="news"] .news-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background-color: rgba(20, 126, 73, .06);
  background-size: cover;
  background-position: top center;
  overflow: hidden;
}

body[data-page="news"] .news-media[data-gallery-trigger] {
  cursor: pointer;
  position: relative;
}

body[data-page="news"] .news-media[data-gallery-trigger]::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/><path d="M11 8v6"/><path d="M8 11h6"/></svg>');
  background-size: 48px 48px;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.3s ease, backdrop-filter 0.3s ease;
  pointer-events: none;
}

body[data-page="news"] .news-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10, 75, 44, .5) 100%);
  opacity: 0;
  transition: opacity .35s ease;
}

body[data-page="news"] .news-media.is-empty {
  background: linear-gradient(135deg, rgba(20, 126, 73, .12) 0%, rgba(214, 180, 109, .15) 100%);
}

body[data-page="news"] .news-feature {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 6px 14px;
  background: var(--color-orange);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(254, 144, 7, .3);
}

body[dir="rtl"][data-page="news"] .news-feature {
  left: auto;
  right: 14px;
  letter-spacing: 0;
  text-transform: none;
}

body[data-page="news"] .news-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  flex: 1;
}

body[data-page="news"] .news-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

body[data-page="news"] .news-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-green-1);
  letter-spacing: 0.05em;
}

body[data-page="news"] .news-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

body[data-page="news"] .news-tag {
  padding: 4px 10px;
  background: rgba(214, 180, 109, .15);
  border: 1px solid rgba(214, 180, 109, .3);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--color-gold);
}

body[data-page="news"] .news-card h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-green-3);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body[data-page="news"] .news-card .small {
  margin: 0;
  font-size: 0.92rem;
  color: var(--color-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body[data-page="news"] .news-actions {
  display: flex;
  justify-content: center;
  margin-top: auto;
  padding-top: 8px;
}

body[data-page="news"] .news-actions .btn {
  min-width: 120px;
}

body[data-page="news"][dir="rtl"] .news-actions .btn {
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.2;
}

body[data-page="news"] .icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(20, 126, 73, .12);
  background: white;
  color: var(--color-green-1);
  padding: 0;
  cursor: pointer;
  transition: all .2s ease;
  flex-shrink: 0;
}

body[data-page="news"] .icon-btn:hover {
  background: var(--color-green-1);
  color: white;
  border-color: var(--color-green-1);
  transform: scale(1.05);
}

body[data-page="news"] .news-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 24px;
  background: white;
  border: 2px dashed rgba(20, 126, 73, .15);
  border-radius: 20px;
  color: var(--color-muted);
  font-size: 1.05rem;
}

/* Activities Pagination */
.activities-pagination {
  margin-top: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(20, 126, 73, 0.2);
  background: white;
  color: var(--color-ink);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn:hover:not([disabled]):not(.active) {
  background: rgba(20, 126, 73, 0.05);
  border-color: rgba(20, 126, 73, 0.3);
}

.pagination-btn.active {
  background: var(--color-green-1);
  color: white;
  border-color: var(--color-green-1);
}

.pagination-btn[disabled] {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination-btn svg {
  width: 20px;
  height: 20px;
}

body[dir="rtl"] .pagination-prev svg,
body[dir="rtl"] .pagination-next svg {
  transform: scaleX(-1);
}

.pagination-prev,
.pagination-next {
  min-width: 40px;
}

.pagination-ellipsis {
  padding: 0 8px;
  color: var(--color-muted);
}

@media (max-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .news-toolbar {
    position: relative;
    top: auto;
  }

  .news-toolbar-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .news-search-wrap {
    max-width: none;
  }

  .news-count-wrap {
    margin-left: 0;
    text-align: center;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }
}

/* Latest activities */
.activities-slider {
  position: relative;
  margin-top: 10px;
  padding-bottom: 22px;
  isolation: isolate;
}

.activities-track {
  --activity-gap: 18px;
  display: flex;
  gap: var(--activity-gap);
  align-items: stretch;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0;
  padding: 0 0 10px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
  /* Allow both horizontal card swipe and vertical page scroll from card touch start */
  touch-action: pan-x pan-y pinch-zoom;
}

.activities-track::-webkit-scrollbar {
  display: none
}

.activities-track .news-mini {
  flex: 0 0 calc((100% - (var(--activity-gap) * 2)) / 3);
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(20, 126, 73, .08);
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  transition: transform .25s ease, box-shadow .25s ease;
}

html[lang="ar"] .activities-track .news-mini,
html[lang="ku"] .activities-track .news-mini {
  direction: rtl;
}

.activities-track .news-mini:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .06);
}

.activities-track .news-mini-media {
  height: 200px;
  border-radius: 14px;
  background-color: rgba(247, 244, 238, 1);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(20, 126, 73, .06);
}

.activities-track .news-mini-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.activities-track .news-mini-date {
  text-transform: uppercase;
  letter-spacing: .8px;
  font-weight: 600;
  font-size: .72rem;
  color: rgba(20, 126, 73, .65);
}

body[dir="rtl"] .activities-track .news-mini-date {
  text-transform: none;
  letter-spacing: 0
}

.activities-track .news-mini-title {
  display: block;
  font-weight: 700;
  color: var(--color-page-bg);
  line-height: 1.35;
  font-size: 1.1rem;
}

.activities-track .news-mini-excerpt {
  margin: 4px 0 6px;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.6;
}

.activities-track .news-mini .btn {
  margin-top: auto;
  align-self: center;
}

.activities-track .news-see-all {
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: rgba(20, 126, 73, .06);
  border: 1.5px dashed rgba(20, 126, 73, .22);
  color: var(--color-green-2);
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
}

.activities-track .news-see-all:hover {
  background: rgba(20, 126, 73, .10);
  border-color: rgba(20, 126, 73, .35);
  transform: translateY(-2px);
}

html[lang="ar"] .activities-track .news-see-all,
html[lang="ku"] .activities-track .news-see-all {
  direction: rtl;
}

.activities-track .news-see-all svg {
  width: 36px;
  height: 36px;
  opacity: .55;
  transition: opacity .25s ease, transform .25s ease;
}

body[dir="rtl"] .activities-track .news-see-all svg {
  transform: scaleX(-1);
}

.activities-track .news-see-all:hover svg {
  opacity: .8;
  transform: translateX(4px);
}

body[dir="rtl"] .activities-track .news-see-all:hover svg {
  transform: scaleX(-1) translateX(4px);
}

.activities-track .news-see-all span {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .01em;
}

.activities-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(20, 126, 73, .10);
  background: rgba(255, 255, 255, .95);
  color: var(--green-3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  cursor: pointer;
  z-index: 2;
}

/* LTR: prev on left, next on right.
   RTL: inset-inline-start is the right side, inset-inline-end is the left side —
   so prev goes to the right and next goes to the left automatically. */
.activities-arrow.prev {
  inset-inline-start: -56px;
  inset-inline-end: auto;
}

.activities-arrow.next {
  inset-inline-end: -56px;
  inset-inline-start: auto;
}

/* Flip the arrow icon itself in RTL so it still points in the correct direction */
body[dir="rtl"] .activities-arrow .icon,
html[dir="rtl"] .activities-arrow .icon {
  transform: scaleX(-1);
}

.activities-arrow:hover {
  transform: translateY(-50%) scale(1.06);
  border-color: rgba(20, 126, 73, .20);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
}

.activities-arrow:disabled {
  opacity: .4;
  cursor: default;
  box-shadow: none;
}

.activities-dots {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  z-index: 2;
}

.activities-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background-color: rgba(20, 126, 73, .20);
  cursor: pointer;
  transition: width .28s ease, border-radius .28s ease, background-color .28s ease;
}

.activities-dot[aria-current="true"] {
  background-color: var(--green-3);
  width: 20px;
  border-radius: 4px;
}

.activities-dot:focus-visible {
  outline: 2px solid rgba(254, 144, 7, .65);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .activities-dot {
    transition: none;
  }
}

#latest-activities .title {
  margin: -12px 0 10px
}

#latest-activities .latest-activities {
  padding-top: 0
}

#latest-activities .activities-slider {
  margin-top: 0
}

@media (max-width:980px) {
  #newsList {
    grid-template-columns: repeat(2, 1fr)
  }
}

@media (max-width:520px) {
  #newsList {
    grid-template-columns: 1fr
  }
}

@media (max-width:1100px) {
  .activities-track .news-mini {
    flex-basis: calc((100% - var(--activity-gap)) / 2)
  }

  .activities-arrow.prev {
    inset-inline-start: 6px;
    inset-inline-end: auto;
  }

  .activities-arrow.next {
    inset-inline-end: 6px;
    inset-inline-start: auto;
  }
}

@media (max-width:768px) {
  .activities-track {
    padding-inline: 18px;
    scroll-padding-inline: 18px;
    -webkit-overflow-scrolling: touch;
  }

  .activities-track .news-mini {
    flex-basis: 96%;
    padding: 16px;
    gap: 10px;
  }

  .activities-track .news-mini-media {
    height: 170px;
  }

  .activities-arrow {
    width: 38px;
    height: 38px;
    display: none;
  }
}

@media (max-width:520px) {
  .activities-track {
    padding-inline: 14px;
    scroll-padding-inline: 14px;
  }

  .activities-dots {
    bottom: 0;
  }
}

/* ── Modal — Redesign ───────────────────────────────── */
@keyframes modal-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modal-box-in {
  from { opacity: 0; transform: translateY(32px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 3vw, 24px);
  background: rgba(7, 18, 12, 0.90);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal.open {
  display: flex;
  animation: modal-overlay-in .22s ease forwards;
}

.modal .box {
  width: min(900px, 100%);
  max-height: min(90vh, 880px);
  max-height: min(calc(100dvh - 48px), 880px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #faf8f3;
  border-radius: 16px;
  box-shadow:
    0 0 0 1px rgba(214, 180, 109, .2),
    0 40px 100px rgba(0, 0, 0, .55);
  border-top: 3px solid rgba(214, 180, 109, .65);
  animation: modal-box-in .42s cubic-bezier(.22, 1, .36, 1) forwards;
}

/* Header — title full-width, close button absolutely at top corner */
.modal .box header {
  position: relative;
  padding: 22px 24px 18px;
  background: #faf8f3;
  border-bottom: 1px solid rgba(214, 180, 109, .15);
  flex-shrink: 0;
}

.modal .box header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.8vw, 2.1rem);
  font-weight: 500;
  color: var(--color-ink);
  line-height: 1.3;
  letter-spacing: -.02em;
  padding-inline-end: 50px;
}

html[lang="ku"] .modal .box header h3,
html[lang="ar"] .modal .box header h3 {
  font-family: var(--font-heading-active);
  letter-spacing: 0;
}

/* Close button — ink circle with white X */
.xbtn {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  width: 34px;
  height: 34px;
  border: none;
  background: var(--color-ink);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  transition: background .2s ease, transform .2s ease;
}

.xbtn:hover {
  background: color-mix(in srgb, var(--color-ink) 78%, #3a6644);
  transform: scale(1.08);
}

.xbtn span {
  display: block;
  width: 14px;
  height: 1.5px;
  background: rgba(255, 255, 255, .88);
  position: absolute;
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
  transform-origin: center;
}

.xbtn span:nth-child(1) { transform: rotate(45deg); }
.xbtn span:nth-child(2) { transform: rotate(-45deg); }

.xbtn:hover span:nth-child(1) { transform: rotate(225deg); }
.xbtn:hover span:nth-child(2) { transform: rotate(135deg); }

/* Content area */
.modal .content {
  padding: 20px 24px 28px;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(214, 180, 109, .28) transparent;
  min-height: 0;
  color: var(--color-ink);
  font-size: 1rem;
  line-height: 1.85;
}

.modal .content::-webkit-scrollbar { width: 4px; }
.modal .content::-webkit-scrollbar-track { background: transparent; }
.modal .content::-webkit-scrollbar-thumb {
  background: rgba(214, 180, 109, .28);
  border-radius: 999px;
}
.modal .content::-webkit-scrollbar-thumb:hover {
  background: rgba(214, 180, 109, .5);
}

.modal .content p { margin: 0 0 14px; }
.modal .content p:last-child { margin-bottom: 0; }
.modal .content ul { margin: 10px 0 16px; padding-inline-start: 20px; }
.modal .content li { margin: 6px 0; }

/* Meta row (news modal) */
.modal .content .meta,
.modal .content .modal-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: .88rem;
  color: rgba(11, 26, 18, .6);
  margin-bottom: 4px;
}

.modal .content .modal-meta .meta-label {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(20, 126, 73, .08);
  border: 1px solid rgba(20, 126, 73, .14);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-green-1);
}

body[dir="rtl"] .modal .content .modal-meta .meta-label {
  letter-spacing: 0;
  text-transform: none;
}

.modal .content .modal-meta time {
  font-weight: 600;
  color: var(--color-ink);
}

.modal .content .sep {
  margin: 14px 0 18px;
  border: none;
  border-top: 1px solid rgba(20, 126, 73, .1);
}

/* Main image — full-bleed, cinematic cover */
.modal-main-image {
  width: calc(100% + 48px);
  margin-inline: -24px;
  margin-top: -20px;
  margin-bottom: 20px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(0, 0, 0, .06);
}

.modal-main-image img {
  display: block;
  width: 100%;
  height: clamp(200px, 32vh, 360px);
  object-fit: cover;
  transition: transform .4s ease;
}

.modal-main-image:hover img {
  transform: scale(1.03);
}

/* Meta inline (activities modal) */
.modal-meta-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(20, 126, 73, .09);
}

.modal-category {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(214, 180, 109, .13);
  border: 1px solid rgba(214, 180, 109, .28);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(116, 80, 14, .9);
}

html[lang="ku"] .modal-category,
html[lang="ar"] .modal-category {
  text-transform: none;
  letter-spacing: 0;
}

.modal-date {
  font-size: .85rem;
  font-weight: 500;
  color: rgba(11, 26, 18, .5);
}

/* Keep Arabic activity dates visually consistent with KU/EN numerals */
html[lang="ar"] .activities-track .news-mini-date,
html[lang="ar"] body[data-page="news"] .news-date,
html[lang="ar"] .modal-date {
  font-family: var(--font-ar-sans);
  font-variant-numeric: tabular-nums;
}

/* Gallery section */
.modal-gallery {
  margin-top: 32px;
  direction: ltr;
  unicode-bidi: isolate;
}

.modal-gallery-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.modal-gallery-divider::before,
.modal-gallery-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(214, 180, 109, .32);
}

.modal-gallery-divider svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  opacity: .55;
}

.modal-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  direction: ltr;
  unicode-bidi: isolate;
}

.modal-gallery-item {
  aspect-ratio: 4/3;
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid rgba(20, 126, 73, .1);
  background: rgba(0, 0, 0, .04);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.modal-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.modal-gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
  border-color: rgba(20, 126, 73, .35);
}

.modal-gallery-item:hover img {
  transform: scale(1.07);
}

/* Native Lightbox Gallery (Now an HTML <dialog> Top-Layer Element) */
dialog.native-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, .92);
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  border: none;
  margin: 0;
  padding: 0;
  max-width: 100vw;
  max-height: 100vh;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.native-lightbox.active {
  display: block;
}

dialog.native-lightbox::backdrop {
  background: transparent;
}

.lightbox-slides-wrapper {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  will-change: transform, opacity;
}

.lightbox-slides-track {
  display: flex;
  height: 100%;
  will-change: transform;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-slides-track.no-transition {
  transition: none;
}

.lightbox-slide {
  flex-shrink: 0;
  flex-basis: 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-slide-content {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-slide img {
  max-width: 100%;
  max-height: calc(100vh - 40px);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  transform-origin: center center;
  will-change: transform;
}

@media (max-width: 768px) {
  .lightbox-slide {
    padding: 0;
  }

  .lightbox-slide img {
    max-width: 100vw;
    max-height: 100vh;
  }
}

/* Legacy lightbox (kept for modal images) */
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, .92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-lightbox.active {
  display: flex;
}

.lightbox-image-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  overflow: hidden;
  touch-action: none;
  will-change: transform, opacity;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
  transform-origin: center center;
}

.lightbox-counter {
  position: absolute;
  top: 20px;
  left: 20px;
  background: transparent;
  color: white;
  padding: 0;
  border-radius: 0;
  font-size: 0.95rem;
  font-weight: 600;
  z-index: 10001;
  backdrop-filter: none;
  display: none;
  letter-spacing: 0.5px;
  box-shadow: none;
  transition: opacity 0.3s ease;
  font-family: inherit;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
  .lightbox-counter {
    top: 16px;
    left: 16px;
    padding: 0;
    font-size: 0.875rem;
  }
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .7);
  border: 2px solid rgba(255, 255, 255, .2);
  color: white;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 10002;
}

.lightbox-close:hover {
  background: rgba(0, 0, 0, .85);
  border-color: rgba(255, 255, 255, .4);
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .7);
  border: 2px solid rgba(255, 255, 255, .2);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 10002;
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

.lightbox-prev:not(:disabled):hover,
.lightbox-next:not(:disabled):hover {
  background: rgba(0, 0, 0, .85);
  border-color: rgba(255, 255, 255, .4);
  transform: translateY(-50%) scale(1.15);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.lightbox-prev:disabled,
.lightbox-next:disabled {
  opacity: .35;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, .12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.lightbox-prev svg,
.lightbox-next svg {
  width: 28px;
  height: 28px;
  stroke-width: 2.5;
}

@media (max-width:768px) {
  .lightbox-close {
    width: 44px;
    height: 44px;
    top: 16px;
    right: 16px;
  }

  .lightbox-prev,
  .lightbox-next {
    display: none !important;
  }

  .lightbox-image-container {
    cursor: default;
  }
}

@media (max-width:520px) {
  .modal {
    padding-top: max(12px, env(safe-area-inset-top));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    padding-left: max(12px, env(safe-area-inset-left));
    align-items: flex-start;
  }

  .modal .box {
    height: calc(100dvh - max(12px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom)));
    max-height: calc(100dvh - max(12px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom)));
  }

  .modal .box header {
    padding: 16px 18px 14px;
  }

  .modal .box header h3 {
    font-size: 1.3rem;
    padding-inline-end: 44px;
  }

  .xbtn {
    top: 12px;
    inset-inline-end: 12px;
  }

  .modal .content {
    padding: 16px 18px 22px;
  }

  .modal-main-image {
    width: calc(100% + 36px);
    margin-inline: -18px;
    margin-top: -16px;
    margin-bottom: 16px;
  }

  .modal-main-image img {
    height: clamp(160px, 28vw, 240px);
  }

  .modal-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
  }

  .lightbox-close {
    width: 40px;
    height: 40px;
    font-size: 24px;
    top: 12px;
    right: 12px;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }
}

/* Footer */
.footer {
  position: relative;
  overflow: hidden;
  background: #0F5F39;
  --footer-pattern-size: 200px;
  color: rgba(255, 255, 255, .84);
  padding: 32px 0 20px;
  margin-top: 0;
}

.footer::before,
.footer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/pattern.svg") repeat;
  background-size: var(--footer-pattern-size, 120px) var(--footer-pattern-size, 120px);
  filter: blur(1.5px);
  opacity: .35;
  pointer-events: none;
}

.footer::before {
  background-position: 0 0;
  -webkit-mask-image: repeating-linear-gradient(to bottom,
      #000 0,
      #000 var(--footer-pattern-size, 120px),
      transparent var(--footer-pattern-size, 120px),
      transparent calc(var(--footer-pattern-size, 120px) * 2));
  mask-image: repeating-linear-gradient(to bottom,
      #000 0,
      #000 var(--footer-pattern-size, 120px),
      transparent var(--footer-pattern-size, 120px),
      transparent calc(var(--footer-pattern-size, 120px) * 2));
}

.footer::after {
  background-position: calc(var(--footer-pattern-size, 120px) / 2) 0;
  -webkit-mask-image: repeating-linear-gradient(to bottom,
      transparent 0,
      transparent var(--footer-pattern-size, 120px),
      #000 var(--footer-pattern-size, 120px),
      #000 calc(var(--footer-pattern-size, 120px) * 2));
  mask-image: repeating-linear-gradient(to bottom,
      transparent 0,
      transparent var(--footer-pattern-size, 120px),
      #000 var(--footer-pattern-size, 120px),
      #000 calc(var(--footer-pattern-size, 120px) * 2));
}

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

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.footer-top .left {
  display: flex;
  align-items: center;
  gap: 12px
}

.footer-top .left {
  margin-left: -6px
}

.footer-top img {
  width: 88px;
  height: 88px;
  border-radius: 0;
  background: transparent;
  border: 0;
}

.footer-top .brandname {
  font-size: 1.15rem;
  font-weight: 700;
  color: white
}

.footer-links {
  display: flex;
  gap: 10px
}

.sbtn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .10);
  padding: 0;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.sbtn:hover {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .18);
}

.sbtn:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, .06);
}

.sbtn .icon {
  display: block;
  width: 32px;
  height: 32px;
  pointer-events: none;
  transform: translateX(5px);
}

.sbtn.sbtn-a svg {
  width: 28px;
  height: 28px;
  transform: translate(4.5px, -1px);
}

.sbtn.sbtn-b svg {
  transform: translateX(5px)
}

.sbtn.sbtn-c svg {
  transform: translate(5.75px, -0.25px)
}

.sbtn.sbtn-b svg,
.sbtn.sbtn-c svg {
  width: 34px;
  height: 34px;
}

.footer-links {
  margin-top: 16px
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 16px;
  padding-top: 16px;
}

.footer-grid>div:nth-child(3) {
  justify-self: end;
  text-align: left;
}

.footer-contact {
  justify-self: center;
  margin-left: 200px;
}

.footer h4 {
  margin: 0 0 8px;
  font-family: var(--font-heading-active);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .9rem;
  color: rgba(255, 255, 255, .88);
}

.footer a {
  color: rgba(255, 255, 255, .80);
  transition: color .2s ease
}

.footer a:hover {
  color: rgba(255, 255, 255, 1);
  text-decoration: underline
}

.footer .small {
  color: rgba(255, 255, 255, .65);
  font-size: .9rem;
  line-height: 1.7
}

.footer .mission-line {
  display: inline
}

.footer .mission-line+.mission-line {
  margin-inline-start: 0
}

.footer h4[data-i18n="footer.quick"]+.small a {
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-decoration-style: solid;
  text-underline-offset: 4px;
  transition: color .2s ease, text-decoration-color .2s ease;
}

.footer h4[data-i18n="footer.quick"]+.small a:hover {
  color: var(--orange);
  text-decoration: underline;
  text-decoration-color: var(--orange);
}

.footer-contact .contact-item {
  display: flex;
  align-items: center
}

.footer-contact .icon {
  color: #fe9007;
  width: 1.1rem;
  height: 1.1rem;
  margin-right: 10px;
  flex: 0 0 auto;
}

.footer-contact .contact-item b {
  display: inline-block;
  margin-right: 6px;
}

.copy {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .55);
  font-size: .85rem
}

/* ── Footer RTL overrides ── */
body[dir="rtl"] .footer-top .left {
  margin-left: 0;
  margin-right: -6px
}

body[dir="rtl"] .footer-grid>div:nth-child(3) {
  text-align: right
}

body[dir="rtl"] .footer-contact {
  margin-left: 0;
  margin-right: 200px
}

body[dir="rtl"] .footer-contact .icon {
  margin-right: 0;
  margin-left: 10px
}

body[dir="rtl"] .footer-contact .contact-item b {
  margin-right: 0;
  margin-left: 6px
}

body[dir="rtl"] .footer h4 {
  letter-spacing: 0;
  text-transform: none;
  font-family: var(--font-rtl-serif);
}

body[dir="rtl"] .footer h4[data-i18n="footer.quick"] {
  text-align: center;
}

body[dir="rtl"] .sbtn .icon {
  transform: translateX(-5px)
}

body[dir="rtl"] .sbtn.sbtn-a svg {
  transform: translate(-4.5px, -1px)
}

body[dir="rtl"] .sbtn.sbtn-b svg {
  transform: translateX(-5px)
}

body[dir="rtl"] .sbtn.sbtn-c svg {
  transform: translate(-5.75px, -0.25px)
}

/* Contact form */
.form {
  display: grid;
  gap: 10px;
  margin-top: 10px
}

textarea.input {
  border-radius: 18px;
  min-height: 110px;
  resize: vertical
}

.btn.dark {
  background: var(--btn-dark-bg);
  color: white;
  font-weight: 600;
  letter-spacing: .01em;
  border: var(--btn-dark-border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}

.btn.dark:hover {
  background: color-mix(in srgb, var(--btn-dark-bg) 85%, #fff);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
}

.btn.dark:active {
  transform: scale(0.97);
  background: color-mix(in srgb, var(--btn-dark-bg) 92%, #000);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .14);
}

.note {
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px dashed rgba(20, 126, 73, .25);
  background: rgba(20, 126, 73, .05);
  color: rgba(11, 26, 18, .78);
}

/* Responsive */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr
  }

  .programs {
    grid-template-columns: repeat(2, 1fr)
  }

  .stats {
    grid-template-columns: repeat(2, 1fr)
  }

  .stat+.stat {
    border-left: none
  }

  .stat:nth-child(odd) {
    border-right: 1px solid rgba(255, 255, 255, .22)
  }

  .stat:nth-child(n+3) {
    border-top: 1px solid rgba(255, 255, 255, .22)
  }

  body[dir="rtl"] .stat:nth-child(odd) {
    border-right: none;
    border-left: 1px solid rgba(255, 255, 255, .22)
  }

  .grid-2 {
    grid-template-columns: 1fr
  }

  .footer-grid {
    grid-template-columns: 1fr
  }

  .footer-contact {
    margin-left: 0
  }

  body[dir="rtl"] .footer-contact {
    margin-right: 0
  }
}

@media (max-width: 768px) {
  .footer-top {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }

  .footer-top .left {
    flex-direction: column;
  }

  .footer-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 40px;
  }

  .footer-grid>div:first-child {
    display: none;
  }

  .footer-grid>div:nth-child(2) {
    order: 2;
  }

  .footer-grid>div:nth-child(3) {
    order: 1;
  }

  .footer-contact {
    margin-left: 0;
    text-align: left;
    width: fit-content;
    margin-inline: auto;
  }

  body[dir="rtl"] .footer-contact {
    text-align: right;
    margin-right: 0;
  }

  .footer-contact h4 {
    text-align: center;
  }

  .footer-contact .contact-item {
    justify-content: flex-start;
  }

  .footer-links {
    margin-top: 40px;
    justify-content: center;
  }

  .footer h4[data-i18n="footer.quick"]+.small {
    justify-items: center;
    text-align: center;
  }

  .copy {
    text-align: center;
  }
}

@media (min-width: 981px) {
  .brand {
    margin-left: -8px
  }

  body[dir="rtl"] .brand {
    margin-left: 0;
    margin-right: -8px
  }

  .header-actions {
    margin-right: -8px
  }

  body[dir="rtl"] .header-actions {
    margin-right: 0;
    margin-left: -8px
  }

  .welcome-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6rem
  }

  #welcome .vlist {
    margin-top: var(--welcome-title-offset)
  }

  #welcome .welcome-left .title {
    font-size: 2rem
  }
}

@media (max-width: 1080px) {
  .nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .mobile-drawer {
    display: flex;
  }

  .brand .tagline {
    display: none;
  }

  .header-inner {
    padding: 12px 0;
  }

  .header.scrolled .header-inner {
    padding: 10px 0;
  }

  .header-actions {
    right: 0;
  }

  [dir="rtl"] .header-actions {
    right: auto;
    left: 0;
  }

  body[data-page="home"] .stats {
    box-shadow: none;
  }

  .hero,
  .hero-inner {
    min-height: calc(100dvh - var(--header-height));
  }

  /* Hide header language switcher on mobile — moved into drawer */
  .lang {
    display: none;
  }
}

@media (max-width: 768px) {
  .divider {
    background-image: url("../img/divider-mobile.svg");
  }

  body[data-page="about"] .section.soft .container {
    position: relative;
    background-color: #f7f4ed;
  }

  body[data-page="about"] .section.soft .container::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: #f7f4ed;
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='88' viewBox='0 0 80 88' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M22 21.91V26h-2c-9.94 0-18 8.06-18 18 0 9.943 8.058 18 18 18h2v4.09c8.012.722 14.785 5.738 18 12.73 3.212-6.99 9.983-12.008 18-12.73V62h2c9.94 0 18-8.06 18-18 0-9.943-8.058-18-18-18h-2v-4.09c-8.012-.722-14.785-5.738-18-12.73-3.212 6.99-9.983 12.008-18 12.73zM54 58v4.696c-5.574 1.316-10.455 4.428-14 8.69-3.545-4.262-8.426-7.374-14-8.69V58h-5.993C12.27 58 6 51.734 6 44c0-7.732 6.275-14 14.007-14H26v-4.696c5.574-1.316 10.455-4.428 14-8.69 3.545 4.262 8.426 7.374 14 8.69V30h5.993C67.73 30 74 36.266 74 44c0 7.732-6.275 14-14.007 14H54zM42 88c0-9.94 8.06-18 18-18h2v-4.09c8.016-.722 14.787-5.738 18-12.73v7.434c-3.545 4.262-8.426 7.374-14 8.69V74h-5.993C52.275 74 46 80.268 46 88h-4zm-4 0c0-9.943-8.058-18-18-18h-2v-4.09c-8.012-.722-14.785-5.738-18-12.73v7.434c3.545 4.262 8.426 7.374 14 8.69V74h5.993C27.73 74 34 80.266 34 88h4zm4-88c0 9.943 8.058 18 18 18h2v4.09c8.012.722 14.785 5.738 18 12.73v-7.434c-3.545-4.262-8.426-7.374-14 8.69V14h-5.993C52.27 14 46 7.734 46 0h-4zM0 34.82c3.213-6.992 9.984-12.008 18-12.73V18h2c9.94 0 18-8.06 18-18h-4c0 7.732-6.275 14-14.007 14H14v4.696c-5.574 1.316-10.455 4.428-14 8.69v7.433z' fill='%233f7958' fill-opacity='0.4' fill-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 60px;
    background-position: top left;
    background-attachment: scroll;
    opacity: .05;
    pointer-events: none;
    z-index: 0;
  }

  body[data-page="about"] .section.soft .container>* {
    position: relative;
    z-index: 1;
  }

  #welcome {
    padding-top: 56px;
    --welcome-min-height: clamp(680px, 96vh, 860px);
  }

  #welcome {
    position: relative;
    overflow: hidden;
    background-color: #f7f4ed;
  }

  #welcome::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100% - clamp(28px, 8vw, 56px));
    height: calc(100% - clamp(28px, 8vw, 56px));
    transform: translate(-50%, -50%);
    background-image: url("../img/calligraphy.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: .025;
    pointer-events: none;
    z-index: 0;
  }

  #welcome .container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 2.5rem 1.5rem;
    background-color: transparent;
    position: relative;
    z-index: 1;
  }

  #welcome .container::before {
    content: none;
  }

  #welcome .welcome-grid {
    padding-top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  #welcome .welcome-content {
    text-align: center;
  }

  body[dir="rtl"] #welcome .welcome-content {
    text-align: right;
    align-items: flex-end;
  }

  #welcome .welcome-left .title {
    font-size: 1.75rem;
    text-align: center;
  }

  body[dir="rtl"] #welcome .welcome-left .title {
    text-align: right;
  }

  #welcome .welcome-actions {
    justify-content: center;
    align-self: center;
  }

  body[dir="rtl"] #welcome .welcome-actions {
    justify-content: flex-end;
    align-self: stretch;
    width: 100%;
  }

  #welcome .kicker::after {
    left: 50%;
    transform: translateX(-50%);
    display: none;
  }

  body[dir="rtl"] #welcome .kicker::after {
    left: auto;
    right: 0;
    transform: none;
    display: none;
  }

  #welcome .vlist {
    padding-left: 0;
    padding-right: 0;
  }

  .vlist::before {
    display: none;
  }

  .welcome-actions {
    margin-bottom: 40px;
  }
}

@media (max-width: 520px) {
  .programs {
    grid-template-columns: 1fr
  }

  .stats {
    grid-template-columns: repeat(2, 1fr)
  }

  .stat:nth-child(odd) {
    border-right: 1px solid rgba(255, 255, 255, .12)
  }

  body[dir="rtl"] .stat:nth-child(odd) {
    border-right: none;
    border-left: 1px solid rgba(255, 255, 255, .12)
  }

  .hero-grid {
    padding-inline: 10px
  }

  .hero h1 {
    font-size: clamp(2rem, 8.5vw, 3rem)
  }

  .hero-inner {
    padding: 54px 0 36px
  }

  .hero-shell::after {
    background-image:
      linear-gradient(120deg, rgba(15, 95, 57, .76), rgba(15, 95, 57, .76)),
      radial-gradient(circle at 20% 15%, rgba(254, 144, 7, .16), transparent 40%),
      radial-gradient(circle at 85% 35%, rgba(214, 180, 109, .14), transparent 45%);
    background-size: auto, auto, auto;
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-position: center, center, center;
  }

  .brand .name {
    font-size: 1rem
  }

  .scroll-indicator {
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    width: 34px;
    height: 34px;
  }

  .btn-row {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  #welcome .container {
    padding-inline: 24px
  }

  .vlist {
    gap: var(--welcome-text-gap, 1.5rem)
  }

  .welcome-actions {
    justify-content: center;
    margin-top: 1.25rem;
    margin-bottom: 40px;
  }

  body[dir="rtl"] .welcome-actions {
    justify-content: flex-end;
    align-self: stretch;
    width: 100%;
  }
}

@media (max-width: 360px) {
  .brand .name {
    font-size: .92rem
  }
}

/* ========================================
   PUBLICATIONS PAGE - MODERN REDESIGN
   ======================================== */

/* Typography */
.pub-main {
  font-family: inherit;
  /* Prevent horizontal scroll from full-width carousel */
  overflow-x: clip;
}

body[dir="rtl"] .pub-main {
  font-family: inherit;
}

.pub-title-font {
  font-family: var(--font-rtl-serif);
}

/* Hero Carousel - Full viewport width with edge-to-edge sliding */
.pub-hero-carousel {
  /* Base: Forest Green background */
  background: var(--color-green-1);
  padding: 0;
  position: relative;
  /* Hide overflow on entire hero section - books clip at screen edges */
  overflow: hidden;
  /* Enable touch from absolute edges */
  touch-action: pan-y;
  /* Full viewport width */
  width: 100vw;
  max-width: 100vw;
  /* Reset any inherited margins/padding */
  margin-left: 0;
  margin-right: 0;
  /* Ensure left edge aligns with viewport */
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

/* Geometric pattern background with blur and low opacity */
.pub-hero-carousel::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: url('../img/GeometricPattern.png');
  background-size: cover;
  background-position: center;
  opacity: 0.04;
  filter: blur(2px);
  pointer-events: none;
  z-index: 0;
}

/* Subtle radial spotlight for depth */
.pub-hero-carousel::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse 60% 50% at 65% 50%, rgba(0, 0, 0, 0.1) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

/* Carousel Slider - Full viewport width, no clipping - parent handles overflow */
.pub-hero-slider {
  position: relative;
  overflow: visible;
  z-index: 2;
  width: 100%;
  touch-action: pan-y pinch-zoom;
}

/* Track - slides move from absolute edge to edge */
.pub-hero-track {
  display: flex;
  /* Start centered on the first real slide to avoid first-frame badge jump. */
  transform: translateX(-100%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  /* Keep carousel math consistent even when the page is RTL.
     The JS uses fixed translateX(-100%/-200%/0%) values which assume LTR track direction. */
  direction: ltr;
}

/* Disable transition during clone reset */
.pub-hero-track.no-transition {
  transition: none !important;
}

/* Each Slide - Full viewport width for edge-to-edge motion with centered content */
.pub-hero-slide {
  --pub-hero-offset: 0px;
  flex: 0 0 100vw;
  width: 100vw;
  min-width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(100px, 12vw, 120px) clamp(80px, 8vw, 120px) clamp(60px, 8vw, 80px);
  position: relative;
  box-sizing: border-box;
}

/* Inner content wrapper for centered layout - Fixed widths for consistency */
.pub-hero-slide-inner {
  display: grid;
  grid-template-columns: 50% 40%;
  gap: 4rem;
  align-items: start;
  max-width: 1100px;
  width: 100%;
  justify-content: center;
  transform: translateX(var(--pub-hero-offset));
}

/* RTL support */
body[dir="rtl"] .pub-hero-slide-inner {
  grid-template-columns: 40% 50%;
  /* Preserve natural text/layout direction inside the slide */
  direction: rtl;
}

/* Badge - Top Center with space from book */
.pub-hero-badge {
  position: absolute;
  top: 50px;
  /* Always center the badge regardless of language direction */
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-gold);
  border: 1.5px solid #B8923D;
  color: #2D2416;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 28px;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(222, 184, 109, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

/* Content - Fixed width for consistency across slides */
.pub-hero-content {
  padding: 0;
  width: 100%;
}

body[dir="rtl"] .pub-hero-content {
  padding: 0;
}

.pub-hero-title {
  font-family: var(--font-rtl-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--color-cream);
  margin: 0 0 16px;
  line-height: 1.4;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  /* Don't force centering; follow the element's direction (LTR/RTL) */
  text-align: start;
}

/* English page (LTR): keep the Kurdish hero title visually left-aligned */
body[dir="ltr"] .pub-hero-title {
  text-align: left;
}

.pub-hero-desc {
  font-family: inherit;
  font-size: 1.05rem;
  color: var(--color-cream);
  line-height: 1.9;
  margin: 0 0 24px;
  opacity: 0.95;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Book with Glow Aura - Consistent spacing */
.pub-hero-book {
  perspective: 1800px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  /* Exact standardized margins */
  padding-bottom: 0;
  margin-bottom: 24px;
  /* Fixed dimensions for consistency */
  width: 100%;
  height: 320px;
}

/* Soft radial spotlight behind book - lighter white/cream fading out */
.pub-hero-book::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, rgba(253, 250, 245, 0.3) 35%, transparent 65%);
  border-radius: 50%;
  z-index: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(20px);
}

/* Soft blurred ground shadow - stays static while books slide */
.pub-hero-book::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 25px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.06) 40%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  filter: blur(8px);
}

.pub-hero-book .book-3d {
  width: 220px;
  height: 300px;
  position: relative;
  z-index: 1;
  cursor: pointer;
}

/* Hero-specific meta pills for green background */
.pub-hero-slide .pub-meta-pill {
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-cream);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.pub-hero-slide .pub-meta-pill svg {
  opacity: 0.9;
}

.pub-hero-slide .pub-meta-physical {
  background: rgba(255, 255, 255, 0.2);
  color: #ffe08a;
  border: 1px solid rgba(255, 224, 138, 0.35);
}

/* Hero-specific buttons for green background */
.pub-hero-slide .pub-btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: var(--color-cream);
}

.pub-hero-slide .pub-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.pub-hero-slide .pub-btn-solid {
  background: var(--color-gold);
  color: #1b1608;
  border: none;
  box-shadow: 0 4px 16px rgba(214, 180, 109, .35);
}

.pub-hero-slide .pub-btn-solid:hover {
  background: color-mix(in srgb, var(--color-gold) 90%, #fff);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(214, 180, 109, .45);
}

.pub-hero-slide .pub-btn-solid:active {
  transform: scale(0.97);
  background: color-mix(in srgb, var(--color-gold) 88%, #000);
}

/* Plain Arrow Buttons - At absolute screen edges */
.pub-hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 12px;
  transition: all 0.2s ease;
}

.pub-hero-arrow svg {
  width: 48px;
  height: 48px;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

.pub-hero-arrow:hover svg {
  color: var(--color-cream);
  transform: scale(1.15);
}

.pub-hero-arrow.prev {
  left: 8px;
}

.pub-hero-arrow.next {
  right: 8px;
}

/* Dots */
.pub-hero-dots {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 15;
}

.pub-hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.pub-hero-dot[aria-current="true"] {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.3);
}

.pub-hero-dot:hover {
  background: rgba(255, 255, 255, 0.6);
}

/* Responsive */
@media (max-width: 900px) {
  .pub-hero-slide {
    flex: 0 0 100vw;
    width: 100vw;
    min-width: 100vw;
    padding: 80px 20px 60px;
  }

  .pub-hero-slide-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 16px;
    transform: none;
  }

  /* Badge closer to top on mobile */
  .pub-hero-badge {
    top: 20px;
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 8px 20px;
  }

  .pub-hero-content {
    padding: 0;
    order: 2;
    min-width: unset;
    max-width: 100%;
    width: 100%;
  }

  body[dir="rtl"] .pub-hero-content {
    padding: 0;
  }

  body[dir="rtl"] .pub-hero-slide-inner {
    grid-template-columns: 1fr;
  }

  .pub-hero-book {
    order: 1;
    width: 200px;
    min-width: 200px;
    height: 280px;
    /* Exact standardized margin for consistency */
    margin-bottom: 24px;
    /* More space between badge and book */
    margin-top: 24px;
    /* Center book on mobile */
    margin-left: auto;
    margin-right: auto;
  }

  .pub-hero-title {
    text-align: center !important;
  }

  /* Hide navigation arrows on mobile - swipe only */
  .pub-hero-arrow {
    display: none !important;
  }

  /* Disable book hover effects on mobile */
  /* Restore hover/tilt on mobile to match desktop interaction */
  .book-3d.bk-bookdefault:hover {
    transform: rotate3d(0, 1, 0, -35deg);
  }

  .pub-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(20, 126, 73, 0.12);
  }
}

@media (min-width: 901px) {

  /* Slight opposite offsets per language direction for visual balance.
     This shifts the entire hero block (badge + slide-inner) equally. */
  body[dir="ltr"] .pub-hero-slide {
    --pub-hero-offset: 36px;
  }

  body[dir="rtl"] .pub-hero-slide {
    --pub-hero-offset: -36px;
  }
}

/* Meta Pills */
.pub-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.pub-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(20, 126, 73, 0.08);
  color: var(--color-muted);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

.pub-meta-pill svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.pub-meta-pill.pub-meta-size {
  direction: ltr;
  unicode-bidi: isolate;
}

.pub-meta-pill.pub-meta-size .pub-size-text {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

.pub-meta-physical {
  background: rgba(218, 165, 32, 0.12);
  color: #b8860b;
  font-weight: 600;
  border: 1px solid rgba(218, 165, 32, 0.25);
}

/* Buttons */
.pub-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease;
  text-decoration: none;
  border: none;
  white-space: nowrap;
}

.pub-btn svg {
  width: 20px;
  height: 20px;
}

.pub-btn-ghost {
  background: transparent;
  border: 1.5px solid rgba(20, 126, 73, .28);
  color: var(--color-green-1);
}

.pub-btn-ghost:hover {
  background: rgba(20, 126, 73, .07);
  border-color: rgba(20, 126, 73, .45);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(20, 126, 73, .1);
}

.pub-btn-ghost:active {
  transform: scale(0.97);
  background: rgba(20, 126, 73, .1);
}

.pub-btn-solid {
  background: var(--color-green-1);
  color: white;
  box-shadow: 0 4px 16px rgba(20, 126, 73, .28);
}

.pub-btn-solid:hover {
  background: color-mix(in srgb, var(--color-green-1) 88%, #000);
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(20, 126, 73, .36);
}

.pub-btn-solid:active {
  transform: scale(0.97);
  background: color-mix(in srgb, var(--color-green-1) 82%, #000);
}

/* 3D Book Effect - RTL (spine on right) - Based on reference */
.book-3d {
  position: relative;
  width: 180px;
  height: 250px;
  transform-style: preserve-3d;
  transition: transform 0.5s;
  will-change: transform;
}

.book-3d.bk-bookdefault {
  transform: rotate3d(0, 1, 0, -20deg);
}

.book-3d.bk-bookdefault:hover {
  transform: rotate3d(0, 1, 0, -35deg);
}

.book-3d.bk-viewback {
  transform: translate3d(0, 0, 0px) rotate3d(0, 1, 0, 180deg);
}

/* Front cover wrapper */
.book-front {
  transform-style: preserve-3d;
  transform-origin: 0% 50%;
  transition: transform 0.5s;
  transform: translate3d(0, 0, calc(var(--book-t, 20px) / 2));
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  z-index: 10;
  position: absolute;
  width: 100%;
  height: 100%;
}

/* Cover */
.book-cover {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: 100% 100%;
  background-position: center;
  border-radius: 3px 0 0 3px;
  /* Round left edge (fore-edge for RTL) */
  box-shadow: inset -4px 0 10px rgba(0, 0, 0, 0.1);
  /* Shadow from right (spine side) */
  z-index: 1;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  /* Firefox anti-aliasing and edge smoothing */
  transform: translateZ(0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  image-rendering: auto;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* Cover back (black backing) */
.book-cover-back {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #000;
  transform: rotate3d(0, 1, 0, 179deg);
  border-radius: 3px 0 0 3px;
  /* Round left edge */
  z-index: 1;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

/* Spine line on cover - Removed */
.book-cover:after {
  display: none;
}

/* Binding detail on front (right side - spine side for RTL) */
.book-front:after {
  content: '';
  position: absolute;
  top: 0;
  right: 10px;
  bottom: 0;
  width: 3px;
  background: rgba(0, 0, 0, 0.15);
  box-shadow: -1px 0 3px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

/* Binding detail on back (left side - spine side when flipped for RTL) */
.book-back:after {
  content: '';
  position: absolute;
  top: 0;
  left: 10px;
  bottom: 0;
  width: 3px;
  background: rgba(0, 0, 0, 0.06);
  box-shadow: 1px 0 3px rgba(255, 255, 255, 0.1);
}

/* Remove binding dent for newest book */
.book-newest .book-front:after,
.book-newest .book-back:after {
  display: none !important;
}

/* Back cover */
.book-back {
  position: absolute;
  width: 100%;
  height: 100%;
  transform: rotate3d(0, 1, 0, -180deg) translate3d(0, 0, calc(var(--book-t, 20px) / 2));
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2), 0 4px 10px rgba(0, 0, 0, 0.14);
  border-radius: 0 3px 3px 0;
  /* Round right edge (fore-edge when flipped) */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}


/* Right spine (visible edge) - Hidden */
.book-right {
  display: none;
}

/* Left spine (title spine) */
.book-left {
  position: absolute;
  width: var(--book-t, 20px);
  height: 100%;
  right: calc(var(--book-t, 20px) / -2);
  top: 0;
  transform: rotate3d(0, 1, 0, -90deg);
  background-color: inherit;
}

/* Rotate spine images 180 degrees */
.book-right,
.book-left {
  background-size: 100% 100% !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  transform-origin: center;
}

.book-right {
  transform: rotate3d(0, 1, 0, 90deg) translate3d(0, 0, 160px) scaleX(-1);
}

.book-left {
  transform: rotate3d(0, 1, 0, -90deg) scaleX(-1);
}

/* Top edge */
.book-top {
  position: absolute;
  width: 100%;
  height: var(--book-t, 20px);
  top: calc(var(--book-t, 20px) * -0.4);
  left: 0;
  transform: rotate3d(1, 0, 0, 89.35deg) translateZ(0.35px);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: linear-gradient(180deg, #faf9f5 0%, #f4f2ec 100%);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.75);
  border-radius: 3px 0 0 3px;
  /* Match front cover radius */
  outline: 1px solid transparent;
}

/* Bottom edge */
.book-bottom {
  position: absolute;
  width: 100%;
  height: var(--book-t, 20px);
  top: calc(var(--book-t, 20px) * -0.4);
  left: 0;
  transform: rotate3d(1, 0, 0, -89.35deg) translate3d(0, 0, 250px) translateZ(-0.35px);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: linear-gradient(180deg, #f1efe9 0%, #ece9e1 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -1px 0 rgba(0, 0, 0, 0.06);
  border-radius: 3px 0 0 3px;
  /* Match front cover radius */
  outline: 1px solid transparent;
}

/* Pages effect */
.book-pages {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #fff;
  transform: translate3d(0, 0, calc(var(--book-t, 20px) / 2 - 1px));
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  outline: 1px solid transparent;
  z-index: 9;
  border-radius: 3px 0 0 3px;
  /* Match front cover radius to prevent white corners */
}

@supports (-moz-appearance:none) {

  /* Firefox: ensure preserve-3d propagates and apply anti-aliasing fixes */
  .book-3d,
  .book-front,
  .book-back,
  .book-left,
  .book-top,
  .book-bottom,
  .book-pages {
    transform-style: preserve-3d;
  }

  /* Firefox flips in opposite direction vs Chromium — reverse only the click-flip */
  .book-3d.bk-viewback {
    transform: translate3d(0, 0, 0px) rotate3d(0, 1, 0, -180deg);
  }

  /* Transparent outlines to smooth jagged edges on all 3D faces */
  .book-front,
  .book-back,
  .book-left,
  .book-top,
  .book-bottom,
  .book-pages,
  .book-cover {
    outline: 1px solid transparent;
  }

  .book-top {
    transform: rotate3d(1, 0, 0, 89.15deg) translateZ(0.5px);
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 0 0 0.6px rgba(255, 255, 255, 0.4);
  }

  .book-bottom {
    transform: rotate3d(1, 0, 0, -89.15deg) translate3d(0, 0, 250px) translateZ(-0.5px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -1px 0 rgba(0, 0, 0, 0.08), 0 0 0 0.6px rgba(255, 255, 255, 0.25);
  }

  .book-pages {
    transform: translate3d(0, 0, calc(var(--book-t, 20px) / 2 - 0.45px));
    /* Clip top 1px so the white pages can't peek through the 3D seam */
    clip-path: inset(1px 0 0 0);
  }

  .book-front {
    overflow: hidden;
  }

  /* Fix subpixel cover bleed in Firefox 3D */
  .book-cover {
    transform: translate3d(0, 0, 0.15px);
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    background-position: center center !important;
    image-rendering: optimizeQuality;
  }
}

/* Grid Section */
.pub-grid-section {
  background: var(--color-cream);
  padding: var(--section-padding) 0;
}

.pub-section-title {
  font-family: var(--font-rtl-serif);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--green-3);
  margin: 0 0 20px;
  text-align: center;
}

.pub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* Publication Card */
.pub-card {
  background: white;
  border-radius: var(--card-radius);
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .05);
  border: 1px solid rgba(20, 126, 73, .10);
  transition: transform .25s ease, box-shadow .25s ease;
  perspective: 1800px;
}

.pub-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

.pub-card .book-3d {
  margin-bottom: 24px;
  cursor: pointer;
}

.pub-card .book-back {
  box-shadow: none;
}


.pub-card .book-bottom {
  display: none;
}

@supports (-moz-appearance:none) {

  /* Firefox: anti-aliased grid books — keep full 3D, match Chromium look */
  .pub-card {
    perspective: 2000px;
  }

  .pub-card .book-3d.bk-bookdefault {
    transform: rotate3d(0, 1, 0, -20deg);
  }

  .pub-card .book-3d.bk-bookdefault:hover {
    transform: rotate3d(0, 1, 0, -35deg);
  }

  .pub-card .book-top {
    /* Keep visible — anti-aliased via global Firefox block above */
    filter: blur(0.35px);
  }

  .pub-card .book-cover {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: inset -4px 0 10px rgba(0, 0, 0, 0.1), 0 0 0 0.5px rgba(0, 0, 0, 0.06);
  }
}

.pub-card-title {
  font-family: var(--font-rtl-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-ink);
  margin: 0 0 12px;
  line-height: 1.5;
}

body[dir="ltr"] .pub-card-title {
  text-align: center;
}

.pub-card .pub-meta {
  justify-content: center;
  margin-bottom: 16px;
}

.pub-card-desc {
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--color-muted);
  line-height: 1.8;
  margin: 0 0 24px;
  flex-grow: 1;
}

.pub-card .pub-buttons {
  justify-content: center;
  width: 100%;
}

.pub-card>.pub-meta-physical+.pub-buttons {
  margin-top: 12px;
}

.pub-card .pub-btn {
  padding: 12px 20px;
  font-size: 0.9rem;
  flex: 1;
  max-width: 150px;
}

/* PDF Preview Modal */
.pub-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pub-preview-modal.active {
  display: flex;
  opacity: 1;
}

.pub-preview-content {
  width: 100%;
  max-width: 900px;
  height: 90vh;
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.pub-preview-content iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.pub-preview-close {
  position: absolute;
  top: -50px;
  right: 0;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pub-preview-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

/* Responsive */
@media (max-width: 900px) {
  .pub-featured {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 50px 30px 30px;
  }

  .pub-featured-badge {
    left: 50%;
    transform: translateX(-50%);
  }

  body[dir="rtl"] .pub-featured-badge {
    right: 50%;
    left: auto;
    transform: translateX(50%);
  }

  .pub-featured-book {
    justify-self: center;
  }

  .pub-featured-content {
    padding-left: 0;
    padding-right: 0;
  }

  .pub-meta {
    justify-content: center;
  }

  .pub-buttons {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .pub-featured {
    padding: 50px 20px 25px;
    gap: 30px;
  }

  .pub-featured-book .book-3d {
    width: 160px;
    height: 220px;
  }

  .pub-featured-book .book-bottom {
    transform: rotate3d(1, 0, 0, -90deg) translate3d(0, 0, 220px);
  }

  .pub-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .pub-card {
    padding: 24px 20px;
  }

  /* Publications grid: make books larger on mobile */
  .pub-card .book-3d {
    width: 160px;
    height: 220px;
    direction: ltr;
  }
}

/* ========================================
   ABOUT PAGE - COMPLETE REDESIGN
   ======================================== */

/* Hero */
.about-hero {
  position: relative;
  padding: clamp(56px, 8vw, 90px) 0 clamp(40px, 6vw, 60px);
  background: linear-gradient(165deg, var(--color-green-3) 0%, var(--color-green-1) 50%, var(--color-green-2) 100%);
  text-align: center;
}

.about-hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background-image: url("../img/pattern3.svg");
  background-repeat: repeat;
  background-size: 760px;
  background-position: center;
  opacity: 0.06;
  filter: blur(2px);
  pointer-events: none;
}

.about-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(0, 0, 0, .12), transparent 60%);
}

.about-hero-inner {
  position: relative;
  z-index: 1;
}

.about-hero-content {
  max-width: 740px;
  margin: 0 auto;
  transform: translateY(-14px);
}

.about-hero-logo {
  display: block;
  width: clamp(140px, 18vw, 230px);
  aspect-ratio: 1629 / 1023;
  height: auto;
  object-fit: contain;
  margin: 0 auto 18px;
  transform: translateY(-10px);
  filter:
    drop-shadow(0 0 12px rgba(255, 255, 255, .8)) drop-shadow(0 18px 30px rgba(255, 255, 255, .6)) drop-shadow(0 40px 55px rgba(255, 255, 255, .45)) drop-shadow(0 60px 90px rgba(214, 180, 109, .5)) drop-shadow(0 4px 14px rgba(0, 0, 0, .4));
}

.about-hero-content .kicker {
  color: rgba(214, 180, 109, .9);
  margin-bottom: 16px;
}

.about-hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: white;
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-shadow: 0 4px 20px rgba(0, 0, 0, .2);
}

/* Who We Are */
.about-whoweare {
  background: var(--color-cream);
}

.about-intro-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.about-section-title {
  font-size: clamp(1.5rem, 2.8vw, 2.4rem);
  color: var(--green-3);
  margin: 6px 0 16px;
  line-height: 1.2;
}

.about-intro-text .kicker {
  margin-bottom: 4px;
}

.about-intro-text>p {
  color: var(--muted);
  line-height: 1.75;
  margin: 0 0 24px;
}

.about-intro-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(20, 126, 73, .12);
  position: sticky;
  top: calc(var(--header-height) + 24px);
}

.about-intro-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Values */
.about-values {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-value {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(20, 126, 73, .10);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .04);
  transition: transform .25s ease, box-shadow .25s ease;
}

.about-value:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .07);
}

.about-value-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, rgba(20, 126, 73, .16), rgba(20, 126, 73, .06));
  border: 1px solid rgba(20, 126, 73, .16);
  color: var(--green-3);
}

.about-value-icon .icon {
  width: 22px;
  height: 22px;
}

.about-value h4 {
  margin: 0 0 4px;
  color: var(--green-3);
  font-size: 1rem;
}

.about-value .small {
  margin: 0;
  line-height: 1.65;
}

/* Team */
.about-team {
  background: linear-gradient(180deg, #f7f4ee 0%, #efe9dd 100%);
}

.about-team-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 32px;
}

.about-team-subtitle {
  color: var(--muted);
  margin: 0;
}

.about-team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.about-team-card {
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(20, 126, 73, .10);
  border-radius: var(--card-radius);
  padding: 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .05);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.about-team-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
  border-color: rgba(254, 144, 7, .24);
}

.about-team-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  background: linear-gradient(160deg, rgba(20, 126, 73, .16), rgba(20, 126, 73, .06));
  border: 1px solid rgba(20, 126, 73, .16);
  color: var(--green-3);
}

.about-team-card-icon svg {
  width: 26px;
  height: 26px;
}

.about-team-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: var(--green-3);
}

.about-team-card .small {
  margin: 0;
  line-height: 1.6;
}

/* Gallery */
.about-gallery {
  background: var(--color-cream);
  padding-top: 0;
}

.about-gallery-header {
  text-align: center;
  margin-bottom: 32px;
  padding-top: var(--section-padding);
}

.about-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  grid-auto-flow: dense;
  gap: 14px;
}

.about-gallery-grid .about-gallery-item:nth-child(1) {
  grid-column: span 2;
  grid-row: span 2;
}

.about-gallery-grid .about-gallery-item:nth-child(5) {
  grid-column: span 2;
}

.about-gallery-item {
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-lg);
  cursor: pointer;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(20, 126, 73, .08);
  transition: transform .25s ease, box-shadow .25s ease;
}

.about-gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10, 75, 44, .35) 100%);
  opacity: 0;
  transition: opacity .25s ease;
}

.about-gallery-item:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .15);
  z-index: 1;
}

.about-gallery-item:hover::after {
  opacity: 1;
}

/* About page responsive */
@media (max-width: 980px) {
  .about-intro-grid {
    grid-template-columns: 1fr;
  }

  .about-intro-image {
    position: static;
    max-width: 600px;
    margin: 0 auto;
  }

  .about-team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 180px;
  }

  .about-gallery-grid .about-gallery-item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
  }

  .about-gallery-grid .about-gallery-item:nth-child(5) {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .about-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 160px;
  }

  .about-gallery-grid .about-gallery-item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 1;
  }

  .about-gallery-grid .about-gallery-item:nth-child(5) {
    grid-column: span 1;
  }
}

@media (max-width: 520px) {
  .about-team-grid {
    grid-template-columns: 1fr;
  }

  .about-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 140px;
  }
}

/* ========================================
   ABOUT PAGE — STAFF PROFILES
   ======================================== */

.staff-profiles-section {
  margin-top: var(--space-4xl);
}

/* Divider between category cards and staff profiles grid */
.staff-profiles-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}
.staff-profiles-divider::before,
.staff-profiles-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border-soft);
}
.staff-profiles-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-ink-strong);
  white-space: nowrap;
}

.staff-profiles-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.staff-profiles-title {
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
}

.staff-profiles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

/* Staff card — full-bleed photo with bottom info strip */
.staff-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  aspect-ratio: 3 / 4;
  background: var(--color-cream);
  transition: box-shadow .25s ease, transform .25s ease;
  cursor: default;
}

.staff-card:hover {
  box-shadow: var(--shadow-card-strong);
  transform: translateY(-4px);
}

/* Photo fills the entire card */
.staff-card-photo-wrap {
  position: absolute;
  inset: 0;
}

.staff-card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform .35s ease;
}

.staff-card:hover .staff-card-photo {
  transform: scale(1.04);
}

/* Floating info strip — inset from card edges */
.staff-card-body {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: #fff;
  border-radius: 12px;
  padding: 10px 10px 10px 14px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 22px rgba(0, 0, 0, .18);
}

/* Text section grows, button stays fixed */
.staff-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.staff-card-name {
  font-size: .9rem;
  font-weight: 700;
  color: var(--color-ink);
  margin: 0;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Shrink font for longer names so they don't eat button space */
.staff-card-name.is-long {
  font-size: .75rem;
}

/* Role label — plain coloured text */
.staff-role-badge {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: none;
  padding: 0;
  border-radius: 0;
}

.staff-role-director { color: #1a4a8a; }
.staff-role-huffaz  { color: var(--color-green-1); }
.staff-role-qaida   { color: #0e755a; }
.staff-role-tajweed { color: #8a6a00; }
.staff-role-studies { color: #a35500; }
.staff-role-admin   { color: var(--color-muted); }

/* View Profile — compact circular arrow button */
.staff-card-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--color-green-1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .18s, transform .18s;
}

.staff-card-btn:hover {
  background: var(--color-green-2);
  transform: scale(1.08);
}

.staff-card-btn svg {
  display: block;
}

[dir="rtl"] .staff-card-btn svg {
  transform: scaleX(-1);
}

/* Pagination */
.staff-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-2xl);
}

.staff-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 var(--space-md);
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-green-1);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
}

.staff-page-btn:hover:not(:disabled) {
  background: var(--color-green-1);
  color: #fff;
  border-color: var(--color-green-1);
}

.staff-page-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.staff-page-info {
  font-size: .9rem;
  color: var(--color-muted);
  min-width: 3ch;
  text-align: center;
}

/* Responsive */
@media (max-width: 1024px) {
  .staff-profiles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .staff-profiles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .staff-card-body {
    bottom: 8px;
    left: 8px;
    right: 8px;
    padding: 8px 8px 8px 10px;
    gap: 6px;
  }

  .staff-card-name {
    font-size: .78rem;
  }

  .staff-card-name.is-long {
    font-size: .66rem;
  }

  .staff-card-btn {
    width: 30px;
    height: 30px;
  }
}

/* ========================================
   CONTACT PAGE - SPLIT LAYOUT
   ======================================== */

body[data-page="contact"] {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body[data-page="contact"] main {
  flex: 1 0 auto;
  display: flex;
}

.cp-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  min-height: 100%;
  flex: 1 0 auto;
  background: var(--color-cream);
}

/* ---- Left panel: card on cream bg ---- */
.cp-info {
  display: flex;
  align-items: center;
  padding: clamp(32px, 4vh, 64px);
}

.cp-info-card {
  width: 100%;
  max-width: 500px;
  height: auto;
  margin-inline-start: auto;
  background: linear-gradient(170deg, #0f6e3f 0%, #178a4e 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 44px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .15);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.cp-title {
  font-family: var(--font-heading-active);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 10px;
  color: var(--color-gold);
}

.cp-subtitle {
  color: rgba(255, 255, 255, .78);
  line-height: 1.65;
  margin: 0 0 28px;
  font-size: clamp(.92rem, .8rem + .35vw, 1.05rem);
}

/* Contact detail rows — no boxes */
.cp-details {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 24px;
}

.cp-detail {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  text-decoration: none;
}

a.cp-detail:hover .cp-detail-icon {
  background: rgba(255, 255, 255, .18);
}

a.cp-detail:hover .cp-detail-body span:last-child {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cp-detail-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .1);
  color: var(--color-gold);
  transition: background .18s ease;
}

.cp-detail-icon svg {
  width: 18px;
  height: 18px;
}

.cp-detail-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.cp-detail-body strong {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .5);
}

body[dir="rtl"] .cp-detail-body strong {
  text-transform: none;
  letter-spacing: 0
}

.cp-detail-body span:last-child {
  font-size: .92rem;
  color: #fff;
  word-break: break-word;
  transition: text-decoration .18s ease;
}

/* Social row */
.cp-socials {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-top: 18px;
}

.cp-socials-label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .45);
  margin-bottom: 10px;
}

.cp-socials-row {
  display: flex;
  gap: 14px;
  margin-left: -4px;
}

.cp-social {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: color .2s ease, transform .2s ease, opacity .2s ease;
}

.cp-social:hover {
  color: var(--orange);
  transform: translateY(-2px);
}

.cp-social svg {
  width: 24px;
  height: 24px;
}

#contactInstagram svg,
#contactWhatsapp svg {
  width: 30px;
  height: 30px;
}

/* ---- Right panel: form directly on bg ---- */
.cp-form-side {
  display: flex;
  align-items: center;
  padding: clamp(32px, 4vh, 64px);
}

.cp-form-inner {
  width: 100%;
  max-width: 460px;
  height: auto;
  margin-inline-end: auto;
}

.cp-form-heading {
  font-family: var(--font-heading-active);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--green-3);
  margin: 0 0 8px;
  line-height: 1.2;
}

.cp-form-desc {
  color: var(--muted);
  font-size: clamp(.92rem, .8rem + .35vw, 1.05rem);
  line-height: 1.65;
  margin: 0 0 24px;
}

.cp-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cp-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cp-field label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--green-3);
  letter-spacing: .02em;
}

.cp-field input,
.cp-field textarea {
  padding: 13px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(20, 126, 73, .14);
  background: #fff;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.cp-field input:focus,
.cp-field textarea:focus {
  border-color: var(--color-green-1);
  box-shadow: 0 0 0 3px rgba(20, 126, 73, .1);
}

.cp-field textarea {
  resize: none;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 120px;
  border-radius: var(--radius-lg);
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
  body[data-page="contact"] main {
    display: block;
  }

  .cp-split {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .cp-info,
  .cp-form-side {
    align-items: center;
    padding: clamp(24px, 4vw, 36px);
  }

  .cp-info-card {
    max-width: 100%;
    margin: 0;
  }

  .cp-form-inner {
    height: auto;
    display: block;
    max-width: 100%;
    margin: 0;
  }
}

/* ========================================
   DESKTOP RESPONSIVENESS TUNING
   ======================================== */

/* Keep nav/header readable on narrow desktops without dropping to mobile nav too early */
@media (min-width: 1081px) and (max-width: 1360px) {
  .nav a {
    padding: 10px 12px;
    gap: 5px;
    font-size: .84rem;
  }

  .nav a .icon {
    width: 15px;
    height: 15px;
  }

  .nav-divider {
    margin: 0 8px;
  }

  .brand .name {
    font-size: 1.05rem;
  }

  .header-actions {
    gap: 8px;
  }
}

/* Tuning for small desktops (1081-1180px) — icons and brand name stay visible */
@media (min-width: 1081px) and (max-width: 1180px) {
  .nav a {
    padding: 8px 10px;
    gap: 4px;
    font-size: .8rem;
  }

  .nav a .icon {
    width: 14px;
    height: 14px;
  }

  .brand .tagline {
    display: none;
  }

  .nav-divider {
    margin: 0 6px;
  }
}

/* Rebalance dense desktop layouts around laptop widths */
@media (min-width: 981px) and (max-width: 1240px) {
  .container {
    width: min(1180px, 94%);
  }

  #welcome .container {
    width: min(1180px, 94%);
    min-height: var(--welcome-min-height);
  }

  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .about-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 190px;
  }

  .about-gallery-grid .about-gallery-item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
  }

  .about-gallery-grid .about-gallery-item:nth-child(5) {
    grid-column: span 1;
  }

  .footer-contact {
    margin-left: 64px;
  }

  body[dir="rtl"] .footer-contact {
    margin-right: 64px;
  }

  .cp-info,
  .cp-form-side {
    padding: clamp(26px, 3vw, 40px);
  }

  .cp-info-card {
    max-width: 460px;
  }

  .cp-form-inner {
    max-width: 440px;
  }

  .pub-hero-slide-inner {
    gap: 2.8rem;
  }
}

/* Expand layouts on standard large desktop */
@media (min-width: 1241px) and (max-width: 1599px) {
  .container {
    width: min(1280px, 90%);
  }

  #welcome .container {
    width: min(1280px, 90%);
    min-height: var(--welcome-min-height);
  }

  .footer-contact {
    margin-left: 96px;
  }

  body[dir="rtl"] .footer-contact {
    margin-right: 96px;
  }
}

/* Use space better on very wide screens */
@media (min-width: 1600px) {
  .container {
    width: min(1420px, 86%);
  }

  #welcome .container {
    width: min(1420px, 86%);
    min-height: var(--welcome-min-height);
  }

  .hero h1 {
    font-size: clamp(2.6rem, 3.1vw, 4.3rem);
  }

  .hero p {
    max-width: 58ch;
    font-size: 1.1rem;
  }

  body[data-page="home"] .stats {
    max-width: 980px;
  }

  .news-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: none;
  }

  .about-gallery-grid {
    grid-auto-rows: 240px;
  }

  .cp-info-card {
    max-width: 560px;
  }

  .cp-form-inner {
    max-width: 520px;
  }

  .footer-contact {
    margin-left: 120px;
  }

  body[dir="rtl"] .footer-contact {
    margin-right: 120px;
  }
}

/* Publications hero: desktop scaling without changing UI structure */
@media (min-width: 901px) {
  .pub-hero-slide {
    padding-top: clamp(84px, 9vw, 120px);
    padding-bottom: clamp(48px, 6vw, 80px);
    padding-inline: clamp(28px, 6vw, 120px);
  }

  .pub-hero-slide-inner {
    max-width: min(1120px, 100%);
    gap: clamp(2.2rem, 3.4vw, 4rem);
  }

  .pub-hero-badge {
    top: clamp(28px, 3.2vw, 50px);
  }
}

@media (min-width: 901px) and (max-width: 1200px) {
  .pub-hero-slide {
    padding-top: clamp(76px, 8.4vw, 98px);
    padding-bottom: clamp(38px, 4.8vw, 56px);
    padding-inline: clamp(20px, 3.8vw, 44px);
  }

  .pub-hero-slide-inner {
    max-width: 980px;
    gap: clamp(1.5rem, 2.6vw, 2.4rem);
    grid-template-columns: 52% 40%;
  }

  body[dir="rtl"] .pub-hero-slide-inner {
    grid-template-columns: 40% 52%;
  }

  .pub-hero-badge {
    top: clamp(20px, 2.5vw, 34px);
    font-size: .84rem;
    padding: 8px 22px;
  }

  .pub-hero-book {
    height: 300px;
    margin-bottom: 16px;
  }

  .pub-hero-arrow svg {
    width: 42px;
    height: 42px;
  }

  body[dir="ltr"] .pub-hero-slide {
    --pub-hero-offset: 24px;
  }

  body[dir="rtl"] .pub-hero-slide {
    --pub-hero-offset: -24px;
  }
}

@media (min-width: 1201px) and (max-width: 1599px) {
  .pub-hero-slide {
    padding-top: clamp(88px, 8vw, 112px);
    padding-bottom: clamp(46px, 4.5vw, 66px);
    padding-inline: clamp(42px, 5.8vw, 96px);
  }

  .pub-hero-slide-inner {
    max-width: 1080px;
    gap: clamp(2.4rem, 3.2vw, 3.6rem);
  }

  body[dir="ltr"] .pub-hero-slide {
    --pub-hero-offset: 32px;
  }

  body[dir="rtl"] .pub-hero-slide {
    --pub-hero-offset: -32px;
  }
}

@media (min-width: 1600px) {
  .pub-hero-slide {
    padding-top: clamp(96px, 7vw, 124px);
    padding-bottom: clamp(52px, 4vw, 72px);
    padding-inline: clamp(72px, 7vw, 140px);
  }

  .pub-hero-slide-inner {
    max-width: 1200px;
    gap: clamp(3.4rem, 3.8vw, 4.8rem);
  }

  .pub-hero-badge {
    top: 44px;
  }
}

/* Activities page: fixed 4 x 2 layout on large screens */
@media (min-width: 1200px) {
  body[data-page="news"] #newsList.news-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 1fr;
  }

  body[data-page="news"] #newsList.news-grid .news-card {
    height: 100%;
  }
}

/* Ultra-wide scaling for 2K/4K displays */
@media (min-width: 1920px) {
  html {
    font-size: 115%;
    /* Scale everything rem-based by 1.15x */
  }

  :root {
    --space-section: 64px;
    --card-padding: 36px;
    --header-height: 116px;
  }

  .container,
  #welcome .container {
    width: min(1680px, 86%);
  }

  .brand img,
  .header.scrolled .brand img {
    width: 60px;
    height: 60px;
    margin: -8px 0;
  }

  .nav a {
    padding: 12px 20px;
  }

  .nav a .icon {
    width: 22px;
    height: 22px;
  }

  .lang {
    padding: 12px 18px;
  }

  .lang svg.icon {
    width: 22px;
    height: 22px;
  }

  .lang-trigger {
    padding: 14px 20px;
  }

  .lang-trigger svg {
    width: 22px;
    height: 22px;
  }
}

@media (min-width: 2560px) {
  html {
    font-size: 135%;
    /* Scale everything rem-based by 1.35x */
  }

  :root {
    --space-section: 80px;
    --card-padding: 44px;
    --header-height: 130px;
  }

  .container,
  #welcome .container {
    width: min(2100px, 86%);
  }

  .brand img,
  .header.scrolled .brand img {
    width: 72px;
    height: 72px;
    margin: -10px 0;
  }

  .nav a {
    padding: 14px 24px;
  }

  .nav a .icon {
    width: 26px;
    height: 26px;
  }

  .lang {
    padding: 14px 22px;
  }

  .lang svg.icon {
    width: 26px;
    height: 26px;
  }

  .lang-trigger {
    padding: 16px 24px;
  }

  .lang-trigger svg {
    width: 26px;
    height: 26px;
  }
}

@media (min-width: 3840px) {
  html {
    font-size: 180%;
    /* Scale everything rem-based by 1.8x */
  }

  :root {
    --space-section: 120px;
    --card-padding: 64px;
    --header-height: 150px;
  }

  .container,
  #welcome .container {
    width: min(3200px, 86%);
  }
}

/* Explicit component scaling on Ultra-wide displays */
@media (min-width: 1440px) {
  .header-inner {
    padding: 12px 0;
  }

  .nav a {
    padding: 14px 20px;
    font-size: .92rem;
  }
}

@media (min-width: 1920px) {

  /* 2. Make the hero content of the home page larger */
  .hero h1 {
    font-size: clamp(3.2rem, 4vw, 5.2rem);
  }

  .hero p {
    font-size: 1.4rem;
    max-width: 72ch;
  }

  /* 3. Home page welcome section (Mission/Vision) Points */
  html[lang="ar"] #welcome .vlist,
  html[lang="ku"] #welcome .vlist {
    margin-top: 2rem;
    justify-content: center;
  }

  html[lang="ar"] #welcome .vitem,
  html[lang="ku"] #welcome .vitem {
    gap: 1.75rem;
    padding: 24px 28px;
  }

  html[lang="ar"] #welcome .vitem .badge,
  html[lang="ku"] #welcome .vitem .badge {
    width: 64px;
    height: 64px;
  }

  html[lang="ar"] #welcome .vitem .badge svg,
  html[lang="ku"] #welcome .vitem .badge svg {
    width: 32px;
    height: 32px;
  }

  html[lang="ar"] #welcome .vitem h4,
  html[lang="ku"] #welcome .vitem h4 {
    font-size: 1.7rem;
    margin-bottom: 6px;
  }

  html[lang="ar"] #welcome .vitem p,
  html[lang="ku"] #welcome .vitem p {
    font-size: 1.25rem;
    line-height: 1.7;
  }

  #welcome .welcome-actions .btn {
    font-size: 1.25rem;
    padding: 18px 30px;
  }

  /* 5. Latest activities cards on home page */
  .news-mini {
    min-height: 460px;
  }

  .news-mini-media {
    height: 240px;
  }

  .news-mini-title {
    font-size: 1.35rem;
  }

  .news-mini-excerpt {
    font-size: 1.15rem;
  }

  /* 5. Publications hero book */
  .pub-hero-book {
    width: 420px;
    height: 580px;
    transform: translateX(-80px);
  }

  /* 6. About Us logo */
  .about-hero-logo img {
    max-width: 440px;
  }

  /* 7. Home page stats */
  .stat {
    padding: 26px 20px;
    gap: 8px;
  }

  .stat .num {
    font-size: 3rem;
  }

  .stat .label {
    font-size: 0.9rem;
  }

  /* 8. Navbar scaling */
  .nav a {
    font-size: 1.26rem;
    padding: 13px 22px;
    gap: 11px;
  }

  .nav a svg {
    width: 24px;
    height: 24px;
  }

  /* 9. Publications Grid */
  .pub-grid {
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 32px;
  }

  .pub-card {
    padding: 40px 32px;
  }

  .pub-card .book-3d {
    width: 220px;
    height: 300px;
  }

  .pub-card-title {
    font-size: 1.6rem;
  }

  .pub-card-desc {
    font-size: 1.15rem;
  }
}

/* FHD range (including common scaled-FHD viewport widths):
   Make Welcome mission/vision/community points as large as 2K styling for KU/AR only. */
@media (min-width: 1500px) and (max-width: 2559px) and (min-height: 800px) {

  html[lang="ar"] #welcome .vitem,
  html[lang="ku"] #welcome .vitem {
    gap: 2rem;
    padding: 32px 36px;
  }

  html[lang="ar"] #welcome .vitem .badge,
  html[lang="ku"] #welcome .vitem .badge {
    width: 86px;
    height: 86px;
    border-radius: 20px;
  }

  html[lang="ar"] #welcome .vitem .badge svg,
  html[lang="ku"] #welcome .vitem .badge svg {
    width: 44px;
    height: 44px;
  }

  html[lang="ar"] #welcome .vitem h4,
  html[lang="ku"] #welcome .vitem h4 {
    font-size: 1.9rem;
    margin-bottom: 8px;
  }

  html[lang="ar"] #welcome .vitem p,
  html[lang="ku"] #welcome .vitem p {
    font-size: 1.35rem;
    line-height: 1.8;
  }
}

@media (min-width: 2560px) {

  /* Scale explicit pixel dimensions even further for 2K+ */
  .hero h1 {
    font-size: clamp(4rem, 5vw, 6.5rem);
  }

  /* Header: logo, brand name, nav icons/tabs, language switcher */
  .brand {
    min-width: 310px;
    gap: 18px;
  }

  body[dir="rtl"] .brand {
    gap: 24px;
  }

  .brand img,
  .header.scrolled .brand img {
    width: 68px;
    height: 68px;
    margin: -8px 0;
  }

  .brand .name {
    font-size: 1.5rem;
  }

  .lang-trigger {
    font-size: 1.1rem;
    padding: 14px 20px;
    gap: 10px;
    border-radius: 12px;
  }

  .lang-icon .icon {
    width: 20px;
    height: 20px;
  }

  .lang-menu {
    min-width: 170px;
    border-radius: 16px;
    padding: 8px;
  }

  .lang-option {
    font-size: 1.05rem;
    padding: 12px 16px;
  }

  #welcome .vitem {
    gap: 1.7rem;
    padding: 28px 32px;
  }

  #welcome .vitem .badge {
    width: 78px;
    height: 78px;
    border-radius: 18px;
  }

  #welcome .vitem .badge svg {
    width: 40px;
    height: 40px;
  }

  #welcome .vitem h4 {
    font-size: 1.75rem;
    margin-bottom: 7px;
  }

  #welcome .vitem p {
    font-size: 1.25rem;
    line-height: 1.72;
  }

  #welcome .welcome-actions .btn {
    font-size: 1.5rem;
    padding: 24px 38px;
  }

  .news-mini {
    min-height: 560px;
  }

  .news-mini-media {
    height: 300px;
  }

  .pub-hero-book {
    width: 520px;
    height: 720px;
    transform: translateX(-120px);
  }

  .about-hero-logo img {
    max-width: 580px;
  }

  /* 7. Home page stats */
  .stat {
    padding: 36px 26px;
    gap: 12px;
  }

  .stat .num {
    font-size: 4rem;
  }

  .stat .label {
    font-size: 1.1rem;
  }

  /* 8. Navbar scaling */
  .nav a {
    font-size: 1.26rem;
    padding: 13px 22px;
    gap: 10px;
  }

  .nav a .icon {
    width: 30px;
    height: 30px;
  }

  .nav a.nav-tadabbur .icon {
    width: 32px;
    height: 32px;
  }

  /* 9. Publications Grid */
  .pub-grid {
    grid-template-columns: repeat(auto-fill, minmax(560px, 1fr));
    gap: 48px;
  }

  .pub-card {
    padding: 56px 44px;
  }

  .pub-card .book-3d {
    width: 300px;
    height: 410px;
  }

  .pub-card-title {
    font-size: 2.2rem;
  }

  .pub-card-desc {
    font-size: 1.4rem;
  }
}

/* ========================================
   PUBLICATIONS HERO 2K/4K SCALING
   ======================================== */
@media (min-width: 1921px) {
  .pub-hero-slide {
    padding: 160px 140px 100px;
  }

  .pub-hero-slide-inner {
    max-width: 1800px;
    gap: 12rem;
    grid-template-columns: 450px 1fr;
  }

  body[dir="rtl"] .pub-hero-slide-inner {
    grid-template-columns: 1fr 450px;
  }

  .pub-hero-title {
    font-size: 3.5rem;
  }

  .pub-hero-desc {
    font-size: 1.4rem;
    margin-bottom: 32px;
  }

  .pub-hero-badge {
    top: 70px;
    font-size: 1.1rem;
    padding: 14px 38px;
  }

  .pub-hero-book {
    width: 100%;
    height: 480px;
    transform: none;
    margin-bottom: 36px;
  }

  .pub-hero-book .book-3d {
    width: 300px;
    height: 410px;
  }

  .pub-hero-book::before {
    width: 600px;
    height: 600px;
  }

  .pub-hero-book::after {
    width: 300px;
    height: 35px;
  }

  .pub-btn {
    font-size: 1.3rem;
    padding: 18px 36px;
  }

  .pub-btn svg {
    width: 26px;
    height: 26px;
  }

  .pub-meta-pill {
    font-size: 1.15rem;
    padding: 10px 20px;
  }

  .pub-meta-pill svg {
    width: 20px;
    height: 20px;
  }

  .pub-hero-arrow svg {
    width: 64px;
    height: 64px;
  }

  .pub-hero-dots {
    bottom: 35px;
  }

  .pub-hero-dot {
    width: 14px;
    height: 14px;
  }
}

@media (min-width: 2561px) {
  .pub-hero-slide {
    padding: 240px 200px 160px;
  }

  .pub-hero-slide-inner {
    max-width: 2800px;
    gap: 18rem;
    grid-template-columns: 650px 1fr;
  }

  body[dir="rtl"] .pub-hero-slide-inner {
    grid-template-columns: 1fr 650px;
  }

  .pub-hero-title {
    font-size: 5rem;
  }

  .pub-hero-desc {
    font-size: 2rem;
    margin-bottom: 48px;
  }

  .pub-hero-badge {
    top: 100px;
    font-size: 1.6rem;
    padding: 20px 56px;
  }

  .pub-hero-book {
    width: 100%;
    height: 640px;
    transform: none;
    margin-bottom: 48px;
  }

  .pub-hero-book .book-3d {
    width: 440px;
    height: 600px;
  }

  .pub-hero-book::before {
    width: 800px;
    height: 800px;
  }

  .pub-hero-book::after {
    width: 440px;
    height: 50px;
  }

  .pub-btn {
    font-size: 1.8rem;
    padding: 28px 56px;
  }

  .pub-btn svg {
    width: 36px;
    height: 36px;
  }

  .pub-meta-pill {
    font-size: 1.6rem;
    padding: 14px 28px;
    gap: 12px;
  }

  .pub-meta-pill svg {
    width: 24px;
    height: 24px;
  }

  .pub-hero-arrow svg {
    width: 96px;
    height: 96px;
  }

  .pub-hero-dots {
    bottom: 50px;
    gap: 16px;
  }

  .pub-hero-dot {
    width: 20px;
    height: 20px;
  }
}

/* Enforce larger Welcome points for KU/AR on desktop/FHD-like widths.
   Placed at file end to override earlier responsive blocks. */
@media (min-width: 1200px) and (max-width: 2559px) {
  body[data-page="home"][dir="rtl"] #welcome .vitem {
    gap: 1.1rem;
    padding: 20px 22px;
  }

  body[data-page="home"][dir="rtl"] #welcome .vitem .badge {
    width: 56px;
    height: 56px;
    border-radius: 13px;
  }

  body[data-page="home"][dir="rtl"] #welcome .vitem .badge svg {
    width: 28px;
    height: 28px;
  }

  body[data-page="home"][dir="rtl"] #welcome .vitem h4 {
    font-size: 1.32rem;
    margin-bottom: 5px;
  }

  body[data-page="home"][dir="rtl"] #welcome .vitem p {
    font-size: 1rem;
    line-height: 1.68;
  }
}

/* Publications page: always show 4 books per row on large screens */
@media (min-width: 1200px) {
  body[data-page="publications"] .pub-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Publications grid tuning on higher resolutions:
   slightly smaller cards/books with larger action buttons */
@media (min-width: 1920px) {
  body[data-page="publications"] .pub-grid .pub-card {
    padding: 34px 28px;
  }

  body[data-page="publications"] .pub-grid .pub-card .book-3d {
    width: 205px;
    height: 280px;
  }

  body[data-page="publications"] .pub-grid .pub-card .pub-btn {
    font-size: 1rem;
    padding: 14px 24px;
    max-width: 170px;
  }

  body[data-page="publications"] .pub-grid .pub-card .pub-btn svg {
    width: 20px;
    height: 20px;
  }
}

@media (min-width: 2560px) {
  body[data-page="publications"] .pub-grid .pub-card {
    padding: 48px 38px;
  }

  body[data-page="publications"] .pub-grid .pub-card .book-3d {
    width: 260px;
    height: 355px;
  }

  body[data-page="publications"] .pub-grid .pub-card .pub-btn {
    font-size: 1.12rem;
    padding: 16px 28px;
    max-width: 190px;
  }

  body[data-page="publications"] .pub-grid .pub-card .pub-btn svg {
    width: 22px;
    height: 22px;
  }
}

/* ── Programs — Manifesto Row redesign ───────────────── */
.prog-section {
  background: var(--cream);
  padding: clamp(56px, 6vw, 96px) 0;
}

.prog-section.section {
  padding: clamp(56px, 6vw, 96px) 0;
}

.prog-heading {
  color: var(--green-3);
  margin-bottom: clamp(28px, 3.5vw, 48px);
}

.prog-list {
  border-top: 1px solid rgba(20, 126, 73, .14);
  margin-inline: -32px;
}

.prog-item {
  display: grid;
  grid-template-columns: 72px 60px 1fr auto;
  align-items: center;
  gap: clamp(16px, 2.5vw, 36px);
  padding: clamp(28px, 4.5vh, 52px) 32px;
  border-bottom: 1px solid rgba(20, 126, 73, .1);
  border-radius: 10px;
  transition: background .3s ease;
}

.prog-item:hover {
  background: rgba(20, 126, 73, .04);
}

.prog-num {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.8rem);
  font-weight: 300;
  line-height: 1;
  color: rgba(20, 126, 73, .15);
  transition: color .35s ease;
  letter-spacing: -.02em;
  user-select: none;
  flex-shrink: 0;
}

.prog-item:hover .prog-num {
  color: rgba(214, 180, 109, .75);
}

.prog-mark {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(20, 126, 73, .07);
  border: 1px solid rgba(20, 126, 73, .14);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-3);
  flex-shrink: 0;
  transition: background .3s ease, border-color .3s ease, color .3s ease;
}

.prog-mark .icon {
  width: 28px;
  height: 28px;
}

.prog-item:hover .prog-mark {
  background: var(--green-3);
  border-color: var(--green-3);
  color: #fff;
}

.prog-sub {
  display: block;
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}

[dir="rtl"] .prog-sub {
  letter-spacing: .06em;
  font-family: var(--font-ku-sans);
}

html[lang="ar"] .prog-sub {
  font-family: var(--font-ar-sans);
}

.prog-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  font-weight: 500;
  color: var(--green-3);
  letter-spacing: .01em;
  margin: 0 0 12px;
}

html[lang="ku"] .prog-title,
html[lang="ar"] .prog-title {
  font-family: var(--font-rtl-serif);
  font-weight: 400;
  letter-spacing: 0;
}

html[lang="ar"] .prog-title {
  font-family: var(--font-ar-sans);
  font-weight: 600;
}

html[lang="ku"] .prog-num,
html[lang="ar"] .prog-num {
  font-family: var(--font-display); /* keep Latin numerals for 01–04 */
}

html[lang="ku"] .prog-features li,
html[lang="ar"] .prog-features li {
  font-family: var(--font-ku-sans);
  font-size: .92rem;
}

html[lang="ar"] .prog-features li {
  font-family: var(--font-ar-sans);
}

.prog-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prog-features li {
  font-size: .9rem;
  color: var(--muted);
  padding-inline-start: 14px;
  position: relative;
  line-height: 1.55;
  transition: color .3s ease;
}

.prog-features li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(20, 126, 73, .35);
  transition: background .3s ease;
}

.prog-item:hover .prog-features li { color: var(--ink); }
.prog-item:hover .prog-features li::before { background: var(--green-3); }

/* ── Enroll CTA — programs section ─────────────────── */
.enroll-btn {
  display: inline-flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  cursor: pointer;
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  font-weight: 600;
  letter-spacing: .01em;
  color: #fff;
  background: var(--color-green-1);
  border: none;
  border-radius: 9999px;
  padding: 15px 32px;
  transition: background .22s ease, box-shadow .22s ease, transform .2s ease;
  box-shadow: 0 4px 16px rgba(20, 126, 73, .22);
  user-select: none;
}

.enroll-btn::after {
  content: '←';
  font-size: .95em;
  color: var(--color-gold);
  opacity: 0;
  display: inline-block;
  width: 0;
  overflow: hidden;
  transform: translateX(4px);
  transition: width .26s ease, opacity .26s ease, transform .26s ease, margin .26s ease;
  margin-inline-start: 0;
}

[dir="ltr"] .enroll-btn::after {
  content: '→';
  transform: translateX(-4px);
}

.enroll-btn:hover {
  background: color-mix(in srgb, var(--color-green-1) 88%, #000);
  box-shadow: 0 8px 26px rgba(20, 126, 73, .32);
  transform: translateY(-2px);
}

.enroll-btn:hover::after {
  opacity: 1;
  width: 1em;
  margin-inline-start: 8px;
  transform: translateX(0);
}

.enroll-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 10px rgba(20, 126, 73, .18);
}

.enroll-btn:focus-visible {
  outline: 3px solid rgba(20, 126, 73, .42);
  outline-offset: 3px;
}

html[lang="ku"] .enroll-btn,
html[lang="ar"] .enroll-btn {
  font-family: var(--font-ku-sans);
}

html[lang="ar"] .enroll-btn {
  font-family: var(--font-ar-sans);
}

@media (max-width: 768px) {
  .prog-list {
    margin-inline: -16px;
  }

  .prog-item {
    grid-template-columns: 44px 1fr;
    grid-template-rows: auto auto;
    gap: 12px 14px;
    padding: 20px 16px;
  }

  .prog-num { font-size: 2rem; }
  .prog-mark { display: none; }

  .prog-body { grid-column: 2; }

  .enroll-btn {
    grid-column: 1 / -1;
    justify-content: center;
    width: 100%;
    padding: 15px 24px;
    font-size: 1rem;
  }
}

@media (min-width: 769px) and (max-width: 1080px) {
  .prog-item {
    grid-template-columns: 60px 52px 1fr auto;
    gap: 20px;
  }
}

/* ========================================
   DIRECTORY / ACHIEVEMENTS PAGE — V2
   Sidebar + Cards + Global Search
   ======================================== */

/* Main layout */
.dir-main {
  min-height: 100vh;
  padding: 40px 0 64px;
  background: linear-gradient(180deg, #f8faf9 0%, #f1f5f3 100%);
}

.dir-header {
  text-align: center;
  margin-bottom: 24px;
}

.dir-header h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  color: var(--green-3, #0a4b2c);
  margin-bottom: 12px;
}

.dir-header p {
  font-size: 1.1rem;
  color: #556b5e;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Search bar */
.dir-search-wrap {
  max-width: 560px;
  margin: 0 auto 32px;
}

.dir-search-box {
  position: relative;
}

.dir-search-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  color: #9ca3af;
  pointer-events: none;
  transition: color 0.2s ease;
}

[dir="ltr"] .dir-search-icon,
:not([dir]) .dir-search-icon {
  left: 18px;
}

[dir="rtl"] .dir-search-icon {
  right: 18px;
}

.dir-search-box input {
  width: 100%;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 999px;
  background: #fff;
  font-size: 1rem;
  color: #1a1a1a;
  outline: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: all 0.25s ease;
  font-family: inherit;
}

[dir="ltr"] .dir-search-box input,
:not([dir]) .dir-search-box input {
  padding: 14px 20px 14px 50px;
}

[dir="rtl"] .dir-search-box input {
  padding: 14px 50px 14px 20px;
}

.dir-search-box input::placeholder {
  color: #9ca3af;
}

.dir-search-box input:focus {
  border-color: var(--green-3, #147E49);
  box-shadow: 0 4px 20px rgba(20, 126, 73, 0.12);
}

.dir-search-box:focus-within .dir-search-icon {
  color: var(--green-3, #147E49);
}

/* Search loading state — spinner replaces the icon */
.dir-search-box.dir-search-loading .dir-search-icon {
  opacity: 0;
}

.dir-search-box.dir-search-loading::before {
  content: '';
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border: 2px solid rgba(20, 126, 73, 0.2);
  border-top-color: var(--green-3, #147E49);
  border-radius: 50%;
  animation: dir-spin 0.65s linear infinite;
  pointer-events: none;
  z-index: 2;
}

[dir="ltr"] .dir-search-box.dir-search-loading::before,
:not([dir]) .dir-search-box.dir-search-loading::before {
  left: 19px;
}

[dir="rtl"] .dir-search-box.dir-search-loading::before {
  right: 19px;
}

/* Mobile category selector — hidden on desktop */
.dir-mobile-cats {
  display: none;
}

/* ── Two-column layout ─────────────────────────────── */
.dir-layout {
  display: grid;
  gap: 32px;
  align-items: start;
}

/* Sidebar is first in DOM → first column. In RTL it renders right. */
.dir-layout {
  grid-template-columns: 240px 1fr;
}

/* LTR: swap visual order so sidebar stays on the left */
[dir="ltr"] .dir-sidebar {
  order: -1;
}

/* ── Sidebar ───────────────────────────────────────── */
.dir-sidebar {
  position: sticky;
  top: calc(var(--header-height, 72px) + 16px);
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0,0,0,0.05);
}

.dir-sidebar-title {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  margin: 0 0 14px 0;
  padding: 0 8px;
  font-weight: 600;
}

.dir-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dir-sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #3d5a47;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: inherit;
}

.dir-sidebar-link:hover {
  background: rgba(20, 126, 73, 0.06);
  color: var(--green-3, #147E49);
}

.dir-sidebar-link.active {
  background: var(--green-3, #147E49);
  color: #fff;
  box-shadow: 0 2px 8px rgba(20, 126, 73, 0.2);
}

.dir-sidebar-name {
  flex: 1;
  line-height: 1.4;
  white-space: normal;
}

.dir-sidebar-count {
  min-width: 26px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 126, 73, 0.08);
  color: var(--green-3, #147E49);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.dir-sidebar-link.active .dir-sidebar-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* Dimmed state when searching globally */
.dir-sidebar-link.searching {
  opacity: 0.45;
  pointer-events: auto;
}

.dir-sidebar-link.searching:hover {
  opacity: 0.8;
}

/* ── Content area ──────────────────────────────────── */
.dir-content {
  min-height: 300px;
}

/* Loading spinner */
.dir-loading {
  display: flex;
  justify-content: center;
  padding: 80px 0;
}

.dir-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(0, 0, 0, 0.08);
  border-top-color: var(--orange, #d6b46d);
  border-radius: 50%;
  animation: dir-spin 0.8s linear infinite;
}

@keyframes dir-spin {
  to { transform: rotate(360deg); }
}

/* Empty state */
.dir-empty {
  text-align: center;
  padding: 64px 24px;
  max-width: 400px;
  margin: 0 auto;
}

.dir-empty svg {
  width: 48px;
  height: 48px;
  color: #c4cfc8;
  margin: 0 auto 16px;
  display: block;
}

.dir-empty h3 {
  font-size: 1.1rem;
  color: #6b7280;
  font-weight: 500;
}

/* ── Card Grid ─────────────────────────────────────── */
.dir-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
/* ── Masonry layout for search results (positions set by JS) */
.dir-card-grid.dir-card-grid-search {
  position: relative;
}
/* JS masonry sets absolute position & width per card */
.dir-card-grid.dir-card-grid-search .dir-card,
.dir-card-grid.dir-card-grid-search .dir-card.dir-card-multi {
  flex: none;
}

/* ── Individual Card ───────────────────────────────── */
.dir-card {
  background: #fff;
  border-radius: 14px;
  padding: 24px 16px 20px;
  text-align: center;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
}
/* Bio-enabled cards are clickable */
.dir-card.dir-card-bio {
  cursor: pointer;
}
.dir-card.dir-card-bio:hover {
  box-shadow: 0 6px 24px rgba(20, 126, 73, 0.15);
  border-color: rgba(20, 126, 73, 0.2);
  transform: translateY(-2px);
}
.dir-card {
  /* Flexbox layout for fixed-bottom date */
  display: flex;
  flex-direction: column;

  /* Entrance animation */
  opacity: 0;
  transform: translateY(16px);
}

.dir-card.visible {
  animation: dir-card-in 0.4s ease forwards;
}

@keyframes dir-card-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dir-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(20, 126, 73, 0.1);
  border-color: rgba(20, 126, 73, 0.15);
}

/* Certificate Number — prominent center */
.dir-card-certnum {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--green-3, #147E49);
  margin-bottom: 10px;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* Name — vertically centered */
.dir-card-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a2b1f;
  line-height: 1.4;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Date — fixed at bottom */
.dir-card-date {
  font-size: 0.8rem;
  color: #9ca3af;
  font-weight: 400;
  margin-top: auto;
  padding-top: 6px;
}

/* Category badge (only during search) */
.dir-card-category {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  /* default fallback */
  background: rgba(20, 126, 73, 0.10);
  color: #147E49;
}

/* ── Per-category badge colours ─────────────────────── */
/* Memorization License — deep gold */
.dir-card-category[data-cat-id="hifz-license"] {
  background: rgba(180, 120, 0, 0.10);
  color: #9a6500;
}

/* Recitation License — teal green */
.dir-card-category[data-cat-id="recitation-license"] {
  background: rgba(13, 116, 80, 0.10);
  color: #0d7450;
}

/* Tajweed Theory — indigo/purple */
.dir-card-category[data-cat-id="tajweed-theory"] {
  background: rgba(99, 60, 180, 0.10);
  color: #5b35a8;
}

/* Tuhfat al-Atfal — rose */
.dir-card-category[data-cat-id="tuhfat-alatfal"] {
  background: rgba(190, 40, 80, 0.10);
  color: #b01f4a;
}

/* Noorani Qaida — sky blue */
.dir-card-category[data-cat-id="noorani-qaida"] {
  background: rgba(14, 110, 200, 0.10);
  color: #0b5ea8;
}

/* Muqaddimah Jazariyyah — warm amber/orange */
.dir-card-category[data-cat-id="muqaddimah-jazariyyah"] {
  background: rgba(200, 100, 10, 0.10);
  color: #b35500;
}

/* Adhan & Iqamah — slate teal */
.dir-card-category[data-cat-id="adhan-iqamah"] {
  background: rgba(10, 130, 140, 0.10);
  color: #0a7a85;
}

/* The Ten Qira'at — rich gold */
.dir-card-category[data-cat-id="ten-qiraat"] {
  background: rgba(212, 175, 55, 0.15);
  color: #a67c00;
}

/* Grouped card adjustments for search */
.dir-card.dir-card-grouped {
  justify-content: flex-start;
  padding-bottom: 24px;
}
.dir-card.dir-card-grouped .dir-card-name {
  flex: none;
  font-size: 1.1rem;
  color: var(--green-3, #147E49);
  margin-bottom: 16px;
  align-items: flex-start;
  justify-content: center;
}
.dir-card-certs-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 100%;
}
/* Grouped card: use normal category badge styles */
.dir-card.dir-card-grouped .dir-card-category {
  margin-top: 0;
  flex: 0 1 auto;
  max-width: 100%;
  white-space: normal;
  text-align: center;
  word-break: break-word;
}

/* ── Mobile: search results responsive layout ──────── */
@media (max-width: 560px) {
  /* Switch search grid back to normal CSS grid on mobile */
  .dir-card-grid.dir-card-grid-search {
    display: grid;
    grid-template-columns: 1fr;
    position: static !important;
    height: auto !important;
    gap: 12px;
  }

  /* Reset any absolute positions JS masonry may have set */
  .dir-card-grid.dir-card-grid-search .dir-card {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
  }

  /* Make badges wrap and shrink gracefully */
  .dir-card-certs-list {
    flex-wrap: wrap;
    gap: 6px;
  }

  .dir-card-category {
    white-space: normal;
    font-size: 0.68rem;
    padding: 3px 8px;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* Tighten card padding on mobile */
  .dir-card.dir-card-grouped {
    padding: 16px 12px 16px;
  }

  .dir-card.dir-card-grouped .dir-card-name {
    font-size: 1rem;
    margin-bottom: 10px;
  }
}

/* ── Biography Modal ───────────────────────────────── */
.dir-bio-modal {
  border: none;
  border-radius: 20px;
  padding: 0;
  max-width: 520px;
  width: calc(100% - 32px);
  background: #fff;
  box-shadow: 0 24px 64px rgba(0,0,0,0.18);
  /* Cap height so content doesn't overflow the viewport */
  max-height: 90dvh;
  max-height: 90vh; /* fallback */
  overflow: hidden;
  animation: bioModalIn 0.28s cubic-bezier(.22,.68,0,1.2) both;
}
/* Inner card handles the flex layout so close btn + photo + body stack correctly */
.dir-bio-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 90dvh;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
}
@keyframes bioModalIn {
  from { opacity: 0; transform: scale(0.92) translateY(16px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}
.dir-bio-modal::backdrop {
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
}
/* Close button */
.dir-bio-close {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  width: 34px; height: 34px;
  border: none; border-radius: 50%;
  background: rgba(255,255,255,0.18);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s;
  z-index: 1;
}
.dir-bio-close:hover { background: rgba(255,255,255,0.32); }
.dir-bio-close svg { width: 18px; height: 18px; }
/* Photo (optional) */
.dir-bio-photo-wrap {
  background: linear-gradient(135deg, #147E49 0%, #0d5c35 100%);
  padding: 32px 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.dir-bio-photo-wrap.dir-is-clickable img {
  cursor: pointer;
}
.dir-bio-photo {
  width: 110px; height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,0.35);
  box-shadow: 0 8px 24px rgba(0,0,0,0.22);
  transition: transform 0.3s cubic-bezier(.22,.68,0,1.2);
}

/* ── Fullscreen Photo Modal ────────────────────────── */
.dir-fullscreen-modal {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 95vw;
  max-height: 95vh;
  margin: auto;
  overflow: visible;
  outline: none;
}
.dir-fullscreen-modal::backdrop {
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
}
.dir-fs-photo {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.4);
  background: #fff;
  display: block;
  margin: auto;
}
.dir-fs-close {
  position: absolute;
  top: -48px;
  inset-inline-end: 0;
  width: 40px; height: 40px;
  border: none; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.dir-fs-close:hover {
  background: rgba(255,255,255,0.4);
}
.dir-fs-close svg {
  width: 22px; height: 22px;
}

/* No-photo header strip */
.dir-bio-header-strip {
  background: linear-gradient(135deg, #147E49 0%, #0d5c35 100%);
  padding: 28px 24px 20px;
}
/* Photo header never shrinks */
.dir-bio-photo-wrap {
  flex-shrink: 0;
}
/* Body */
.dir-bio-body {
  padding: 20px 24px 24px;
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0; /* critical for flex children to scroll */
}
.dir-bio-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0d5c35;
  margin: 0 0 16px;
  text-align: center;
}
/* Info rows (birthDate, job, degree) */
.dir-bio-info {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}
.dir-bio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: #374151;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f8faf9;
}
.dir-bio-row-icon {
  width: 20px; height: 20px;
  color: #147E49;
  flex-shrink: 0;
}
.dir-bio-row-label {
  font-weight: 600;
  color: #6b7280;
  min-width: 70px;
  flex-shrink: 0;
}
.dir-bio-row > span:last-child {
  margin-inline-start: auto;
  text-align: end;
}
/* Certs section */
.dir-bio-certs-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  margin-bottom: 8px;
}
.dir-bio-cert-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #f8faf9;
  margin-bottom: 6px;
  font-size: 0.85rem;
}
.dir-bio-cert-name {
  font-weight: 600;
  color: #111827;
}
.dir-bio-cert-date {
  font-size: 0.78rem;
  color: #9ca3af;
  white-space: nowrap;
}
.dir-bio-cert-num {
  font-size: 0.72rem;
  background: rgba(20,126,73,0.1);
  color: #147E49;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}
/* ── Mobile Drawer & FAB ───────────────────────────── */
.dir-fab {
  display: none; /* hidden on desktop */
}

.dir-drawer-overlay {
  display: none;
}

@media (max-width: 860px) {
  /* 1. Floating Action Button */
  .dir-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 24px;
    inset-inline-start: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--green-3, #147E49);
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(20, 126, 73, 0.35);
    z-index: 900;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  .dir-fab:active {
    transform: scale(0.92);
  }
  
  .dir-fab svg {
    width: 24px;
    height: 24px;
  }
  
  /* Hide the filter button when the main hamburger menu is open */
  body.drawer-open .dir-fab {
    display: none !important;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
  }
  

  /* 2. Drawer Overlay */
  .dir-drawer-overlay {
    display: block;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 950;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }
  
  .dir-drawer-overlay.show {
    opacity: 1;
    visibility: visible;
  }

  /* 3. Slide-out Drawer (converted sidebar) */
  .dir-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 0 24px rgba(0,0,0,0.15);
    margin: 0; /* remove sticky margins */
    border-radius: 0; /* flat edges */
    overflow-y: auto;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.35s;
    visibility: hidden; /* Prevent focus when closed */
  }
  
  .dir-sidebar.drawer-open {
    visibility: visible;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0s;
    transform: translateX(0) !important;
  }
  
  /* Slide from left in LTR (English) */
  [dir="ltr"] .dir-sidebar,
  :not([dir]) .dir-sidebar {
    right: auto;
    left: 0;
    transform: translateX(-100%);
  }
  
  /* Slide from right in RTL (Kurdish/Arabic) */
  [dir="rtl"] .dir-sidebar {
    left: auto;
    right: 0;
    transform: translateX(100%);
  }

  /* Single column layout for content */
  .dir-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .dir-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }
  .dir-card-grid.dir-card-grid-search {
    gap: 12px;
  }
  .dir-card-grid.dir-card-grid-search .dir-card {
    flex: 0 0 150px;
  }
  .dir-card-grid.dir-card-grid-search .dir-card.dir-card-multi {
    flex: 0 0 260px;
  }
}

/* Small screens */
@media (max-width: 480px) {
  .dir-header h1 {
    font-size: 1.7rem;
  }

  .dir-header p {
    font-size: 0.92rem;
  }

  .dir-card {
    padding: 18px 12px 16px;
  }

  .dir-card-certnum {
    font-size: 1.3rem;
  }

  .dir-card-name {
    font-size: 0.85rem;
  }
}

/* Video item in gallery — same size as photos, play badge on top */
.modal-gallery-item--video {
  position: relative;
}

.gallery-play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.gallery-play-badge svg {
  width: 44px;
  height: 44px;
  color: #fff;
  background: var(--color-green-1);
  border-radius: 50%;
  padding: 10px 9px 10px 12px;
  transition: transform 0.15s, background 0.2s;
}

.modal-gallery-item--video:hover .gallery-play-badge svg {
  background: var(--color-green-2);
  transform: scale(1.08);
}

/* Video player component */
.nhc-video-player {
  position: relative;
  background: #000;
  overflow: hidden;
  display: block;
  line-height: 0;
}

.nhc-video-el {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nhc-video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.nhc-big-play {
  background: var(--color-green-1);
  border: none;
  border-radius: 50%;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: background 0.2s, transform 0.15s;
}

.nhc-big-play:hover {
  background: var(--color-green-2);
  transform: scale(1.1);
}

.nhc-big-play svg {
  width: 28px;
  height: 28px;
  /* nudge right to optically centre the asymmetric play triangle */
  transform: translateX(2px);
}

.nhc-video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 12px 10px;
  background: linear-gradient(transparent, rgba(11, 26, 18, 0.88));
  transition: opacity 0.3s;
  opacity: 0;
}

.nhc-progress {
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  cursor: pointer;
  margin-bottom: 8px;
  position: relative;
}

.nhc-progress-fill {
  height: 100%;
  background: var(--color-green-1);
  border-radius: 2px;
  width: 0;
  pointer-events: none;
}

.nhc-ctrl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nhc-ctrl-left,
.nhc-ctrl-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nhc-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  transition: opacity 0.15s;
}

.nhc-btn:hover {
  opacity: 1;
}

.nhc-btn svg {
  width: 20px;
  height: 20px;
}

.nhc-time {
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-family: monospace;
  white-space: nowrap;
  line-height: 1;
}

.nhc-volume {
  width: 70px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  outline: none;
}

.nhc-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.nhc-volume::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: none;
}

@media (max-width: 540px) {
  .nhc-volume { display: none; }
}

/* Lightbox video slide */
.lightbox-slide--video .lightbox-slide-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.lightbox-slide--video .nhc-video-player {
  width: min(92vw, calc(82vh * 16 / 9));
  aspect-ratio: 16 / 9;
  max-height: 82vh;
  margin: 0;
  border-radius: var(--radius-md);
}

.lightbox-video {
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  display: block;
  background: #000;
  outline: none;
}

