/* =============================================================================
   fiqhcenter.com — main stylesheet
   Single-page Arabic (RTL) site. Icons are an inline SVG sprite in
   index.html; photography and pattern textures live in assets/img/.
   ========================================================================== */

/* ---------------------------------------------------------------- 1. Tokens */
:root {
  --cream:    #F6F1E7;
  --cream-2:  #EFE8DA;
  --paper:    #FCFAF5;
  --green:    #1D4534;
  --green-d:  #163527;
  --green-l:  #27563F;
  --gold:     #BE9B5A;
  --gold-l:   #D9BE86;
  --ink:      #2A2A28;
  --ink-2:    #5C584F;
  --line:     rgba(190, 155, 90, .34);
  --line-2:   rgba(190, 155, 90, .18);

  /* Modular type scale, ratio ~1.25. Seven steps and nothing in between:
     the previous 18 ad-hoc sizes (13.6px, 15.8px, 14.3px) read as generated. */
  --fs-xs:   13px;    /* meta, tags, labels, footer links, legal */
  --fs-base: 16px;    /* body copy, nav, buttons */
  --fs-md:   20px;    /* section leads, card headings */
  --fs-lg:   25px;    /* stat figures, date numerals */
  --fs-xl:   clamp(24px, 2.4vw, 31px);  /* hero statement */
  --fs-2xl:  clamp(28px, 3vw, 39px);    /* section titles */

  --font-body:    "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-display: "Tajawal", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;

  --wrap: 1360px;
  --gutter: 24px;
  --header-h: 88px;
  --radius: 14px;
  --radius-lg: 18px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ------------------------------------------------------------- 2. Base/reset */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* keeps section headings clear of the sticky header when jumping via anchors */
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

/* Display face carries every heading. Weight does the work a second sans
   family cannot on its own: 800 display against 400 body. */
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.45;
}
p  { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
/* A class-level `display` beats the UA's [hidden] rule, which silently broke
   the research filter: rows were marked hidden and kept rendering. */
[hidden] { display: none !important; }
a  { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.ico { width: 20px; height: 20px; flex: none; }
.ico--sm { width: 15px; height: 15px; }

/* Latin runs (email, phone, "+320") inside RTL text */
.ltr, .num { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.ltr { overflow-wrap: anywhere; }
a[href^="tel:"] { white-space: nowrap; overflow-wrap: normal; }

/* Grid and flex children default to min-width:auto, which lets a long
   unbreakable run (an email address, a wide card) push past its track and
   give the whole page a horizontal scrollbar on narrow screens. */
.cards > *, .info-list > *, .info-list li > *, .event > *,
.svc-grid > *, .index__row > *, .footer__grid > *, .pillar > * { min-width: 0; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  inset-inline-start: 50%;
  top: -60px;
  transform: translateX(50%);
  z-index: 200;
  padding: 10px 20px;
  background: var(--green);
  color: var(--cream);
  border-radius: 0 0 10px 10px;
  transition: top .2s var(--ease);
}
.skip-link:focus-visible { top: 0; }

/* ------------------------------------------------------ 3. Shared typography */
.section-title {
  font-size: var(--fs-2xl);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--green);
}
.section-title--light { color: var(--cream); }

.ornament {
  width: 210px;
  height: auto;          /* aspect comes from the 320x24 viewBox */
  margin: 16px auto 0;
  color: var(--gold);
}
.ornament--light { color: var(--gold-l); }

.hero__lead,
.about__body p,
.section-lead,
.index__body p,
.card > p,
.cta__text p,
.footer__col p { text-align: justify; }
.hero__lead { text-align-last: center; }

.section-lead {
  max-width: 29em;   /* ~73 Arabic characters; ch measures the Latin zero */
  margin: 14px 0 0;
  color: var(--ink-2);
  font-size: var(--fs-md);
}
.section-lead--light { color: rgba(246, 241, 231, .78); }
.partners .section-lead { margin-inline: auto; }

.section { padding-block: clamp(64px, 8vw, 104px); }
.section-head { text-align: start; margin-bottom: 40px; }
/* Green bands are ceremonial: they keep the centred, ornamented treatment. */
.partners .section-head { text-align: center; }

.tag {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(190, 155, 90, .09);
  color: #7A5C26;
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.8;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-block: 8px;   /* 24px -> 40px: WCAG 2.5.8 floor is 24 */
  color: var(--green);
  font-size: var(--fs-xs);
  font-weight: 600;
  transition: gap .2s var(--ease), color .2s var(--ease);
}
.link:hover { color: var(--gold); gap: 11px; }

/* -------------------------------------------------------------- 4. Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease),
              border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn--sm { padding: 9px 18px; font-size: var(--fs-xs); }

.btn--primary { background: var(--green); color: var(--cream); }
.btn--primary:hover { background: var(--green-l); }

.btn--ghost { border-color: var(--line); color: var(--green); background: var(--paper); }
.btn--ghost:hover { background: rgba(190, 155, 90, .14); }

.btn--gold { background: var(--gold); color: #241708; }
.btn--gold:hover { background: var(--gold-l); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.icon-btn:hover { background: rgba(190, 155, 90, .16); color: var(--green); }

/* --------------------------------------------------------------- 5. Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 241, 231, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.header.is-stuck {
  border-bottom-color: var(--line-2);
  box-shadow: 0 10px 30px -26px rgba(29, 69, 52, .8);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: var(--header-h);
}

/* Brand: the client's calligraphic wordmark (transparent PNG, 560x134) */
.brand { display: flex; align-items: center; flex: none; }
.brand__logo { height: 56px; width: auto; }

.nav { margin-inline-start: auto; }
.nav__list { display: flex; align-items: center; gap: 26px; }
.nav__extra { display: none; }

.nav__link {
  position: relative;
  display: block;
  padding-block: 6px;
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color .2s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -2px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .25s var(--ease);
}
.nav__link:hover { color: var(--green); }
.nav__link.is-active { color: var(--ink); font-weight: 600; }
.nav__link.is-active::after { transform: scaleX(1); }

.header__tools { display: flex; align-items: center; gap: 12px; flex: none; }
.header__divider { width: 1px; height: 20px; background: var(--line); }
.lang {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .05em;
  padding: 6px 4px;
  color: var(--ink-2);
  transition: color .2s var(--ease);
}
.lang:hover { color: var(--green); }
.burger { display: none; }
.burger__close { display: none; }
.burger.is-open .burger__open { display: none; }
.burger.is-open .burger__close { display: block; }

/* ------------------------------------------------------------ 6. Hero (home) */
/* The design opens on a split: a full-height image panel down the left edge,
   the centre's statement centred in the space beside it. No scrim, because the
   photograph is a panel now rather than a backdrop for text. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(64px, 8vw, 104px);
  background: var(--cream);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--gold);
  -webkit-mask: url("../img/pattern.svg") center / 300px repeat;
  mask: url("../img/pattern.svg") center / 300px repeat;
  opacity: .1;
  pointer-events: none;
}
/* The photograph is not a panel with an edge; it dissolves into the cream
   partway across, which is what the design does. The mask is physical
   (left-to-right) because the image sits on the physical left in RTL. */
.hero__media {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: 48%;
  background: url("../img/hero-courtyard.jpg") left center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to right, #000 0 52%, transparent 96%);
  mask-image: linear-gradient(to right, #000 0 52%, transparent 96%);
}
.hero__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-inline-end: 40%;
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* The wordmark is the hero's dominant mark, as in the design. */
.hero__mark {
  width: clamp(240px, 33vw, 500px);
  height: auto;
  margin-inline: auto;
}
.hero .ornament { width: 330px; margin-block: 20px 24px; }
.hero__title {
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -.015em;
  color: var(--green);
}
.hero__lead {
  max-width: 46ch;
  margin: 18px auto 0;
  font-size: var(--fs-md);
  line-height: 2;
  color: var(--ink-2);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
}

/* ------------------------------------------------------------ 7. About */
.about {
  position: relative;
  background: var(--cream);
  padding-block: clamp(56px, 7vw, 92px);
}
.about__inner { position: relative; }
.about__head { text-align: center; }
.about__body {
  max-width: 29em;   /* ~73 characters a line, measured, not assumed */
  margin: 30px auto 0;
  text-align: start;
  color: var(--ink-2);
  font-size: var(--fs-base);
}
.about__body p + p { margin-top: 16px; }

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  /* without the photo the row would stretch to the full measure and leave the
     short card copy stranded; this keeps the design's card proportions */
  max-width: 1120px;
  margin: 46px auto 0;
}
.pillar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.pillar:hover { border-color: var(--gold); }
.pillar__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold);
}
.pillar__icon .ico { width: 24px; height: 24px; }
.pillar__rule { width: 1px; height: 44px; flex: none; background: var(--line); }
.pillar__text h3 { font-size: var(--fs-base); color: var(--green); }
.pillar__text p { font-size: var(--fs-xs); line-height: 1.75; color: var(--ink-2); }

