:root {
  --red: #9f1d2a;
  --red-dark: #7d1621;
  --charcoal: #202327;
  --ink: #30343a;
  --muted: #68707a;
  --paper: #fbfaf8;
  --sand: #f3eee7;
  --line: #e4ded5;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(32, 35, 39, .08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  line-height: 1.7;
}

html[lang="ar"] body {
  font-family: "Noto Naskh Arabic", "Tahoma", "Arial", sans-serif;
  font-size: 17px;
}

a {
  color: var(--red);
  text-decoration: none;
}

a:hover {
  color: var(--red-dark);
}

.site-shell {
  overflow: hidden;
}

.navbar {
  background: rgba(251, 250, 248, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.navbar .container {
  gap: .9rem;
}

.navbar-brand img {
  width: 48px;
  height: auto;
}

.brand-name {
  color: var(--charcoal);
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
  unicode-bidi: plaintext;
}

html[lang="ar"] .brand-name {
  font-weight: 700;
}

.nav-link {
  color: var(--charcoal);
  font-weight: 600;
  border-radius: 8px;
}

.nav-link:hover {
  color: var(--red);
}

.nav-link:focus {
  color: var(--charcoal);
}

html[lang="ar"] .nav-link {
  font-size: 1.02rem;
  padding-inline: .62rem;
}

.language-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  background: var(--white);
  gap: 3px;
}

.language-switch a {
  min-width: 42px;
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.language-switch a.active {
  background: var(--red);
  color: var(--white);
}

.hero {
  position: relative;
  padding: 8rem 0 5rem;
  background:
    linear-gradient(135deg, rgba(159, 29, 42, .1), rgba(255, 255, 255, .92) 42%, rgba(32, 35, 39, .08)),
    radial-gradient(circle at 15% 20%, rgba(159, 29, 42, .16), transparent 26%),
    repeating-linear-gradient(45deg, rgba(32, 35, 39, .035) 0 1px, transparent 1px 22px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 10px;
  background: linear-gradient(to bottom, var(--red) 0 33.33%, var(--white) 33.33% 66.66%, var(--charcoal) 66.66%);
}

html[dir="rtl"] .hero::before {
  inset: 0 0 0 auto;
}

.hero h1 {
  color: var(--charcoal);
  font-size: clamp(2.15rem, 5vw, 4.4rem);
  line-height: 1.12;
  font-weight: 850;
  max-width: 900px;
}

.hero p {
  max-width: 720px;
  color: #515861;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.flag-rule {
  display: flex;
  width: 172px;
  height: 8px;
  margin: 1.5rem 0;
  border-radius: 999px;
  overflow: hidden;
}

.flag-rule span:nth-child(1) { background: var(--red); flex: 1; }
.flag-rule span:nth-child(2) { background: var(--white); flex: 1; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.flag-rule span:nth-child(3) { background: var(--charcoal); flex: 1; }

.btn-jgbw {
  --bs-btn-bg: var(--red);
  --bs-btn-border-color: var(--red);
  --bs-btn-hover-bg: var(--red-dark);
  --bs-btn-hover-border-color: var(--red-dark);
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
  border-radius: 8px;
  font-weight: 700;
  padding: .75rem 1.1rem;
}

.btn-outline-jgbw {
  --bs-btn-color: var(--charcoal);
  --bs-btn-border-color: var(--line);
  --bs-btn-hover-bg: var(--charcoal);
  --bs-btn-hover-border-color: var(--charcoal);
  --bs-btn-hover-color: #fff;
  border-radius: 8px;
  font-weight: 700;
  padding: .75rem 1.1rem;
  background: var(--white);
}

.section {
  padding: 5rem 0;
}

.section-title {
  color: var(--charcoal);
  font-weight: 850;
  line-height: 1.2;
  margin-bottom: .8rem;
}

.section-kicker {
  color: var(--red);
  font-weight: 800;
  text-transform: uppercase;
  font-size: .78rem;
  letter-spacing: .08em;
}

html[lang="ar"] .section-kicker {
  letter-spacing: 0;
}

.soft-band {
  background:
    linear-gradient(180deg, #fff, var(--sand)),
    repeating-linear-gradient(90deg, transparent 0 26px, rgba(159, 29, 42, .04) 26px 27px);
}

.content-card,
.announcement-card,
.admin-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.content-card {
  height: 100%;
  padding: 1.5rem;
}

.content-card h3 {
  color: var(--charcoal);
  font-weight: 800;
  font-size: 1.25rem;
}

.goals-list {
  padding-inline-start: 1.25rem;
  margin-bottom: 0;
}

.goals-list li + li {
  margin-top: .65rem;
}

.person-card {
  height: 100%;
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 1rem;
  padding: 1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.person-card img {
  width: 112px;
  height: 132px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.person-card h4 {
  color: var(--charcoal);
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: .35rem;
}

.person-role {
  color: var(--red);
  font-weight: 700;
  margin-bottom: .65rem;
}

.contact-card-ltr {
  direction: ltr;
  text-align: left;
}

.ltr-text {
  direction: ltr;
  text-align: left;
}

.link-grid {
  display: grid;
  gap: .85rem;
}

.resource-link {
  display: flex;
  align-items: center;
  gap: .85rem;
  min-height: 58px;
  padding: .85rem 1rem;
  color: var(--charcoal);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(32, 35, 39, .05);
  font-weight: 800;
}

.resource-link:hover,
.resource-link:focus {
  color: var(--red);
  border-color: rgba(159, 29, 42, .35);
}

.resource-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  color: var(--red);
  background: rgba(159, 29, 42, .08);
  border-radius: 50%;
}

.resource-icon.facebook {
  color: #1877f2;
  background: rgba(24, 119, 242, .1);
}

.icon-action {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.share-icon-action {
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
}

.icon-link-text {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.announcement-card {
  height: 100%;
  overflow: hidden;
}

.announcement-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--sand);
}

.announcement-card .body {
  padding: 1.25rem;
}

.announcement-card h3 {
  color: var(--charcoal);
  font-size: 1.2rem;
  font-weight: 800;
}

.formatted-excerpt p:last-child,
.formatted-excerpt ul:last-child,
.formatted-excerpt ol:last-child,
.formatted-excerpt blockquote:last-child,
.formatted-excerpt pre:last-child {
  margin-bottom: 0;
}

.date {
  color: var(--muted);
  font-size: .92rem;
  font-weight: 700;
}

.detail-hero {
  padding: 7rem 0 2.8rem;
  background: linear-gradient(135deg, rgba(159, 29, 42, .09), rgba(255, 255, 255, .92)), var(--sand);
  border-bottom: 1px solid var(--line);
}

.article-image {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.article-body {
  font-size: 1.08rem;
  color: #3f454d;
}

.article-body p {
  margin-bottom: 1.15rem;
}

.article-body strong {
  color: var(--charcoal);
  font-weight: 800;
}

.article-body em {
  font-style: italic;
}

.article-body del {
  color: var(--muted);
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.15rem;
  padding-inline-start: 1.35rem;
}

.article-body li {
  margin-bottom: .4rem;
}

.article-body blockquote {
  margin: 0 0 1.15rem;
  padding: .85rem 1rem;
  color: #2f353b;
  background: rgba(36, 45, 53, .05);
  border-inline-start: 4px solid var(--red);
  border-radius: 8px;
}

.article-body code {
  color: var(--red);
  background: rgba(159, 29, 42, .08);
  border-radius: 4px;
  padding: .08rem .28rem;
}

.article-body pre {
  margin: 0 0 1.15rem;
  padding: 1rem;
  overflow-x: auto;
  color: #f4f6f8;
  background: #242d35;
  border-radius: 8px;
}

.article-body pre code {
  color: inherit;
  background: transparent;
  padding: 0;
}

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

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

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

.footer {
  color: #dfe3e7;
  background: var(--charcoal);
  padding: 2.5rem 0;
}

.footer a {
  color: #fff;
}

.footer-ltr {
  direction: ltr;
  text-align: left;
}

.footer-ltr .container {
  direction: ltr;
}

.admin-page {
  min-height: 100vh;
  background: #f5f2ed;
}

.admin-header {
  background: var(--charcoal);
  color: #fff;
  padding: 1rem 0;
}

.admin-card {
  padding: 1.5rem;
}

.table {
  vertical-align: middle;
}

.form-control,
.form-select {
  border-radius: 8px;
  border-color: var(--line);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 .2rem rgba(159, 29, 42, .15);
}

.thumb {
  width: 92px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.legal-content {
  max-width: 980px;
}

.legal-content h2 {
  color: var(--charcoal);
  font-size: 1.35rem;
  font-weight: 800;
  margin-top: 1.8rem;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content h3 {
  color: var(--charcoal);
  font-size: 1.05rem;
  font-weight: 800;
  margin-top: 1.4rem;
}

.legal-content th {
  width: 32%;
  color: var(--charcoal);
}

@media (max-width: 991.98px) {
  .hero {
    padding-top: 6.5rem;
  }

  .navbar-collapse {
    padding: 1rem 0;
  }

  .navbar-nav {
    align-items: stretch !important;
  }

  .nav-link {
    padding: .55rem .7rem;
  }

  .language-switch {
    margin-top: .75rem;
  }
}

@media (max-width: 575.98px) {
  .section {
    padding: 3.5rem 0;
  }

  .hero {
    padding-bottom: 3.8rem;
  }

  .share-row .btn {
    width: 100%;
  }

  .share-row .share-icon-action {
    width: 2.25rem;
  }

  .person-card {
    grid-template-columns: 88px 1fr;
  }

  .person-card img {
    width: 88px;
    height: 108px;
  }
}
