@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../fonts/IBMPlexSansArabic-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../fonts/IBMPlexSansArabic-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../fonts/IBMPlexSansArabic-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../fonts/IBMPlexSansArabic-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #006d38;
  --green-deep: #004d27;
  --red: #c8102e;
  --black: #121212;
  --ink: #1c1c1c;
  --muted: #5a5a5a;
  --paper: #f4efe6;
  --cream: #fbf8f2;
  --white: #ffffff;
  --gold: #b8923a;
  --line: rgba(18, 18, 18, 0.1);
  --shadow: 0 18px 40px rgba(18, 18, 18, 0.08);
  --radius: 18px;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.8;
  min-height: 100vh;
  opacity: 0;
  animation: page-in 0.7s ease forwards;
}

@keyframes page-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

a:hover {
  color: var(--green);
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.flag-bar {
  display: grid;
  grid-template-columns: 18% 1fr 1fr 1fr;
  height: 6px;
}

.flag-bar span:nth-child(1) { background: var(--black); }
.flag-bar span:nth-child(2) { background: var(--green); }
.flag-bar span:nth-child(3) { background: var(--white); }
.flag-bar span:nth-child(4) { background: var(--red); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 248, 242, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
}

.brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.brand-text strong {
  font-size: 0.92rem;
}

.brand-text span {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.nav {
  display: flex;
  gap: 0.25rem;
}

.nav a {
  position: relative;
  padding: 0.45rem 0.8rem;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav a::after {
  content: "";
  position: absolute;
  right: 0.8rem;
  left: 0.8rem;
  bottom: 0.2rem;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s ease;
}

.nav a:hover::after,
.nav a.is-active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--white);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 20%, rgba(184, 146, 58, 0.18), transparent 42%),
    linear-gradient(160deg, #0d1f14 0%, #121212 55%, #2a0a10 100%);
  color: var(--white);
  padding: 5.5rem 0 4.5rem;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 80px;
  background: linear-gradient(to top, var(--cream), transparent);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.35;
  font-weight: 700;
}

.hero p {
  margin: 0 0 1.8rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
  max-width: 38rem;
}

.hero-logo {
  justify-self: center;
  width: min(280px, 70%);
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.35));
  animation: float-in 1s ease both;
}

@keyframes float-in {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--gold);
  color: var(--black);
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn:hover {
  color: var(--black);
  background: #d4ae55;
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.28);
  margin-inline-start: 0.6rem;
}

.btn-ghost:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.section {
  padding: 4rem 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.kicker {
  color: var(--green);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
}

h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.4;
}

.lede {
  color: var(--muted);
  max-width: 42rem;
}

.about-panel,
.page-body,
.article-body {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.page-hero {
  padding: 3.2rem 0 1rem;
}

.page-hero h1 {
  margin: 0.2rem 0 0.6rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.news-grid,
.board-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.news-card,
.member {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.news-card:hover,
.member:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px rgba(18, 18, 18, 0.12);
}

.news-card a {
  color: inherit;
  display: block;
}

.thumb {
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, var(--green-deep), #1b1b1b);
  overflow: hidden;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: fade-img 0.6s ease 0.1s forwards;
}

@keyframes fade-img {
  to { opacity: 1; }
}

.news-card .body,
.member .body {
  padding: 1.1rem 1.15rem 1.25rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 0.45rem;
}

.chip {
  background: var(--paper);
  color: var(--green-deep);
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
}

.news-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  line-height: 1.55;
}

.excerpt {
  color: var(--muted);
  font-size: 0.92rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.4rem;
}

.filter {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
}

.filter.is-on,
.filter:hover {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.board-block + .board-block {
  margin-top: 2.5rem;
}

.member .photo {
  aspect-ratio: 1;
  background: var(--paper);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.member .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.avatar {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--green-deep);
  background:
    radial-gradient(circle at 30% 20%, rgba(184, 146, 58, 0.28), transparent 50%),
    var(--paper);
}

.member h3 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}

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

.doc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-list li {
  position: relative;
  padding: 0.85rem 1rem 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.doc-list li::before {
  content: "";
  position: absolute;
  right: -0.15rem;
  top: 1.15rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

.note {
  background: var(--paper);
  border-inline-start: 4px solid var(--green);
  padding: 1rem 1.1rem;
  border-radius: 12px;
  margin: 1.2rem 0;
}

.article-body img {
  border-radius: 12px;
  margin: 1rem auto;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
}

.article-body td,
.article-body th {
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

.site-footer {
  background: var(--black);
  color: rgba(255, 255, 255, 0.78);
  padding: 2.2rem 0;
  margin-top: 2rem;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.site-footer strong {
  color: var(--white);
}

.slogan {
  margin: 0.45rem 0 0;
  color: var(--gold);
  font-weight: 600;
}

.social {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.social a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.social a:hover {
  color: var(--black);
  background: var(--gold);
  border-color: var(--gold);
  transform: translateY(-2px);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal 0.7s ease forwards;
}

.reveal:nth-child(2) { animation-delay: 0.08s; }
.reveal:nth-child(3) { animation-delay: 0.16s; }
.reveal:nth-child(4) { animation-delay: 0.24s; }
.reveal:nth-child(5) { animation-delay: 0.32s; }
.reveal:nth-child(6) { animation-delay: 0.4s; }

@keyframes reveal {
  to { opacity: 1; transform: none; }
}

.hidden-card {
  display: none;
}

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

  .hero-grid {
    text-align: center;
  }

  .hero p {
    margin-inline: auto;
  }

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

  .nav {
    display: none;
    position: absolute;
    top: 82px;
    right: 1rem;
    left: 1rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    flex-direction: column;
    padding: 0.5rem;
    box-shadow: var(--shadow);
  }

  .nav.is-open {
    display: flex;
  }
}

@media (max-width: 640px) {
  .news-grid,
  .board-grid,
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .site-footer .wrap,
  .section-head {
    flex-direction: column;
    align-items: start;
  }

  .btn-ghost {
    margin: 0.5rem 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  body,
  .reveal,
  .thumb img {
    opacity: 1;
    transform: none;
  }
}