/* --------------------------------------------------------- 8. Services band */
.services { background: var(--cream); padding-bottom: clamp(56px, 7vw, 92px); }
.services__band {
  position: relative;
  overflow: hidden;
  background: var(--green);
  padding-block: clamp(56px, 7vw, 84px) clamp(72px, 9vw, 104px);
}
/* Photographed Islamic star geometry, dropped almost to nothing so it reads
   as texture on the green rather than as a picture. */
.services__band, .partners { isolation: isolate; }
.services__band::before,
.partners::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--gold-l);
  -webkit-mask: url("../img/pattern.svg") center / 260px repeat;
  mask: url("../img/pattern.svg") center / 260px repeat;
  opacity: .12;
  pointer-events: none;
}
.services__band .container { position: relative; z-index: 1; }
.services .section-title { text-align: center; margin-bottom: 40px; }

.svc-grid {
  display: grid;
  /* three services left; cap the row and centre it so the cards line up with
     the stats panel below instead of stretching across the whole band */
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 84%;
  margin-inline: auto;
  justify-content: center;
}
.svc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 30px 18px;
  text-align: center;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(217, 190, 134, .2);
  border-radius: var(--radius);
  transition: background-color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.svc:hover {
  background: rgba(255, 255, 255, .085);
  border-color: rgba(217, 190, 134, .5);
  transform: translateY(-3px);
}
.svc__icon { width: 40px; height: 40px; color: var(--gold-l); }
.svc h3 { font-size: var(--fs-base); line-height: 1.7; color: var(--gold-l); }
.svc p { font-size: var(--fs-xs); line-height: 1.9; color: rgba(246, 241, 231, .72); }

