/* Google Fonts now loaded via <link> tags in HTML <head> for non-render-blocking delivery */

:root {
  --gold: #a18839;
  --sand: #efc683;
  --blue: #2d77b4;
  --navy: #383267;
  --teal: #76c7c8;
  --coral: #ea5463;
  --cream: #ebe9df;
  --black: #000000;
  --white: #ffffff;
  --bg: #f7f5ef;
  --text-dark: #1a1a2e;
  --text-mid: #4a4a6a;
  --shadow-soft: 0 4px 24px rgba(56,50,103,0.10);
  --shadow-card: 0 8px 40px rgba(56,50,103,0.13);
  --radius: 16px;
  --radius-sm: 8px;
  --navy-dark: #2a2060;
  --gold-dark: #8a7230;
  --pending: #cccccc;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Cairo', sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  direction: rtl;
  overflow-x: hidden;
  line-height: 1.7;
}

body.ltr {
  direction: ltr;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--navy); border-radius: 3px; }

/* ── Typography ── */
h1, h2, h3, h4, h5 {
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  line-height: 1.3;
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(56,50,103,0.08);
  padding: 0 2rem;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  box-shadow: var(--shadow-soft);
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo img {
  height: 48px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-mid);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

/* All top-level nav items always show the pill background */
.nav-links > li > a {
  background: rgba(56,50,103,0.06);
}

.nav-links a:hover, .nav-links a.active,
.nav-links > li > a:hover, .nav-links > li > a.active {
  color: var(--navy);
  background: rgba(56,50,103,0.12);
}

.nav-lang {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-lang {
  padding: 6px 14px;
  border-radius: 20px;
  border: 2px solid var(--navy);
  background: transparent;
  color: var(--navy);
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-lang:hover {
  background: var(--navy);
  color: white;
}

.nav-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ── Hero Section ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 72px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 40%, var(--blue) 100%);
  z-index: 0;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
}

.hero-text h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  color: white;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-text h1 span {
  color: var(--sand);
}

.hero-text p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.82);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  padding: 14px 32px;
  background: var(--gold);
  color: white;
  border: none;
  border-radius: 50px;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(161,136,57,0.4);
}

.btn-primary:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(161,136,57,0.5);
}

.btn-secondary {
  padding: 14px 32px;
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 50px;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  border-color: white;
  background: rgba(255,255,255,0.1);
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-image-wrap {
  width: 380px;
  height: 380px;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid var(--gold);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Gold ring glow for the main hero portrait */
.hero-image .hero-image-wrap {
  box-shadow:
    0 0 0 10px rgba(161,136,57,.18),
    0 0 0 20px rgba(161,136,57,.08),
    0 20px 60px rgba(0,0,0,.4);
}

/* Decorative gold accent line on hero h1 */
.hero-text h1::after {
  content: '';
  display: block;
  width: 64px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--sand));
  border-radius: 2px;
  margin-top: .8rem;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
  animation: bounce 2s infinite;
}

.hero-scroll svg {
  width: 20px;
  height: 20px;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ── Stats Bar ── */
.stats-bar {
  background: white;
  padding: 2rem;
  box-shadow: var(--shadow-soft);
}

.stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item h3 {
  font-size: 2.2rem;
  color: var(--navy);
  font-weight: 900;
}

.stat-item p {
  font-size: 0.9rem;
  color: var(--text-mid);
  margin-top: 4px;
}

/* ── Section Base ── */
.section {
  padding: 5rem 2rem;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  display: inline-block;
  background: rgba(56,50,103,0.1);
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.section-header h2 span {
  color: var(--navy);
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-mid);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.8;
}

.divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--sand));
  border-radius: 2px;
  margin: 1rem auto 0;
}

/* ── About Section ── */
.about-section {
  background: white;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text h2 {
  font-size: 2.2rem;
  color: var(--navy);
  margin-bottom: 1.5rem;
}

.about-text p {
  color: var(--text-mid);
  line-height: 1.9;
  margin-bottom: 1.2rem;
}

.about-pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.pillar-card {
  background: var(--bg);
  padding: 1.2rem;
  border-radius: var(--radius-sm);
  border-right: 3px solid var(--gold);
}

.pillar-card h4 {
  font-size: 0.95rem;
  color: var(--navy);
  margin-bottom: 4px;
}

.pillar-card p {
  font-size: 0.85rem;
  color: var(--text-mid);
  margin: 0;
}

.about-visual {
  position: relative;
}

.about-logo-wrap {
  background: linear-gradient(135deg, var(--navy), var(--blue));
  border-radius: 24px;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  gap: 1.5rem;
  box-shadow: var(--shadow-card);
}

.about-logo-wrap img {
  max-width: 200px;
  filter: brightness(0) invert(1);
}

.about-logo-wrap .qodwa-logo {
  max-width: 140px;
  filter: none;
  border-radius: 50%;
  object-fit: contain;
  background: white;
  border-radius: 12px;
  padding: 1rem;
}

/* ── Projects Section ── */
.projects-section {
  background: var(--bg);
}

.project-feature {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  min-height: 420px;
}

.project-feature-visual {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.project-feature-visual img {
  max-width: 180px;
}

.project-feature-visual .tagline {
  color: rgba(255,255,255,0.8);
  text-align: center;
  font-size: 0.95rem;
}

.project-feature-content {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-feature-content h3 {
  font-size: 1.8rem;
  color: var(--navy);
  margin-bottom: 1rem;
}

.project-feature-content p {
  color: var(--text-mid);
  line-height: 1.9;
  margin-bottom: 1.5rem;
}

.project-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.project-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-mid);
  font-size: 0.95rem;
}

.project-features-list li::before {
  content: '✦';
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Persons / Qodwa Grid ── */
.persons-section {
  background: white;
}

.persons-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 20px;
  border: 2px solid var(--cream);
  background: var(--cream);
  color: var(--text-mid);
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}

.persons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
}

.person-card {
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  padding: 1.5rem 1rem 1rem;
}

.person-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  background: white;
}

.person-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1rem;
  border: 3px solid var(--cream);
  transition: border-color 0.3s;
}

.person-card:hover .person-avatar {
  border-color: var(--gold);
}

.person-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(20%);
}

.person-card h4 {
  font-size: 0.9rem;
  color: var(--text-dark);
  margin-bottom: 4px;
  line-height: 1.4;
}

.person-card .person-field {
  font-size: 0.78rem;
  color: var(--text-mid);
}

.person-card .person-era {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(56,50,103,0.08);
  color: var(--navy);
}

/* ── Activities Section ── */
.activities-section {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: white;
}

.activities-section .section-tag {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
}

.activities-section .section-header h2 {
  color: white;
}

.activities-section .section-header p {
  color: rgba(255,255,255,0.7);
}

.activities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* 2-column variant — tablet/mobile breakpoints still apply via .activities-grid rules */
.activities-grid--2col {
  grid-template-columns: repeat(2, 1fr);
}

.activity-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.activity-card:hover {
  background: rgba(255,255,255,0.14);
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.25);
}

