:root {
  --color-bg: #f7f2ea;
  --color-surface: #fdfaf5;
  --color-text: #1d1a16;
  --color-accent: #c6522d;
  --color-muted: #776f67;
  --color-border: #e2d7c9;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: inherit;
  line-height: 1.7;
}

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

a:hover,
a:focus-visible {
  color: var(--color-accent);
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 0.85rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: inherit;
}

.site-logo img {
  height: 64px;
  width: auto;
  display: block;
}

.site-title {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 0.25rem 0;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.lang-switch {
  font-size: 0.9rem;
  color: var(--color-muted, #666666);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.lang-switch a {
  text-decoration: none;
  color: inherit;
}

.lang-switch a:hover {
  color: var(--color-accent, #d6452a);
}

.lang-switch .active-lang {
  font-weight: 600;
  color: var(--color-text, #111111);
}

main {
  padding: 3rem 1.25rem;
  max-width: 1080px;
  margin: 0 auto;
}

section {
  margin-bottom: 2.5rem;
}

h1,
h2,
h3 {
  color: var(--color-accent);
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.home-section {
  margin-bottom: 3rem;
}

.home-section h2 {
  margin-bottom: 0.75rem;
}

.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--color-muted, #666666);
  margin-bottom: 0.25rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--color-muted, #666666);
  margin: 0 0 0.35rem;
}

p {
  margin: 0 0 1rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  max-width: 40rem;
  margin-bottom: 1.5rem;
}

.hero-note {
  font-size: 0.9rem;
  color: var(--color-muted, #666666);
  margin-top: 0.75rem;
  max-width: 32rem;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn.primary {
  background-color: var(--color-accent, #d6452a);
  color: #ffffff;
}

.btn.primary:hover {
  background-color: #b33720;
}

.btn.secondary {
  background-color: transparent;
  border-color: var(--color-accent, #d6452a);
  color: var(--color-accent, #d6452a);
}

.btn.secondary:hover {
  background-color: rgba(214, 69, 42, 0.08);
}

.btn-primary,
.btn-outline,
.btn-secondary {
  display: inline-block;
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.btn-primary {
  background: var(--color-accent, #d6452a);
  border-color: var(--color-accent, #d6452a);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.btn-primary:hover {
  background: #b33720;
  border-color: #b33720;
}

.btn-outline {
  background: transparent;
  border-color: var(--color-accent, #d6452a);
  color: var(--color-accent, #d6452a);
}

.btn-outline:hover {
  background: rgba(214, 69, 42, 0.08);
}

.btn-secondary {
  background: var(--color-surface, #ffffff);
  border-color: var(--color-border, #e2d7c9);
  color: var(--color-text, #1d1a16);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}

.btn-secondary:hover {
  background: #fff8f3;
}

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

.hero {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin-bottom: 3rem;
  padding: 3rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05);
}

.hero-text {
  flex: 1;
}

.hero-media {
  flex: 1;
  max-width: 640px;
}

.hero-video video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 1rem;
  object-fit: cover;
  max-height: 70vh;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.pillar-card {
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.pillar-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 1.25rem 0;
}

.support-item {
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.about-hero {
  margin-bottom: 2.5rem;
}

.about-hero-figure {
  margin: 0;
}

.about-hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 1.25rem;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.25);
}

.about-section {
  margin-bottom: 2.5rem;
}

.about-section h1,
.about-section h2 {
  margin-bottom: 0.75rem;
}

/* Social & Contact sections */
.page-section {
  margin: 2.5rem 0;
}

.page-section h2 {
  margin-bottom: 0.75rem;
}

.page-section-lead {
  max-width: 46rem;
  opacity: 0.9;
}

.social-grid,
.contact-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.75rem;
}

@media (min-width: 768px) {
  .social-grid,
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.card {
  border-radius: 1rem;
  padding: 1.5rem 1.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-soft, 0 8px 24px rgba(0,0,0,0.16));
}

.card-title {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.card-subtitle {
  font-size: 0.9rem;
  opacity: 0.85;
  margin-bottom: 0.5rem;
}

.card-body {
  font-size: 0.95rem;
}

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

.card a:hover {
  text-decoration: underline;
}

/* Small helper for inline labels */
.inline-label {
  font-weight: 600;
  opacity: 0.9;
}

/* Research page layout */
.research-section {
  margin-block: 3rem;
}

.research-section .section-header {
  margin-bottom: 1.5rem;
}

.research-grid {
  display: grid;
  gap: 1.5rem;
}

.research-card {
  background: var(--color-surface, #fdfaf5);
  border: 1px solid var(--color-border, #e2d7c9);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-soft, 0 8px 24px rgba(0, 0, 0, 0.12));
}

.research-card img {
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
}

.research-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.research-note {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: 0.5rem;
}

.research-figure {
  text-align: center;
  margin: 2.5rem auto;
}

.research-image-link {
  display: inline-block;
}

.research-image {
  max-width: 480px;
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-soft, 0 8px 24px rgba(0, 0, 0, 0.18));
  cursor: pointer;
}

.research-caption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  opacity: 0.85;
}

/* Media page layout */
.media-intro {
  max-width: 48rem;
  opacity: 0.92;
}

.media-grid {
  display: grid;
  gap: 1.75rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .media-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

.media-card {
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-soft, 0 8px 24px rgba(0,0,0,0.16));
  display: flex;
  flex-direction: column;
  height: 100%;
}

.media-card a {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.media-thumb-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.media-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.media-card:hover .media-thumb {
  transform: scale(1.03);
}

.media-card-body {
  padding: 1rem 1.1rem 1.2rem;
}

.media-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.media-desc {
  font-size: 0.9rem;
  opacity: 0.9;
}

.media-meta {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  opacity: 0.7;
}

.numbered-list {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
}

.numbered-list li {
  margin-bottom: 0.7rem;
}

.bullet-list {
  padding-left: 1.25rem;
  margin: 0.75rem 0 0;
}

.bullet-list li {
  margin-bottom: 0.4rem;
}

.follow-list {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
}

.follow-list li {
  margin-bottom: 0.4rem;
}

footer.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.95rem;
  background: var(--color-surface);
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .site-nav {
    justify-content: center;
    gap: 0.75rem;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  html[dir="rtl"] .hero {
    align-items: flex-end;
  }

  .hero-media {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 900px) {
  .pillars-grid,
  .support-grid {
    grid-template-columns: 1fr;
  }
}

/* Basic RTL adjustments */
html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

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

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

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

html[dir="rtl"] .site-nav {
  justify-content: flex-start;
}

html[dir="rtl"] main {
  text-align: right;
}

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

.hero-video img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 1rem;
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.hero-video-desktop {
  display: block;
}

.hero-video-mobile {
  display: none;
}

@media (max-width: 768px) {
  .hero-video-desktop {
    display: none;
  }
  .hero-video-mobile {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-video-desktop video {
    animation: none !important;
  }
  .hero-video-desktop {
    display: none;
  }
  .hero-video-mobile {
    display: block;
  }
}

.hero-lead {
  font-size: 1.05rem;
  max-width: 40rem;
  margin-bottom: 1.5rem;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.start-here {
  margin-top: 3rem;
}

.start-here-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .start-here-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.start-card {
  padding: 1.4rem 1.5rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.16);
}

.start-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.start-card p {
  margin-bottom: 0.9rem;
  font-size: 0.92rem;
  opacity: 0.9;
}

/* Generic button styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background-color: var(--color-accent, #d6452a);
  color: #ffffff;
  border: 1px solid var(--color-accent, #d6452a);
}

.btn-primary:hover {
  background-color: #b33720;
  border-color: #b33720;
}

.btn-secondary {
  background-color: var(--color-surface, #ffffff);
  color: var(--color-text, #1d1a16);
  border: 1px solid var(--color-border, #e2d7c9);
}

.btn-secondary:hover {
  background-color: #fff8f3;
}

.btn-outline {
  background-color: transparent;
  color: var(--color-accent, #d6452a);
  border: 1px dashed rgba(198, 82, 45, 0.4);
}

.btn-outline:hover {
  background-color: rgba(214, 69, 42, 0.08);
}

/* Support page */

.content-section {
  margin-block: 2.5rem;
}

.section-header {
  margin-bottom: 1.25rem;
}

.section-header p {
  margin: 0.4rem 0 0;
  max-width: 50rem;
  opacity: 0.9;
}

.contact-email {
  margin-top: 1rem;
}

.support-hero {
  padding-block: 3rem 2rem;
}

.page-hero-lead {
  max-width: 52rem;
  font-size: 1rem;
  line-height: 1.7;
  opacity: 0.92;
}

.support-section {
  padding-block: 2.5rem;
}

.support-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .support-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .support-grid-alt {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.support-card {
  padding: 1.4rem 1.5rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.16);
}

.support-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.support-card p {
  margin-bottom: 0.65rem;
  font-size: 0.92rem;
  line-height: 1.6;
  opacity: 0.9;
}

.support-example {
  font-size: 0.85rem;
  opacity: 0.8;
}

.support-transparency p {
  max-width: 52rem;
}

.support-list {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  padding-left: 1.1rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.support-cta {
  border-radius: 1rem;
  padding: 1.5rem 1.5rem;
  margin-top: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.16);
}

.support-cta p {
  margin-bottom: 1rem;
  font-size: 0.94rem;
  line-height: 1.7;
}

.support-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* RTL tweaks for Arabic support page */
.support-page[dir="rtl"] .support-list {
  padding-left: 0;
  padding-right: 1.1rem;
}

@media (max-width: 767px) {
  .support-hero {
    padding-block: 2.25rem 1.5rem;
  }

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

/* CTA sections (About + Research) */

.cta-section {
  padding-block: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 1rem;
}

.cta-section h2 {
  margin-bottom: 0.75rem;
}

.cta-section p {
  max-width: 48rem;
  font-size: 0.96rem;
  line-height: 1.7;
  opacity: 0.92;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.1rem;
}

@media (max-width: 768px) {
  .cta-section {
    padding-block: 2rem;
  }
}

/* Updates page */

.updates-page .page-hero {
  padding-block: 2.5rem 1.75rem;
}

.updates-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.update-card {
  padding: 1.5rem 1.6rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.16);
}

.update-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.8;
  margin-bottom: 0.4rem;
}

.update-tag {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.7rem;
}

.update-title {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.update-body {
  font-size: 0.92rem;
  line-height: 1.7;
  opacity: 0.92;
  margin-bottom: 0.5rem;
}

.update-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.6rem;
}

.update-links .text-link {
  font-size: 0.88rem;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

/* RTL tweak */

.updates-page[dir="rtl"] .update-meta {
  justify-content: flex-start;
}

@media (max-width: 768px) {
  .updates-page .page-hero {
    padding-block: 2rem 1.25rem;
  }

  .update-card {
    padding: 1.3rem 1.25rem;
  }
}