/* Stats panel — overlaps the bottom edge of the green band */
.services__stats { position: relative; z-index: 2; margin-top: -46px; }
.stats-wrap { max-width: 84%; margin-inline: auto; }
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 20px 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.stat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding-block: 6px;
}
.stat + .stat { border-inline-start: 1px solid var(--line-2); }
.stat .ico { width: 30px; height: 30px; color: var(--gold); }
.stat__text { display: flex; flex-direction: column; line-height: 1.4; }
.stat .num { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 800; color: var(--green); }
.stat__label { font-size: var(--fs-xs); color: var(--ink-2); }

/* ------------------------------------------------------------- 9. Cards grid */
.cards { display: grid; gap: 22px; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 26px 24px;
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.card:hover { border-color: var(--gold); }
.card h3 { font-size: var(--fs-md); line-height: 1.6; color: var(--green); }
.card > p { font-size: var(--fs-base); color: var(--ink-2); }
.card .link { margin-top: auto; }

.card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: var(--fs-xs);
  color: var(--ink-2);
}
.card__meta span { display: inline-flex; align-items: center; }
.card__meta span + span::before {
  content: "";
  width: 4px;
  height: 4px;
  margin-inline-end: 14px;
  border-radius: 50%;
  background: var(--gold);
  opacity: .6;
}

