/* Tanweer Center — blue is the main colour (the centre's request, Oct 2026),
   with every blue sampled from the centre's own logo; sun yellow is the accent. */

@import url("https://fonts.googleapis.com/css2?family=Bitter:wght@500;700&family=Cairo:wght@400;600;700&family=IBM+Plex+Sans:wght@400;600&display=swap");

:root {
  --blue: #1E4F8C;        /* main colour: between the logo's outline and its Arabic */
  --blue-deep: #143A66;   /* the logo's outline blue, for the footer */
  --blue-soft: #EAF2FC;   /* a wash of the logo's light "CENTER" fill */
  --sun: #F5C24A;
  --stone: #D3DEEC;       /* rules and borders, tinted blue */
  --ink: #1B2430;
  --paper: #FFFFFF;
  /* Old names kept so nothing styled with them goes unstyled. */
  --navy: var(--blue);
  --cream: var(--paper);

  --measure: 34rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --font-en-head: "Bitter", Georgia, serif;
  --font-en-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-ar: "Cairo", system-ui, sans-serif;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-en-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

[lang="ar"] body,
body[lang="ar"] { font-family: var(--font-ar); line-height: 1.9; }

h1, h2, h3 {
  font-family: var(--font-en-head);
  color: var(--navy);
  line-height: 1.15;
  text-wrap: balance;
}

[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3 { font-family: var(--font-ar); }

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); }

a { color: var(--navy); text-underline-offset: 0.2em; }
a:hover { color: var(--ink); }

.wrap {
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.prose { max-width: var(--measure); }

/* ---- masthead ---------------------------------------------------------- */

/* The logo is a white-background image with glows, so the masthead stays
   white; a band of the main blue above it carries the colour. */
.masthead-bar {
  background: var(--paper);
  border-top: 6px solid var(--blue);
  box-shadow: 0 1px 0 var(--stone);
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.75rem;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand img { display: block; height: 5.5rem; width: auto; }
.brand-name {
  font-family: var(--font-en-head);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  font-size: 1rem;
  line-height: 1.1;
}
.brand-ar { display: block; font-family: var(--font-ar); letter-spacing: 0.2em; text-transform: none; }

.nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.nav { align-items: center; gap: 0.35rem; }
.nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  color: var(--blue);
}
.nav a:hover { background: var(--blue-soft); color: var(--blue); }
.nav a[aria-current="page"] { background: var(--blue); color: #fff; }

.lang-switch { border: 1.5px solid var(--blue); }

/* ---- hero -------------------------------------------------------------- */

/* Full-bleed blue band without changing the .wrap markup: the shadow
   paints the blue out to both edges and clip-path keeps it to the band. */
.hero {
  position: relative;
  padding-block: clamp(2.5rem, 8vw, 5rem);
  background: var(--blue);
  box-shadow: 0 0 0 100vmax var(--blue);
  clip-path: inset(0 -100vmax);
  color: #fff;
}

.hero h1 { color: #fff; margin-top: 0; }

/* The sunburst: rays of cream over sun yellow, the centre's own motif. */
.hero::before {
  content: "";
  position: absolute;
  inset-inline-start: -12rem;
  top: -14rem;
  width: 34rem;
  height: 34rem;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 68%);
  pointer-events: none;
}

.hero > * { position: relative; }

.hero p.lede { font-size: 1.25rem; max-width: var(--measure); }

/* ---- ray divider ------------------------------------------------------- */

.rays {
  height: 0.5rem;
  border: 0;
  margin-block: 0 clamp(2rem, 5vw, 3rem);
  background: repeating-linear-gradient(
    90deg,
    var(--sun) 0 0.5rem,
    transparent 0.5rem 1.25rem
  );
}

/* ---- content blocks ---------------------------------------------------- */

.section { padding-block: clamp(2rem, 5vw, 3.5rem); }

.cards {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  padding: 0;
  list-style: none;
}

.card {
  background: var(--blue-soft);
  border: 1px solid var(--stone);
  border-top: 4px solid var(--blue);
  padding: 1.5rem;
}

.card h3 { margin-top: 0; }

.facts { list-style: none; padding: 0; }
.facts li { padding-block: 0.6rem; border-bottom: 1px solid var(--stone); }

/* ---- footer ------------------------------------------------------------ */

.site-footer {
  margin-top: 4rem;
  background: var(--blue-deep);
  color: #fff;
  padding-block: 2.5rem;
}

.site-footer a { color: var(--sun); }

/* ---- right to left ----------------------------------------------------- */

[dir="rtl"] .brand-name { letter-spacing: 0; }

@media (max-width: 40rem) {
  .brand img { height: 4.25rem; }
  .masthead { justify-content: center; }
  .nav { justify-content: center; }
  .nav a { font-size: 0.9rem; padding: 0.4rem 0.65rem; }
}

/* .hero::before needs no [dir="rtl"] override: its base inset-inline-start
   already resolves to physical left under ltr and physical right under
   rtl, so it self-mirrors. Logical properties handle the rest; only
   genuinely mirrored bits go here. */

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

/* ---- gallery ----------------------------------------------------------- */

.gallery {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fill, minmax(min(22rem, 100%), 1fr));
}

.shot { margin: 0; }

.shot img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--stone);
  border: 1px solid var(--stone);
}