/* Light variant — for cards on white or --bg backgrounds */
.activity-card--light {
  background: white;
  border: 1.5px solid var(--gray-200, #e8e8e8);
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  backdrop-filter: none;
}
.activity-card--light:hover {
  background: white;
  border-color: var(--gold);
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
}
/* Double-class specificity (0,2,1) beats .activity-card h3 (0,1,1) — no !important needed.
   Inline styles on dark-section Vorstand cards still win over this class rule. */
.activity-card.activity-card--light h3 { color: var(--navy, #383267); }
.activity-card.activity-card--light p  { color: var(--gray-700, #444); }

.activity-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.2rem;
}

.activity-card h3 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}

.activity-card p {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ── Contact Section ── */
.contact-section {
  background: var(--bg);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.6rem;
  color: var(--navy);
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--text-mid);
  line-height: 1.9;
  margin-bottom: 2rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.contact-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--navy);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.contact-item-text strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-mid);
}

.contact-item-text span {
  color: var(--text-dark);
  font-size: 0.95rem;
}

.contact-form {
  background: white;
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-card);
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--cream);
  border-radius: var(--radius-sm);
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--bg);
  transition: border-color 0.2s ease;
  outline: none;
  direction: rtl;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--navy);
  background: white;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ── Footer ── */
.footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.7);
  padding: 3rem 2rem 1.5rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand img {
  height: 52px;
  filter: brightness(0) invert(1);
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.7;
}

.footer-col h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: 1.2rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col ul li a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: var(--sand);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: .6rem;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .9rem;
  justify-content: center;
}

.footer-legal a, .footer-legal button {
  color: rgba(255,255,255,.45);
  text-decoration: none;
  font-size: .78rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  transition: color .2s;
}

.footer-legal a:hover, .footer-legal button:hover { color: var(--sand); }

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

.social-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.social-btn:hover {
  background: var(--navy);
}

/* ── Person Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: white;
  border-radius: 24px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  border-radius: 24px 24px 0 0;
  color: white;
}

.modal-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,0.3);
  flex-shrink: 0;
}

.modal-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-title h2 {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.modal-title p {
  font-size: 0.9rem;
  opacity: 0.75;
}

.modal-body {
  padding: 2rem;
}

.modal-bio {
  color: var(--text-mid);
  line-height: 1.9;
  font-size: 0.95rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.modal-close:hover {
  background: rgba(255,255,255,0.35);
}

.modal-footer {
  padding: 0 2rem 1.8rem;
  display: flex;
  justify-content: flex-end;
}

.modal-read-more {
  font-size: 0.9rem;
  padding: 10px 24px;
  text-decoration: none;
}


/* ── Responsive ── */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .activities-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hero-content { grid-template-columns: 1fr; text-align: center; }
  .hero-image { display: none; }
  .hero-actions { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; }
  .about-visual { display: none; }
  .project-feature { grid-template-columns: 1fr; }
  .project-feature-visual { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .activities-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .nav-links { display: none; }
  .nav-links.open { 
    display: flex; 
    flex-direction: column; 
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: white;
    padding: 1rem;
    box-shadow: var(--shadow-card);
    border-top: 1px solid var(--cream);
  }
  .nav-menu-toggle { display: flex; }
  .persons-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .about-pillars { grid-template-columns: 1fr; }
}

/* ── Animations ── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* ── Page specific ── */
.page-hero {
  padding: 8rem 2rem 4rem;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: white;
  text-align: center;
}

.page-hero h1 { font-size: 2.5rem; color: white; margin-bottom: 1rem; }
.page-hero p { font-size: 1.1rem; color: rgba(255,255,255,0.75); max-width: 600px; margin: 0 auto; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

.breadcrumb a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--sand);
}

/* ── Qodwa Dropdown ── */
.nav-item { position: relative; }
.nav-item:hover .dropdown, .nav-item.open .dropdown { opacity:1; visibility:visible; transform:translateY(0); }
.nav-item > a .arrow { font-size:.65rem; margin-right:4px; transition:transform .2s; display:inline-block; }
.nav-item:hover > a .arrow { transform:rotate(180deg); }
.dropdown { position:absolute; top:calc(100% + 8px); right:0; background:white; border-radius:12px; box-shadow:0 8px 40px rgba(56,50,103,.18); padding:.5rem; min-width:230px; z-index:500; opacity:0; visibility:hidden; transform:translateY(-8px); transition:all .22s ease; border:1px solid rgba(56,50,103,.07); }
.dropdown li { list-style:none; }
.dropdown li a { display:block; padding:9px 14px; color:var(--text-mid) !important; font-size:.85rem !important; font-weight:600 !important; border-radius:8px; text-decoration:none; transition:background .15s,color .15s; }
.dropdown li a:hover, .dropdown li a.active { background:rgba(56,50,103,.08) !important; color:var(--navy) !important; }
.dropdown-sep { height:1px; background:var(--cream); margin:4px 8px; }
/* Qodwa page hero update (smaller for subpages) */
.page-hero-sm { padding:5rem 2rem 2.5rem; background:linear-gradient(135deg,var(--navy),var(--blue)); color:white; text-align:center; }
.page-hero-sm h1 { font-size:2rem; color:white; margin-bottom:.7rem; }
.page-hero-sm p { font-size:.95rem; color:rgba(255,255,255,.75); max-width:560px; margin:0 auto; }
/* Timeline horizontal */
.tl-bar { position:relative; padding:2.5rem 0 1rem; overflow:hidden; }
.tl-bar::before { content:''; position:absolute; top:1.6rem; right:0; left:0; height:3px; background:var(--cream); z-index:0; }
.tl-steps { display:flex; justify-content:space-between; position:relative; z-index:1; gap:.5rem; }
.tl-step { flex:1; display:flex; flex-direction:column; align-items:center; text-align:center; }
.tl-dot { width:1.3rem; height:1.3rem; border-radius:50%; background:white; border:3px solid var(--pending); margin-bottom:.9rem; flex-shrink:0; }
.tl-step.done .tl-dot { background:var(--gold); border-color:var(--gold); }
.tl-step.active .tl-dot { background:var(--navy); border-color:var(--navy); box-shadow:0 0 0 4px rgba(56,50,103,.15); }
.tl-step h4 { font-size:.8rem; color:var(--navy); font-weight:700; margin-bottom:.25rem; line-height:1.35; }
.tl-step p { font-size:.72rem; color:var(--text-mid); }
/* ── Person Biography Pages ── */
.person-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  padding: 120px 2rem 60px;
  color: white;
  position: relative;
  overflow: hidden;
}
.person-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-bg, transparent) center/cover no-repeat;
  opacity: 0.08;
}
.person-hero-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  position: relative;
}
.person-hero-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(255,255,255,0.3);
  flex-shrink: 0;
  background: rgba(255,255,255,0.1);
}
.person-hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.person-hero-info h1 { font-size: 2.2rem; margin-bottom: 0.4rem; }
.person-hero-info h1 span { color: var(--sand); }
.person-hero-meta { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.8rem; }
.meta-badge { background: rgba(255,255,255,0.15); padding: 4px 14px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }
.person-hero .breadcrumb { margin-top: 1.2rem; font-size: 0.85rem; opacity: 0.7; justify-content: flex-start; }
.person-hero .breadcrumb a { color: white; text-decoration: none; }
.person-hero .breadcrumb span { margin: 0 6px; }