.empty-note {
  margin-top: 28px;
  text-align: center;
  color: var(--ink-2);
  font-size: var(--fs-base);
}

/* ----------------------------------------------------------- 10. Research */
/* A journal contents page, not a card grid: ruled rows, a running number, and
   metadata held in its own column. Counters skip [hidden] rows, so filtering
   renumbers on its own. */
.index { counter-reset: idx; border-top: 1px solid var(--line); }
.index__row {
  counter-increment: idx;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 200px auto;
  align-items: baseline;
  gap: 8px 28px;
  padding-block: 26px;
  border-bottom: 1px solid var(--line-2);
  transition: background-color .2s var(--ease);
}
.index__row:hover { background: rgba(190, 155, 90, .05); }
.index__num {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.index__num::before { content: counter(idx, decimal-leading-zero); }
.index__body { max-width: 29em; }
.index__body h3 { font-size: var(--fs-md); color: var(--green); }
.index__body p { margin-top: 6px; font-size: var(--fs-base); color: var(--ink-2); }
.index__meta {
  /* two by two, so metadata never sets the row height on its own */
  display: grid;
  grid-template-columns: repeat(2, auto);
  justify-content: start;
  gap: 2px 16px;
  font-size: var(--fs-xs);
  color: var(--ink-2);
}
.index__field { color: #7A5C26; font-weight: 600; }
.index__cta { white-space: nowrap; }


.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 34px;
}
.chip {
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-size: var(--fs-xs);
  font-weight: 500;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.chip:hover { border-color: var(--gold); color: var(--green); }
.chip.is-on { background: var(--green); border-color: var(--green); color: var(--cream); }

/* ------------------------------------------------------------- 11. Events */
.events { background: var(--cream-2); }
.events__list { display: grid; gap: 14px; }
.event {
  display: grid;
  grid-template-columns: 82px 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 18px 22px;
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.event:hover { border-color: var(--gold); }
.event__date {
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 12px 6px;
  border-radius: 12px;
  background: var(--green);
  color: var(--cream);
  line-height: 1.2;
}
.event__date b { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 800; }
.event__date span { font-size: var(--fs-xs); color: var(--gold-l); }
.event__body { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.event__body h3 { font-size: var(--fs-md); color: var(--green); }
.event__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  font-size: var(--fs-xs);
  color: var(--ink-2);
}
.event__meta > span { display: inline-flex; align-items: center; gap: 7px; }
.event__meta .ico { color: var(--gold); }
.event__cta { white-space: nowrap; }

/* ----------------------------------------------------------- 12. Partners */
.partners {
  position: relative;
  overflow: hidden;
  background: var(--green);
  padding-block: clamp(64px, 8vw, 104px);
}
.partners::before { -webkit-mask-position: center 30%; mask-position: center 30%; opacity: .1; }
.partners .container { position: relative; z-index: 1; }

/* An inscription band, the way partner names sit on a building frieze:
   one flowing line separated by gold lozenges. Eight identical tiles were
   the page's fourth card grid and said nothing the names do not. */
.inscription {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  max-width: 62ch;
  margin-inline: auto;
  padding-block: 26px;
  border-block: 1px solid rgba(217, 190, 134, .25);
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 500;
  line-height: 2.1;
  color: rgba(246, 241, 231, .92);
}
.inscription li { display: inline-flex; align-items: center; }
/* Separator trails its own item rather than leading the next one, so a wrap
   ends a line with the lozenge instead of opening one with it. */
.inscription li:not(:last-child)::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-inline: 18px;
  background: var(--gold);
  transform: rotate(45deg);
  opacity: .75;
}

/* --------------------------------------------------------------- 13. News */
/* A tinted ground with the same lattice laid over it; the three differ by tint
   and by where the tile is anchored, so they read as a set. */
.news__art {
  position: relative;
  display: block;
  width: 100%;
  height: 132px;
  margin-bottom: 4px;
  border-radius: 12px;
  overflow: hidden;
}
.news__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--gold-l);
  -webkit-mask: url("../img/pattern.svg") center / 150px repeat;
  mask: url("../img/pattern.svg") center / 150px repeat;
  opacity: .3;
}
.news__art--a { background: linear-gradient(135deg, #1D4534, #2C6349); }
.news__art--b { background: linear-gradient(135deg, #7A5F2C, #B08E4E); }
.news__art--c { background: linear-gradient(135deg, #24503C, #6E7C52); }
.news__art--b::after { -webkit-mask-position: 40% 60%; mask-position: 40% 60%; opacity: .34; }
.news__art--c::after { -webkit-mask-position: 70% 30%; mask-position: 70% 30%; }
.card--news { padding-top: 18px; }

/* ------------------------------------------------------------ 14. Contact */
.cta {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 42px 44px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
/* Carved Alhambra stucco, faint, as the CTA panel's texture. */
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--gold);
  -webkit-mask: url("../img/pattern.svg") center / 230px repeat;
  mask: url("../img/pattern.svg") center / 230px repeat;
  opacity: .13;
  pointer-events: none;
}
.cta__text { position: relative; z-index: 1; }
.cta__text h2 { font-size: var(--fs-2xl); font-weight: 800; color: var(--green); }
.cta__text p { margin-top: 8px; color: var(--ink-2); font-size: var(--fs-base); }
.cta__actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 14px; }

.contact__details { margin-top: 44px; }

.info-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.info-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
}
.info-list__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  background: rgba(190, 155, 90, .12);
  color: var(--gold);
}
.info-list__body { display: flex; flex-direction: column; line-height: 1.7; }
.info-list__body b { font-size: var(--fs-xs); color: var(--green); }
.info-list__body span, .info-list__body a { font-size: var(--fs-base); color: var(--ink-2); }
.info-list__body a:hover { color: var(--gold); }

.contact__social { margin-top: 34px; text-align: center; }
.contact__social h3 { font-size: var(--fs-md); color: var(--green); margin-bottom: 16px; }
.contact__social .socials { justify-content: center; margin-top: 0; }
/* Specificity has to beat `.socials a` in the footer block below, which is
   coloured for a dark background. */
.socials.socials--lg a {
  width: 46px;
  height: 46px;
  border-color: var(--line);
  color: var(--green);
}
.socials.socials--lg a:hover { background: var(--green); border-color: var(--green); color: var(--cream); }
.socials.socials--lg .ico { width: 21px; height: 21px; }

/* Pattern layers are flat colour cut by a mask. If mask is unsupported the
   colour would cover the surface, so withdraw the layer entirely. */
@supports not ((-webkit-mask: url("#m")) or (mask: url("#m"))) {
  .hero::before,
  .services__band::before,
  .partners::before,
  .cta::before,
  .news__art::after { display: none; }
}

/* -------------------------------------------------------------- 15. Footer */
.footer {
  position: relative;
  overflow: hidden;
  background: var(--green);
  color: rgba(246, 241, 231, .78);
}
.footer__ornament {
  position: absolute;
  inset-inline-end: 30px;
  bottom: 74px;
  width: 132px;
  height: 132px;
  color: rgba(217, 190, 134, .13);
  pointer-events: none;
}
.footer__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 34px;
  padding-block: 62px 34px;
}
.footer__col h4 { font-size: var(--fs-md); color: var(--gold-l); margin-bottom: 16px; }
.footer__col p { font-size: var(--fs-md); line-height: 2; }
.footer__links li a, .footer__contact li {
  font-size: var(--fs-base);
  line-height: 1.7;
  transition: color .2s var(--ease);
}
/* the anchor box was 19px tall, under the 24px minimum; the padding takes
   the space the old 2.2 line-height was already reserving */
.footer__links li a { display: block; padding-block: 5px; }
.footer__links li a:hover { color: var(--gold-l); }
.footer__contact li { display: flex; align-items: flex-start; gap: 9px; }
.footer__contact .ico { margin-top: 8px; color: var(--gold); }
.footer__contact a { display: inline-block; padding-block: 4px; }
.footer__contact a:hover { color: var(--gold-l); }

.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(217, 190, 134, .28);
  border-radius: 50%;
  color: rgba(246, 241, 231, .82);
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.socials a:hover { background: var(--gold); border-color: var(--gold); color: var(--green-d); }
.socials .ico { width: 17px; height: 17px; }

.footer__bar {
  position: relative;
  z-index: 1;
  padding-block: 18px;
  border-top: 1px solid rgba(217, 190, 134, .16);
  text-align: center;
  font-size: var(--fs-xs);
  color: rgba(246, 241, 231, .62);
}

/* ---------------------------------------------------------- 16. Responsive */
/* Eight long Arabic labels at 16px need roughly 1200px of bar to sit without
   crowding. Below that the nav collapses rather than being squeezed. */
@media (max-width: 1180px) {
  .icon-btn { width: 44px; height: 44px; }
  .burger { display: inline-grid; }
  .header__tools { margin-inline-start: auto; }
  .header__library, .header__lang, .header__divider { display: none; }

  /* the panel is positioned against .header (sticky = a containing block),
     so it spans exactly the viewport width and cannot cause overflow */
  .nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 18px var(--gutter) 24px;
    background: var(--cream);
    border-bottom: 1px solid var(--line-2);
    box-shadow: 0 22px 34px -28px rgba(29, 69, 52, .9);
  }
  .nav.is-open { display: flex; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link { padding: 12px 4px; border-bottom: 1px solid var(--line-2); }
  .nav__link::after { display: none; }
  .nav__link.is-active { color: var(--gold); }
  .nav__extra { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
}

@media (max-width: 1024px) {
  .brand__logo { height: 42px; }

  .info-list { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 980px) {
  .index__row { grid-template-columns: 44px minmax(0, 1fr); }
  .index__meta { grid-column: 2; flex-direction: row; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; }
  .index__cta { grid-column: 2; margin-top: 12px; }
  .inscription { font-size: var(--fs-base); }
}

@media (max-width: 860px) {
  /* the photograph stops dissolving sideways and becomes a band above */
  .hero { padding-block: 0 clamp(48px, 8vw, 72px); }
  .hero__media {
    position: static;
    width: 100%;
    height: 260px;
    margin-bottom: 36px;
    background-position: center;
    -webkit-mask-image: linear-gradient(to bottom, #000 0 74%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0 74%, transparent 100%);
  }
  .hero__inner { padding-inline-end: var(--gutter); min-height: 0; }
  .hero .ornament { width: 240px; }

  .pillars { grid-template-columns: 1fr; }
  .cards--3 { grid-template-columns: repeat(2, 1fr); }
  .svc-grid { grid-template-columns: repeat(2, 1fr); max-width: 100%; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats-wrap { max-width: 100%; }
  .stat:nth-child(3) { border-inline-start: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line-2); padding-top: 16px; }
  .cta { flex-direction: column; align-items: flex-start; padding: 32px 28px; }
}

@media (max-width: 640px) {
  :root { --gutter: 18px; }

  .cards--3, .svc-grid { grid-template-columns: 1fr; }

  .event { grid-template-columns: 68px 1fr; gap: 14px 16px; }
  .event__cta { grid-column: 2; justify-self: start; padding-block: 12px; }

  /* two 161px columns broke the email mid-word and split the phone number */
  .info-list { grid-template-columns: 1fr; }

  .footer__grid { grid-template-columns: 1fr; }
  .footer__ornament { display: none; }
  .hero__actions .btn, .cta__actions .btn { flex: 1 1 auto; }
}

/* ------------------------------------------------------- 17. Motion & print */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .btn:hover, .card:hover, .svc:hover { transform: none; }
}

@media print {
  .header, .skip-link, .chips, .hero__media, .footer__ornament { display: none; }
  body { background: #fff; }
  .card, .event, .info-list li { break-inside: avoid; }
}