.shot-caption {
  padding-block-start: 0.6rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.shot-caption span { display: block; }

/* A multi-paragraph caption renders as several sibling spans in the same
   language; give consecutive paragraphs a little air so they read as
   distinct sentences rather than one run-on block. */
.shot-caption span + span { margin-block-start: 0.2rem; }

/* The centre's own Arabic caption sits beside its translation; each carries
   its own dir, so neither is laid out in the other's direction. */
.shot-caption span[lang="ar"] { font-family: var(--font-ar); }
.shot-caption span[lang="en"] { font-family: var(--font-en-body); }

.shot-source {
  display: inline-block;
  margin-block-start: 0.35rem;
  font-size: 0.8rem;
  color: var(--navy);
  text-decoration-style: dotted;
}

/* ---- video ------------------------------------------------------------- */

.reel { margin: 0; }

.reel-player {
  display: block;
  width: 100%;
  height: auto;
  background: var(--ink);
  border: 1px solid var(--stone);
}

.reel-caption {
  padding-block-start: 0.6rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.reel-caption span { display: block; }
.reel-caption span + span { padding-block-start: 0.35rem; }

/* The centre's own Arabic caption sits beside its translation; each carries
   its own dir, so neither is laid out in the other's direction. */
.reel-caption span[lang="ar"] { font-family: var(--font-ar); }
.reel-caption span[lang="en"] { font-family: var(--font-en-body); }

.reel-source {
  display: inline-block;
  margin-block-start: 0.35rem;
  font-size: 0.8rem;
  color: var(--navy);
  text-decoration-style: dotted;
}

/* ---- contact ----------------------------------------------------------- */

.contact { margin-block-start: 0.75rem; }

.contact-line {
  margin: 0;
  padding-block: 0.15rem;
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.contact-line > span { opacity: 0.75; font-size: 0.9rem; }

.contact-link {
  color: var(--sun);
  text-underline-offset: 0.2em;
}

/* ---- activities -------------------------------------------------------- */

.activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(min(20rem, 100%), 1fr));
}

.activity-card {
  background: var(--paper);
  border: 1px solid var(--stone);
  border-radius: 0.5rem;
  overflow: hidden;
}

.activity-link { display: block; color: inherit; text-decoration: none; height: 100%; }
.activity-link:hover { color: inherit; }
.activity-link:hover h3 { text-decoration: underline; }

.activity-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
  background: var(--blue-soft);
}

.activity-text { padding: 1rem 1.25rem 1.25rem; }
.activity-text h3 { margin: 0.25rem 0 0.5rem; font-size: 1.25rem; }
.activity-text p { margin: 0; }

.activity-date {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue);
}

.hero .activity-date { color: var(--sun); margin-bottom: 0.5rem; }

.activity-photos { margin-block: 2rem; }

.button {
  display: inline-block;
  margin-block-start: 1.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.button:hover { background: var(--blue-deep); color: #fff; }