.person-content { max-width: 900px; margin: 0 auto; padding: 3rem 2rem; }
.content-section { margin-bottom: 3rem; }
.content-section h2 {
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 3px solid var(--gold);
  display: inline-block;
}
.bio-text { color: var(--text-mid); line-height: 2; font-size: 1rem; }
.achievements-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 0.5rem; }
.achievement-item {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  border-right: 4px solid var(--teal);
  color: var(--text-mid);
  line-height: 1.85;
  font-size: 0.95rem;
}
.achievement-item strong { color: var(--navy); display: block; margin-bottom: 0.3rem; font-size: 1rem; }
.quote-box {
  background: linear-gradient(135deg, var(--navy), var(--blue));
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  color: white;
  position: relative;
}
.quote-box::before { content: '❝'; font-size: 4rem; opacity: 0.15; position: absolute; top: 0.5rem; right: 1.5rem; line-height: 1; }
.quote-text { font-size: 1.05rem; line-height: 1.9; margin-bottom: 0.8rem; }
.quote-source { font-size: 0.85rem; opacity: 0.75; font-weight: 600; }
.sources-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.sources-list li { display: flex; align-items: center; gap: 0.6rem; }
.sources-list li::before { content: '🔗'; font-size: 0.9rem; flex-shrink: 0; }
.sources-list a { color: var(--blue); text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: color 0.2s; }
.sources-list a:hover { color: var(--navy); text-decoration: underline; }
.back-btn { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--navy); font-weight: 700; text-decoration: none; margin-bottom: 2rem; font-size: 0.95rem; transition: gap 0.2s; }
.back-btn:hover { gap: 0.8rem; }
@media (max-width: 768px) {
  .person-hero-inner { flex-direction: column; text-align: center; gap: 1.5rem; }
  .person-hero-meta { justify-content: center; }
  .person-hero .breadcrumb { justify-content: center; }
}

/* Compensation table */
.comp-table { width:100%; border-collapse:collapse; }
.comp-table th, .comp-table td { padding:.9rem 1.2rem; border-bottom:1px solid var(--cream); text-align:right; }
.comp-table th { background:var(--bg); font-weight:700; color:var(--navy); font-size:.88rem; }
.comp-table tr:first-child td { background:rgba(239,198,131,.25); font-weight:700; color:var(--navy); }
.comp-table td:last-child { color:var(--gold); font-weight:700; }
.comp-table tr:hover td { background:#fafaf8; }
/* FAQ accordion */
.faq-item { background:white; border-radius:10px; margin-bottom:.8rem; border:1px solid var(--cream); overflow:hidden; }
.faq-q { padding:1.1rem 1.4rem; cursor:pointer; display:flex; justify-content:space-between; align-items:center; font-weight:700; color:var(--navy); font-size:.93rem; user-select:none; }
.faq-q .arr { font-size:.75rem; transition:transform .25s; color:var(--gold); }
.faq-item.open .faq-q .arr { transform:rotate(180deg); }
.faq-a { max-height:0; overflow:hidden; transition:max-height .3s ease; }
.faq-item.open .faq-a { max-height:400px; }
.faq-a p { padding:.2rem 1.4rem 1.2rem; color:var(--text-mid); line-height:1.85; font-size:.9rem; }
@media(max-width:768px){
  .tl-steps { flex-direction:column; align-items:flex-start; gap:1.5rem; }
  .tl-bar::before { top:0; right:1rem; left:auto; width:3px; height:100%; }
  .tl-step { flex-direction:row; gap:1rem; text-align:right; }
  .tl-dot { margin-bottom:0; flex-shrink:0; }
}

/* ── Hero Buttons (German pages + general use) ── */
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 28px;
  background: var(--gold);
  color: white;
  border: 2px solid transparent;
  border-radius: 8px;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: .92rem;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .2s, transform .15s;
  white-space: nowrap;
}
.hero-btn:hover { opacity: .85; transform: translateY(-1px); color: white; text-decoration: none; }
.hero-btn:active { transform: scale(.97); }

.hero-btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,.6);
  color: white;
}
.hero-btn-outline:hover { background: rgba(255,255,255,.12); opacity: 1; }

/* ── Utility Classes ── */
.btn-lang-active { background: var(--navy); color: white; }
.footer-brand-tagline { margin-top: 0.8rem; }
.person-subtitle { opacity: 0.85; font-size: 1rem; }
.person-content-wrap { background: white; }
.contact-form-title { color: var(--navy); margin-bottom: 1.5rem; font-size: 1.4rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-modal-detail {
  display: inline-block;
  background: var(--navy);
  color: white;
  padding: 10px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
}
.section-cta { background: var(--cream); padding: 4rem 2rem; text-align: center; }
.cta-heading { font-size: 2.2rem; margin: 1rem 0; }
.cta-text { color: var(--text-mid); max-width: 560px; margin: 0 auto 2rem; line-height: 1.9; }
.hero-actions-center { justify-content: center; }
.btn-secondary-navy { color: var(--navy); border-color: var(--navy); }

/* ── Layout Utilities ── */
.section--bg { background: var(--bg); }
.section-narrow { max-width: 800px; margin: 0 auto; }
.section-md { max-width: 860px; margin: 0 auto; }
.cta-wrap { text-align: center; margin-top: 1.5rem; }
.text-navy { color: var(--navy); }
.link-inline { color: var(--blue); font-weight: 700; text-decoration: none; }
.link-inline:hover { text-decoration: underline; }
.text-body { color: var(--text-mid); line-height: 1.9; margin-bottom: 1rem; }
.section-h2 { font-size: 1.8rem; color: var(--navy); margin-bottom: 1.2rem; }
.section-h3 { color: var(--navy); font-size: 1.1rem; margin: 1.5rem 0 .8rem; }
.card-title { color: var(--navy); font-size: 1.1rem; margin-bottom: 1rem; display: flex; align-items: center; gap: .6rem; }

/* ── Hero Modifiers (Qodwa) ── */
.hero-content--qodwa { grid-template-columns: 1fr 220px; }
.hero-image-wrap--logo { width: 180px; height: 180px; }
.hero-image-wrap--logo img { object-fit: contain; padding: 1.5rem; background: rgba(255,255,255,0.08); }
.update-badge { display: inline-block; background: rgba(161,136,57,.85); color: white; padding: .55rem 1.5rem; border-radius: 50px; font-size: .83rem; font-weight: 700; margin-bottom: 1.4rem; border: 1px solid rgba(255,255,255,.25); letter-spacing: .3px; }

/* ── Output / Content Cards ── */
.outputs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; max-width: 860px; margin: 0 auto; }
.output-card { background: white; border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-soft); }
.icon-list { list-style: none; display: flex; flex-direction: column; gap: .7rem; }
.icon-list li { display: flex; gap: 8px; color: var(--text-mid); font-size: .9rem; }
.ic-gold { color: var(--gold); font-weight: 700; font-size: 1rem; flex-shrink: 0; }
.ic-teal { color: var(--teal); font-weight: 700; flex-shrink: 0; }

/* ── Explore Cards Grid ── */
.explore-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.explore-card { background: var(--bg); border-radius: 14px; padding: 1.5rem; border-bottom: 3px solid var(--gold); transition: box-shadow .2s; text-decoration: none; display: block; }
.explore-card:hover { box-shadow: var(--shadow-card); }
.explore-card h4 { color: var(--navy); margin-bottom: .4rem; }
.explore-card p { font-size: .84rem; color: var(--text-mid); margin-bottom: .5rem; }
.explore-card .more-link { color: var(--blue); font-size: .82rem; font-weight: 700; }
.explore-card--blue { border-bottom-color: var(--blue); }
.explore-card--teal { border-bottom-color: var(--teal); }
.explore-card--coral { border-bottom-color: var(--coral); }
.explore-card--navy { border-bottom-color: var(--navy); }

/* ── Timeline Detail Items ── */
.tl-detail-list { display: flex; flex-direction: column; gap: 1.2rem; margin-top: 2.5rem; }
.tl-detail-item { background: var(--bg); border-radius: 14px; padding: 1.5rem; border-right: 4px solid var(--cream); display: flex; gap: 1.2rem; align-items: flex-start; }
.tl-detail-item--done { border-right-color: var(--gold); }
.tl-detail-item--active { background: rgba(56,50,103,.05); border-right-color: var(--navy); }
.tl-detail-num { background: var(--pending); color: white; border-radius: 50%; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: .8rem; flex-shrink: 0; }
.tl-detail-num--done { background: var(--gold); }
.tl-detail-num--active { background: var(--navy); }
.tl-detail-body h4 { color: var(--navy); margin-bottom: .3rem; }
.tl-detail-body p { font-size: .88rem; color: var(--text-mid); }
.now-badge { background: var(--coral); color: white; font-size: .72rem; padding: 2px 10px; border-radius: 10px; margin-right: 8px; }

/* ── Authors Page ── */
.authors-layout { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3rem; align-items: start; }
.authors-note { margin-top: 1.5rem; padding: 1.2rem; background: rgba(56,50,103,.06); border-radius: 12px; }
.authors-note p { font-size: .86rem; color: var(--text-mid); line-height: 1.8; margin: 0; }

/* ── Responsive for qodwa classes ── */
@media (max-width: 768px) {
  .hero-content--qodwa { grid-template-columns: 1fr; }
  .outputs-grid { grid-template-columns: 1fr; }
  .explore-grid { grid-template-columns: 1fr 1fr; }
  .authors-layout { grid-template-columns: 1fr; }
}

/* ── Vision Cards ── */
.vision-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 3rem; }
.vision-card { background: white; border-radius: var(--radius); padding: 2rem; text-align: center; box-shadow: var(--shadow-soft); transition: transform .3s ease; }
.vision-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); }
.vision-icon { width: 72px; height: 72px; border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 2rem; margin: 0 auto 1.2rem; }
.vision-icon--gold { background: rgba(161,136,57,.12); }
.vision-icon--teal { background: rgba(118,199,200,.15); }
.vision-icon--navy { background: rgba(56,50,103,.1); }
.vision-card h3 { font-size: 1.05rem; color: var(--navy); margin-bottom: .6rem; }
.vision-card p { font-size: .88rem; color: var(--text-mid); line-height: 1.85; }

/* ── Library Section ── */
.library-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.library-card { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); transition: transform .3s ease, box-shadow .3s ease; display: flex; flex-direction: column; }
.library-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card); }
.library-card-visual { height: 160px; display: flex; align-items: center; justify-content: center; font-size: 3.5rem; position: relative; overflow: hidden; }
.library-card-visual--blue { background: linear-gradient(135deg, var(--blue), var(--teal)); }
.library-card-visual--gold { background: linear-gradient(135deg, var(--gold), var(--sand)); }
.library-card-visual--coral { background: linear-gradient(135deg, var(--coral), #f8a5ad); }
.library-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.library-card-body h3 { font-size: 1.15rem; color: var(--navy); margin-bottom: .4rem; }
.library-card-body p { font-size: .87rem; color: var(--text-mid); line-height: 1.75; flex: 1; margin-bottom: .8rem; }
.library-card-meta { display: inline-flex; align-items: center; gap: 6px; background: rgba(56,50,103,.07); color: var(--navy); font-size: .8rem; font-weight: 700; padding: 4px 12px; border-radius: 20px; }
.app-download-box { background: linear-gradient(135deg, var(--navy), var(--blue)); border-radius: var(--radius); padding: 2rem; text-align: center; margin-top: 2rem; }
.app-download-box h3 { color: white; margin-bottom: .4rem; font-size: 1.1rem; }
.app-download-box p { color: rgba(255,255,255,.75); font-size: .88rem; margin-bottom: 1.3rem; }
.app-badges { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.app-badge img { height: 46px; width: auto; border-radius: 8px; transition: opacity .2s; }
.app-badge:hover img { opacity: .82; }

/* ── Achievements Grid ── */
.achievements-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.achievement-card { text-align: center; padding: 1.5rem 1rem; background: white; border-radius: var(--radius); border-top: 3px solid var(--gold); box-shadow: var(--shadow-soft); }
.achievement-card:nth-child(4n+2) { border-top-color: var(--teal); }
.achievement-card:nth-child(4n+3) { border-top-color: var(--blue); }
.achievement-card:nth-child(4n+4) { border-top-color: var(--coral); }
.ach-num { font-size: 2.2rem; font-weight: 900; color: var(--navy); line-height: 1.1; }
.ach-suffix { color: var(--gold); font-size: 1rem; font-weight: 700; }
.ach-label { font-size: .8rem; color: var(--text-mid); margin-top: .5rem; line-height: 1.5; }

/* ── Mustafa Mahmoud Tribute ── */
.tribute-section { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%); }
.tribute-grid { display: grid; grid-template-columns: 260px 1fr; gap: 4rem; align-items: center; }
.tribute-img { border-radius: var(--radius); overflow: hidden; background: rgba(255,255,255,.06); }
.tribute-img img { width: 100%; display: block; }
.tribute-content { color: white; }
.tribute-tag { display: inline-block; background: rgba(239,198,131,.15); color: var(--sand); font-size: .8rem; font-weight: 700; padding: 6px 16px; border-radius: 20px; margin-bottom: 1.2rem; letter-spacing: .04em; }
.tribute-quote { border-right: 3px solid var(--gold); padding-right: 1.5rem; margin-bottom: 1.5rem; }
.tribute-quote blockquote { font-size: 1.3rem; line-height: 1.9; color: var(--sand); font-weight: 700; margin: 0; }
.tribute-name { font-size: 1.3rem; font-weight: 900; color: white; margin-bottom: .5rem; }
.tribute-text { color: rgba(255,255,255,.72); font-size: .92rem; line-height: 1.9; }

/* ── Partners ── */
.partners-section { background: var(--bg); }
.partners-grid { display: flex; gap: 3.5rem; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 2rem; }
.partner-logo img { height: 60px; width: auto; max-width: 160px; object-fit: contain; filter: grayscale(20%); opacity: .7; transition: all .25s ease; }
.partner-logo:hover img { filter: none; opacity: 1; }

/* ── Responsive for homepage sections ── */
@media (max-width: 1024px) {
  .library-grid { grid-template-columns: 1fr 1fr; }
  .achievements-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .vision-grid { grid-template-columns: 1fr; }
  .library-grid { grid-template-columns: 1fr; }
  .achievements-grid { grid-template-columns: repeat(2, 1fr); }
  .tribute-grid { grid-template-columns: 1fr; }
  .tribute-img { max-width: 220px; margin: 0 auto; }
}

/* ── Awards Grid (compensation.html) ── */
.awards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  margin-top: 3rem;
}
.award-card {
  background: white;
  border-radius: 16px;
  padding: 2.6rem 1.5rem 1.8rem;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-soft);
  border-top: 3px solid var(--cream);
  transition: transform .25s ease, box-shadow .25s ease;
}
.award-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); }
.award-card--gold   { border-top-color: var(--gold); }
.award-card--silver { border-top-color: #9e9e9e; }
.award-card--bronze { border-top-color: #c97a3a; }
.award-card--last {
  /* sits naturally in its grid cell like other cards */
}
.award-rank-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: white;
  font-size: .75rem;
  font-weight: 800;
  padding: 5px 18px;
  border-radius: 30px;
  white-space: nowrap;
  letter-spacing: .04em;
}
.award-rank-badge--gold { background: linear-gradient(135deg, var(--gold), var(--sand)); }
.award-icon  { font-size: 3rem; line-height: 1; margin-bottom: .9rem; }
.award-amount { font-size: 2.4rem; font-weight: 900; color: var(--navy); line-height: 1.1; }
.award-sublabel { font-size: .82rem; color: var(--text-mid); margin-top: .35rem; }
.award-note {
  background: var(--navy);
  border-radius: 14px;
  padding: 1.4rem 2rem;
  margin-top: 2rem;
  color: rgba(255,255,255,.82);
  font-size: .88rem;
  line-height: 1.9;
}
.award-note strong { color: var(--sand); }
.award-note a { color: var(--sand); text-decoration: underline; font-weight: 700; }
@media (max-width: 640px) {
  .awards-grid { grid-template-columns: 1fr; }
}

/* ── Authors Page — criteria & work lists ── */
.criteria-box {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  background: white;
  border: 1.5px solid var(--gold);
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
}
.criteria-box-text { flex: 1; }
.criteria-box-text strong { display: block; color: var(--navy); font-size: 1rem; margin-bottom: .4rem; }
.criteria-box-text p { font-size: .9rem; color: var(--text-mid); line-height: 1.75; margin: 0; }
.criteria-box-icon { font-size: 2rem; flex-shrink: 0; color: var(--gold); padding-top: .1rem; }
.authors-note { margin-top: 1.5rem; padding: 1.1rem 1.5rem; background: rgba(56,50,103,.06); border-radius: 12px; border-left: 4px solid var(--navy); }
.authors-note p { font-size: .88rem; color: var(--text-mid); line-height: 1.85; margin: 0; }
.bullet-list { list-style: disc; padding-right: 1.8rem; margin: 1.5rem 0; }
.bullet-list li { font-size: .9rem; color: var(--navy); line-height: 1.85; padding: .3rem 0; }
.bullet-list li::marker { color: var(--navy); }
.work-list { display: flex; flex-direction: column; gap: 1rem; margin: 1.5rem 0; }
.work-list-item { background: white; border-radius: 12px; padding: 1.2rem 1.5rem; box-shadow: var(--shadow-soft); border-right: 4px solid var(--gold); }
.work-list-item dt { font-weight: 800; color: var(--navy); margin-bottom: .4rem; font-size: .95rem; }
.work-list-item dd { font-size: .88rem; color: var(--text-mid); line-height: 1.85; margin: 0; }
.work-list-item dd > p { margin: 0 0 .5rem; }
.work-list-item ul { list-style: disc; padding-right: 1.3rem; margin-top: .4rem; }
.work-list-item ul li { font-size: .86rem; color: var(--text-mid); line-height: 1.8; padding: .2rem 0; }

/* ── CTA Pair (authors page bottom) ── */
.cta-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 3.5rem; }
.cta-card { border-radius: 16px; padding: 2.4rem 2rem; text-align: center; }
.cta-card-icon { font-size: 2.6rem; margin-bottom: .8rem; line-height: 1; }
.cta-card h3 { font-size: 1.2rem; margin-bottom: .6rem; }
.cta-card p { font-size: .88rem; line-height: 1.8; margin-bottom: 1rem; }
.cta-card--dark { background: linear-gradient(135deg, var(--navy), var(--blue)); }
.cta-card--dark h3 { color: white; }
.cta-card--dark p { color: rgba(255,255,255,.78); }
.cta-card--light { background: white; box-shadow: var(--shadow-soft); border: 1px solid var(--cream); }
.cta-card--light h3 { color: var(--navy); }
.cta-card--light p { color: var(--text-mid); }
@media (max-width: 640px) { .cta-pair { grid-template-columns: 1fr; } }

/* ── Library Sub-pages: Book Cards ── */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}
.book-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex;
  flex-direction: column;
}
.book-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card); }
.book-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--cream);
  overflow: hidden;
  flex-shrink: 0;
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.book-cover-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem;
}
.book-cover-placeholder--blue { background: linear-gradient(135deg, var(--blue), var(--teal)); }
.book-cover-placeholder--gold { background: linear-gradient(135deg, var(--gold), var(--sand)); }
.book-cover-placeholder--teal { background: linear-gradient(135deg, var(--teal), #4db8b9); }
.book-body {
  padding: 1rem 1rem 0.8rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.book-title { font-size: 0.9rem; font-weight: 800; color: var(--navy); line-height: 1.4; }
.book-author { font-size: 0.78rem; color: var(--text-mid); }
.book-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; padding-top: 0.6rem; }
.book-tag { font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 12px; }
.book-tag--age  { background: rgba(56,50,103,.08); color: var(--navy); }
.book-tag--lang { background: rgba(45,119,180,.1); color: var(--blue); }
.book-tag--cat  { background: rgba(118,199,200,.18); color: #2e7a7b; }

/* ── Filter Bar ── */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: .5rem;
  justify-content: center; margin-bottom: 2.5rem;
}
.filter-btn {
  padding: .4rem 1.1rem; border-radius: 20px;
  border: 2px solid var(--cream); background: white;
  color: var(--text-mid); font-family: 'Cairo', sans-serif;
  font-size: .85rem; font-weight: 600; cursor: pointer;
  transition: all .2s;
}
.filter-btn:hover { border-color: var(--gold); color: var(--gold); }
.filter-btn.active { border-color: var(--gold); background: var(--gold); color: white; }

/* ── Filter Group — stacked age + category rows ── */
.filter-group {
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
  padding: 4px 20px;
  margin-bottom: 2.5rem;
}
.filter-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 0;
}
.filter-row + .filter-row {
  border-top: 1px solid var(--cream);
}
.filter-row-label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-mid);
  letter-spacing: .4px;
  white-space: nowrap;
  min-width: 88px;
  flex-shrink: 0;
}
/* Reset margins when filter-bar lives inside filter-group */
.filter-group .filter-bar {
  margin-bottom: 0;
  justify-content: flex-start;
}
/* Category filter active = navy (distinct from age active = gold) */
.filter-bar--cat .filter-btn:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: transparent;
}
.filter-bar--cat .filter-btn.active {
  border-color: var(--navy);
  background: var(--navy);
  color: white;
}
@media (max-width: 640px) {
  .filter-group { padding: 4px 12px; }
  .filter-row-label { min-width: 68px; font-size: .68rem; }
}

/* ── Collection Stats ── */
.collection-stats {
  display: flex; gap: 2.5rem;
  justify-content: center; flex-wrap: wrap;
  margin-bottom: 2.5rem; padding: 1.5rem;
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.collection-stat { text-align: center; }
.collection-stat .cstat-num { font-size: 2rem; font-weight: 900; color: var(--gold); line-height: 1; }
.collection-stat .cstat-label { font-size: .8rem; color: var(--text-mid); margin-top: .2rem; }

/* ── Published Books (Free Letters) ── */
.pub-books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.pub-book-card {
  background: white; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
  transition: transform .3s ease;
}
.pub-book-card:hover { transform: translateY(-6px); }
.pub-book-cover {
  height: 220px; display: flex; align-items: center;
  justify-content: center; font-size: 4.5rem;
  position: relative; overflow: hidden;
}
.pub-book-cover--navy { background: linear-gradient(135deg, var(--navy), var(--blue)); }
.pub-book-cover--teal { background: linear-gradient(135deg, var(--teal), var(--navy)); }
.pub-book-cover img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.pub-book-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.pub-book-body h3 { font-size: 1.1rem; color: var(--navy); margin-bottom: .4rem; }
.pub-book-body p { font-size: .88rem; color: var(--text-mid); line-height: 1.8; flex: 1; }
.pub-book-meta { margin-top: 1rem; display: flex; gap: .5rem; flex-wrap: wrap; }

/* ── Competition Steps ── */
.competition-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}
.step-card {
  background: white; border-radius: var(--radius);
  padding: 1.5rem 1.2rem; box-shadow: var(--shadow-soft);
  text-align: center;
}
.step-num {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--navy); color: white;
  font-size: 1.2rem; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .9rem;
}
.step-card h4 { font-size: .95rem; color: var(--navy); margin-bottom: .4rem; }
.step-card p  { font-size: .83rem; color: var(--text-mid); line-height: 1.75; }

/* ── Library Empty State ── */
.empty-state {
  text-align: center; padding: 4rem 2rem;
  color: var(--text-mid); grid-column: 1 / -1;
}
.empty-state-icon { font-size: 4rem; margin-bottom: 1rem; }
.empty-state h3 { color: var(--navy); font-size: 1.2rem; margin-bottom: .5rem; }
.empty-state p { font-size: .9rem; line-height: 1.8; }

/* ── Story Search Field ── */
.stories-search-wrap {
  position: relative;
  margin-bottom: 1.3rem;
}
.stories-search-input {
  display: block;
  width: 100%;
  padding: 11px 48px 11px 18px;
  border: 2px solid var(--cream);
  border-radius: 50px;
  font-family: 'Cairo', sans-serif;
  font-size: .93rem;
  color: var(--navy);
  background: white;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
  direction: rtl;
}
.stories-search-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(45,119,180,.1);
}
.stories-search-input::placeholder { color: #bbb; }
.stories-search-input::-webkit-search-cancel-button { display: none; }
.stories-search-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-mid);
  font-size: 1rem;
  pointer-events: none;
  line-height: 1;
}
.search-no-results {
  text-align: center;
  padding: 2rem;
  color: var(--text-mid);
  font-size: .93rem;
  grid-column: 1 / -1;
}

/* ── Library Responsive ── */
@media (max-width: 768px) {
  .book-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .collection-stats { gap: 1.5rem; }
  .filter-bar { justify-content: flex-start; }
  .pub-books-grid { grid-template-columns: 1fr; }
  .competition-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .competition-steps { grid-template-columns: 1fr; }
}

/* ── Book Card — language dots & clickable ── */
.book-card[data-story-id] { cursor: pointer; }
.book-card[data-story-id]:focus { outline: 2px solid var(--blue); outline-offset: 2px; }
.book-lang-dots { display: flex; gap: 4px; margin-top: .5rem; }
.pdf-lang-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  font-size: .65rem; font-weight: 700;
}
.pdf-lang-dot.ar { background: #e3f2fd; color: #1565c0; }
.pdf-lang-dot.en { background: #e8f5e9; color: #2e7d32; }
.pdf-lang-dot.de { background: #fff3e0; color: #e65100; }

/* ── Story Detail Modal ── */
.story-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 800;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
  /* Prevent touch-scroll bleed-through on iOS */
  overscroll-behavior: none;
}
.story-modal-overlay.open { opacity: 1; pointer-events: all; }

.story-modal {
  background: white;
  border-radius: 16px;
  width: 100%; max-width: 820px;
  max-height: calc(100vh - 48px);
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: 1fr;
  position: relative;
  overflow: hidden;
  transform: translateY(-12px);
  transition: transform .2s;
}
.story-modal-overlay.open .story-modal { transform: translateY(0); }

.story-modal-close {
  position: absolute; top: 12px; left: 12px;
  background: rgba(0,0,0,.4); color: white;
  border: none; border-radius: 50%;
  width: 32px; height: 32px; font-size: 1rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  z-index: 2; transition: background .15s;
}
.story-modal-close:hover { background: rgba(0,0,0,.65); }

.story-modal-cover-wrap {
  background: linear-gradient(135deg, var(--blue), var(--navy));
  display: flex; align-items: stretch;
  overflow: hidden;
}
.story-modal-cover {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  display: block; min-height: 240px;
}

.story-modal-body {
  padding: 28px 28px 24px;
  overflow-y: auto;
  /* Smooth scroll inside modal on iOS + prevent scroll bleed */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.story-modal-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.story-modal-title {
  font-size: 1.4rem; font-weight: 800;
  color: var(--navy); margin-bottom: 12px; line-height: 1.4;
}
.story-modal-summary {
  font-size: .93rem; color: var(--text-mid);
  line-height: 2; margin-bottom: 20px;
}

.story-modal-section { margin-bottom: 20px; }
.story-modal-section h4 {
  font-size: .8rem; font-weight: 700;
  color: var(--gray-mid); text-transform: uppercase; letter-spacing: .6px;
  margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 1px solid var(--cream);
}

.story-modal-contributors { display: flex; flex-direction: column; gap: 6px; }
.smd-contrib-row {
  display: flex; align-items: baseline; gap: 8px;
  font-size: .88rem;
}
.smd-contrib-label { color: var(--text-mid); min-width: 120px; flex-shrink: 0; font-size: .82rem; }
.smd-contrib-val   { color: var(--navy); font-weight: 600; }

.story-modal-downloads { display: flex; gap: 10px; flex-wrap: wrap; }
.story-dl-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 8px;
  font-family: 'Cairo', sans-serif; font-size: .88rem; font-weight: 700;
  text-decoration: none; transition: opacity .15s, transform .1s;
}
.story-dl-btn:hover { opacity: .85; transform: translateY(-1px); }
.story-dl-btn--ar { background: var(--blue);  color: white; }
.story-dl-btn--en { background: var(--teal);  color: white; }
.story-dl-btn--de { background: var(--gold);  color: white; }

.story-yt-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #ff0000; color: white;
  padding: 9px 20px; border-radius: 8px;
  font-family: 'Cairo', sans-serif; font-size: .9rem; font-weight: 700;
  text-decoration: none; transition: opacity .15s;
}
.story-yt-btn:hover { opacity: .85; }

@media (max-width: 640px) {
  .story-modal {
    grid-template-columns: 1fr;
    grid-template-rows: 200px 1fr;
    max-height: calc(100vh - 32px);
  }
  .story-modal-cover-wrap { min-height: 0; }
  .story-modal-body { padding: 20px 16px; }
  .smd-contrib-label { min-width: 90px; }
}

/* ── Privacy Policy Pages ── */
.policy-tabs {
  display: flex; gap: .4rem; flex-wrap: wrap;
  margin-bottom: 3rem; padding: .4rem;
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.policy-tab {
  flex: 1; min-width: 140px;
  padding: .7rem 1rem; border-radius: 10px;
  border: none; background: transparent;
  color: var(--text-mid); font-family: 'Cairo', sans-serif;
  font-size: .88rem; font-weight: 700; cursor: pointer;
  text-align: center; text-decoration: none;
  transition: all .2s; display: block;
}
.policy-tab:hover { background: var(--bg); color: var(--navy); }
.policy-tab.active { background: var(--navy); color: white; }

.policy-section {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow-soft); overflow: hidden;
  margin-bottom: 1.5rem;
}
.policy-section-header {
  display: flex; align-items: center; gap: 1.2rem;
  padding: 1.5rem 2rem; border-bottom: 1px solid var(--cream);
}
.policy-num {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy); color: white;
  font-size: 1rem; font-weight: 900; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.policy-section-header h3 { font-size: 1.1rem; color: var(--navy); margin: 0; }
.policy-section-body { padding: 1.5rem 2rem; }

.policy-ar { font-size: .95rem; color: var(--text-dark); line-height: 2; margin-bottom: 1.2rem; }

.policy-key-points { display: flex; flex-direction: column; gap: .5rem; margin: 1rem 0; }
.policy-key-point {
  display: flex; align-items: flex-start; gap: .75rem;
  font-size: .88rem; color: var(--text-mid); line-height: 1.7;
}
.policy-key-point .kp-icon {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 900; flex-shrink: 0; margin-top: .15rem;
}
.policy-key-point--yes .kp-icon { background: rgba(118,199,200,.2); color: #2e7a7b; }
.policy-key-point--no  .kp-icon { background: rgba(234,84,99,.12); color: var(--coral); }

.policy-en {
  margin-top: 1.2rem; padding: 1.2rem 1.5rem;
  background: var(--bg); border-radius: var(--radius-sm);
  border-right: 3px solid var(--teal);
  direction: ltr; text-align: left;
}
.policy-en-label {
  font-size: .7rem; font-weight: 800; letter-spacing: .06em;
  color: var(--teal); text-transform: uppercase; margin-bottom: .5rem;
}
.policy-en p { font-size: .88rem; color: var(--text-mid); line-height: 1.85; margin: 0; }

.disclaimer-box {
  display: flex; gap: 1rem; align-items: flex-start;
  background: rgba(234,84,99,.06); border: 1px solid rgba(234,84,99,.2);
  border-radius: var(--radius-sm); padding: 1.2rem 1.5rem; margin-top: 1rem;
}
.disclaimer-box-icon { font-size: 1.4rem; flex-shrink: 0; }
.disclaimer-box-text { font-size: .88rem; color: var(--text-mid); line-height: 1.85; }
.disclaimer-box-text strong { color: #c0392b; }

.policy-data-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 2rem;
}
.policy-data-col { background: white; border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-soft); }
.policy-data-col-title {
  font-size: .8rem; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; margin-bottom: 1rem; padding-bottom: .6rem;
  border-bottom: 2px solid var(--cream);
}
.policy-data-col--yes .policy-data-col-title { color: #2e7a7b; border-color: var(--teal); }
.policy-data-col--no  .policy-data-col-title { color: var(--coral); border-color: var(--coral); }

.policy-org-card {
  background: linear-gradient(135deg, var(--navy), var(--navy-dark));
  border-radius: var(--radius); padding: 2rem 2.5rem;
  display: flex; gap: 2rem; align-items: center; flex-wrap: wrap;
  margin-top: 2rem;
}
.policy-org-logo { font-size: 2.5rem; flex-shrink: 0; }
.policy-org-info h4 { color: var(--sand); font-size: 1rem; margin-bottom: .5rem; }
.policy-org-info p { font-size: .85rem; color: rgba(255,255,255,.75); line-height: 1.9; margin: 0; }
.policy-org-info a { color: var(--teal); text-decoration: none; font-weight: 600; }
.policy-org-info a:hover { text-decoration: underline; }

.policy-update-notice {
  font-size: .8rem; color: var(--text-mid); text-align: center;
  padding: 1rem; border-top: 1px solid var(--cream); margin-top: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
  .policy-section-body { padding: 1.2rem; }
  .policy-section-header { padding: 1rem 1.2rem; }
  .policy-data-grid { grid-template-columns: 1fr; }
  .policy-org-card { padding: 1.5rem; }
}

@media print {
  .navbar, .footer, .policy-tabs, .page-hero { display: none !important; }
  .policy-section { box-shadow: none; border: 1px solid #ddd; }
  body { font-size: 12pt; }
}

/* ── Stories Layout: Book Grid + Filter Sidebar ── */
.stories-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}
.stories-layout .book-grid {
  flex: 1;
  order: 1;
  min-width: 0;
}
.filter-sidebar {
  order: 2;
  width: 210px;
  flex-shrink: 0;
  position: sticky;
  top: 88px;
}
.filter-sidebar-section {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1rem 1.1rem 1.2rem;
  margin-bottom: 1rem;
}
.filter-sidebar-title {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: .75rem;
  padding-bottom: .45rem;
  border-bottom: 1px solid var(--cream);
}
.filter-sidebar .filter-bar {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  margin-bottom: 0;
  gap: .35rem;
}
.filter-sidebar .filter-btn {
  text-align: right;
  border-radius: 10px;
  font-size: .82rem;
  padding: .4rem .9rem;
}

/* Language filter pill active = teal */
.filter-bar--lang .filter-btn:hover  { border-color: var(--teal); color: var(--teal); background: transparent; }
.filter-bar--lang .filter-btn.active { border-color: var(--teal); background: var(--teal); color: var(--navy); }

@media (max-width: 900px) {
  .stories-layout { flex-direction: column; }
  .filter-sidebar {
    order: -1;
    width: 100%;
    position: static;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
  }
  .filter-sidebar-section {
    flex: 1;
    min-width: 140px;
    margin-bottom: 0;
  }
  .filter-sidebar .filter-bar {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .filter-sidebar .filter-btn {
    width: auto;
    text-align: center;
  }
}

/* ── Story Modal: License ── */
.smd-license-note {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
  color: var(--text-mid);
  background: var(--bg);
  border-radius: 8px;
  padding: .5rem .9rem;
  margin-top: .6rem;
}
.smd-cc-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(45,119,180,.1);
  color: var(--blue);
  border: 1px solid rgba(45,119,180,.3);
  border-radius: 6px;
  padding: .22rem .7rem;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .05em;
  flex-shrink: 0;
}
.smd-license-badge-wrap {
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-wrap: wrap;
  margin-top: .6rem;
  padding: .5rem .9rem;
  background: var(--bg);
  border-radius: 8px;
}
.smd-cc-label { font-size: .82rem; color: var(--text-mid); }

/* ── Free-Letters: Book Tabs ── */
.fl-book-tabs {
  display: flex; gap: 1rem; justify-content: center;
  margin-bottom: 2rem; flex-wrap: wrap;
}
.fl-book-tab {
  padding: .65rem 1.8rem; border-radius: 30px;
  border: 2px solid var(--cream); background: white;
  color: var(--text-mid); font-family: 'Cairo', sans-serif;
  font-size: .88rem; font-weight: 700; cursor: pointer;
  transition: all .2s; text-align: center; line-height: 1.4;
}
.fl-book-tab:hover:not(.active) { border-color: var(--coral); color: var(--coral); }
.fl-book-tab.active { background: var(--coral); border-color: var(--coral); color: white; }

/* ── Free-Letters: Story Grid ── */
.fl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* ── Free-Letters: Story Card ── */
.fl-story-card {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  display: flex; flex-direction: column;
  cursor: pointer; overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.fl-story-card:hover  { transform: translateY(-6px); box-shadow: var(--shadow-card); }
.fl-story-card:focus  { outline: 3px solid var(--coral); outline-offset: 2px; }

/* Cover image area */
.fl-card-cover {
  width: 100%; aspect-ratio: 2 / 1;
  overflow: hidden; position: relative; flex-shrink: 0;
}
.fl-card-cover img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; transition: transform .35s ease;
}
.fl-story-card:hover .fl-card-cover img { transform: scale(1.04); }

/* Country flag overlay on cover */
.fl-card-cover-flag {
  position: absolute; bottom: 8px; right: 10px;
  font-size: 1.4rem; line-height: 1;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.5));
}

.fl-card-inner  { padding: 1.1rem 1.3rem; flex: 1; display: flex; flex-direction: column; gap: .35rem; }
.fl-card-ordinal {
  font-size: .65rem; font-weight: 800; letter-spacing: .07em;
  color: var(--coral); text-transform: uppercase;
}
.fl-card-title {
  font-size: 1.05rem; font-weight: 900; color: var(--navy); line-height: 1.45;
  margin-top: .1rem;
}
.fl-card-author { font-size: .83rem; font-weight: 600; color: var(--text-dark); }
.fl-country-tag {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .73rem; color: var(--text-mid);
  background: var(--bg); border: 1px solid var(--cream);
  border-radius: 20px; padding: .18rem .65rem; margin-top: .3rem;
  width: fit-content;
}
.fl-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem 1.4rem; border-top: 1px solid var(--cream);
  background: var(--bg); flex-shrink: 0;
}
.fl-time-badge { font-size: .73rem; color: var(--text-mid); }
.fl-read-cta {
  font-size: .77rem; font-weight: 800; color: var(--coral);
  transition: transform .15s;
}
.fl-story-card:hover .fl-read-cta { transform: translateX(-3px); }

/* ── Free-Letters: Book Covers in About ── */
.fl-book-covers-wrap {
  display: flex; gap: 1.8rem; justify-content: center; align-items: flex-start;
}
.fl-cover-item { text-align: center; flex: 1; max-width: 185px; }
.fl-cover-img {
  width: 100%; border-radius: 10px;
  box-shadow: 0 10px 35px rgba(0,0,0,.18);
  transition: transform .3s ease, box-shadow .3s ease;
}
.fl-cover-img:hover { transform: scale(1.03); box-shadow: 0 16px 45px rgba(0,0,0,.25); }
.fl-cover-caption {
  margin-top: .9rem; font-size: .8rem; font-weight: 700;
  color: var(--navy); line-height: 1.5;
}
.fl-cover-caption span { display: block; font-size: .72rem; font-weight: 500; color: var(--text-mid); }

/* ── Free-Letters: Story Reader Modal ── */
.fl-reader-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.58); backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000; opacity: 0; pointer-events: none;
  transition: opacity .25s; padding: 20px;
}
.fl-reader-overlay.open { opacity: 1; pointer-events: all; }
.fl-reader {
  background: white; border-radius: 16px;
  width: 100%; max-width: 760px;
  height: calc(100vh - 56px);
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(18px);
  transition: transform .3s ease;
}
.fl-reader-overlay.open .fl-reader { transform: translateY(0); }

/* Progress bar */
.fl-reader-progress-wrap {
  height: 3px; background: var(--cream); flex-shrink: 0;
}
.fl-reader-progress-bar {
  height: 100%; width: 0; background: var(--coral);
  transition: width .1s linear; border-radius: 0 2px 2px 0;
}

/* Header */
.fl-reader-header {
  padding: 18px 24px; border-bottom: 1px solid var(--cream);
  flex-shrink: 0; position: relative;
}
.fl-reader-close {
  position: absolute; top: 12px; left: 14px;
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: var(--bg); color: var(--text-dark); font-size: .95rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.fl-reader-close:hover { background: var(--cream); }
.fl-reader-ordinal {
  font-size: .63rem; font-weight: 800; letter-spacing: .08em;
  color: var(--coral); margin-bottom: .25rem;
}
.fl-reader-title {
  font-size: 1.25rem; font-weight: 900; color: var(--navy);
  margin: 0 0 .45rem; line-height: 1.4;
}
.fl-reader-byline {
  display: flex; align-items: center; gap: .45rem;
  flex-wrap: wrap; font-size: .8rem; color: var(--text-mid);
}
.fl-reader-dot { color: var(--cream); font-size: 1.1rem; line-height: 1; }

/* Scrollable body */
.fl-reader-body { flex: 1; overflow-y: auto; padding: 36px 52px; }
.fl-reader-content {
  font-size: 1.08rem; line-height: 2.15; color: #252525;
  max-width: 620px; margin: 0 auto;
}
.fl-reader-content p { margin-bottom: 1.45em; }
.fl-reader-content p:last-child { margin-bottom: 0; }

/* Section headers inside story text (e.g. "(١)") */
.fl-reader-content .fl-section-num {
  display: block; text-align: center;
  font-size: .85rem; color: var(--coral);
  font-weight: 800; margin: 1.5em 0 .5em;
  letter-spacing: .1em;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .fl-book-covers-wrap { gap: 1rem; }
}
@media (max-width: 580px) {
  .fl-grid { grid-template-columns: 1fr; }
  .fl-reader { height: calc(100vh - 20px); border-radius: 12px; }
  .fl-reader-header { padding: 14px 18px; }
  .fl-reader-body { padding: 22px 20px; }
  .fl-reader-content { font-size: .97rem; line-height: 2; }
  .fl-reader-title { font-size: 1.1rem; }
  .fl-book-tab { font-size: .82rem; padding: .55rem 1.3rem; }
}

/* ════════════════════════════════════════════════════════════
   Mobile-Responsive Improvements — all issues
   ════════════════════════════════════════════════════════════ */

/* ── Fix 4: Mobile nav — full-width items, inline dropdowns ── */
@media (max-width: 768px) {
  .nav-links.open {
    gap: 2px;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    z-index: 999;
    align-items: stretch; /* KEY: overrides default center so all items fill full width */
  }
  .nav-links.open > li {
    width: 100%;
  }
  .nav-links.open > li > a {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    background: transparent !important;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: .95rem;
    box-sizing: border-box;
  }
  .nav-links.open > li > a:hover,
  .nav-links.open > li > a.active {
    background: rgba(56,50,103,0.08) !important;
  }
  /* Inline dropdown revealed by JS .nav-item.open — not absolute */
  .nav-links.open .dropdown {
    position: static !important;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    box-shadow: none !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 0 !important;
    min-width: 0 !important;
    transform: none !important;
    background: rgba(56,50,103,0.04) !important;
    margin: 0 8px 4px !important;
    transition: max-height 0.28s ease, opacity 0.18s ease;
  }
  .nav-links.open .nav-item.open .dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    max-height: 500px;
    padding: 4px 0 !important;
  }
  .nav-links.open .dropdown li a {
    padding: 8px 20px !important;
    font-size: .85rem !important;
    display: block;
  }
  .nav-links.open .dropdown .dropdown-sep {
    display: none;
  }
}

/* ── Fix 2: Partners carousel — remove fade mask on mobile ── */
@media (max-width: 640px) {
  .partners-slider-wrap {
    mask-image: none !important;
    -webkit-mask-image: none !important;
    padding: 0.5rem 1rem 1rem;
  }
}

/* ── Fix 2b: Hero action buttons — stack full-width on mobile ── */
@media (max-width: 600px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    text-align: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
  }
}

/* ── Fix 2: Hero social proof strip — horizontal scroll on mobile ── */
@media (max-width: 768px) {
  .hero-social-strip {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .hero-social-strip::-webkit-scrollbar { display: none; }
  .hero-social-strip > span { flex-shrink: 0; }
  /* Hero badge wraps on very small screens */
  .update-badge {
    white-space: normal;
    text-align: center;
    line-height: 1.5;
    padding: .45rem 1rem;
  }
}

/* ── Fix 3: Library "لماذا" grid — handled by removing inline override ── */
/* Ensure activities-grid responsive works without inline override */
@media (max-width: 768px) {
  .activity-card--light { background: white; }
}

/* ── Fix 5 & 6: Stories layout — better sidebar on small mobile ── */
@media (max-width: 480px) {
  .filter-sidebar {
    gap: 0.75rem;
  }
  .filter-sidebar-section {
    min-width: 100% !important;
  }
  .stories-search-wrap {
    margin-bottom: 1rem;
  }
}

/* ── Fix 8: Reserve page — status grid single column on small phones ── */
@media (max-width: 480px) {
  .res-grid { grid-template-columns: 1fr !important; }
  .res-badge { white-space: normal; font-size: .68rem; padding: .22rem .6rem; }
}

/* ── Fix 10 companion: Awards recognition grid — responsive ── */
.recognition-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
@media (max-width: 640px) {
  .recognition-grid { grid-template-columns: 1fr; }
  .awards-grid { gap: 1rem; }
}
