/* ==========================================================================
   Shahjalal Masjid — site styles
   One file for every page. Colours, fonts and ornaments are set in :root.
   The look: an illuminated page. Deep maroon "night" with gold geometry at
   the top (header, verse on the homepage, page titles, prayer board),
   warm parchment for reading below.
   ========================================================================== */

:root {
  /* Colour */
  --night: #2A0507;          /* deepest maroon: header, verse, footer */
  --maroon: #5A0000;         /* brand */
  --maroon-2: #741419;
  --gold: #CFAE68;           /* gold on dark: 8.6:1 on --night */
  --gold-soft: #E6CF9C;
  --gold-line: #A8843E;      /* gold rules on parchment (decorative) */
  --gold-text: #7A5A1C;      /* gold that is safe for text on parchment */
  --parchment: #FBF5E9;      /* page ground */
  --parchment-2: #F3E8D2;    /* tinted panels */
  --line: #E2D1AF;
  --ink: #2B1A15;
  --ink-soft: #5A463D;
  --on-dark: #F7EDD8;
  --on-dark-soft: #DCC8AE;

  /* Type */
  --font: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Reem Kufi", "Atkinson Hyperlegible Next", sans-serif;
  --font-quran: "Amiri Quran", "Amiri", "Noto Naskh Arabic", "Geeza Pro", serif;
  --font-ar: "Amiri", "Noto Naskh Arabic", "Geeza Pro", serif;
  --step--1: 1rem;
  --step-0: 1.125rem;
  --step-1: 1.3125rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 1.875rem);
  --step-3: clamp(1.875rem, 1.4rem + 2vw, 2.625rem);
  --step-4: clamp(2.25rem, 1.6rem + 2.8vw, 3.25rem);

  /* Space */
  --gutter: clamp(1rem, 4vw, 2rem);
  --section: clamp(3rem, 7vw, 5.5rem);
  --radius: 14px;
  --max: 74rem;

  /* Pointed arch, traced from the logo */
  --arch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 50' preserveAspectRatio='none'%3E%3Cpath d='M0 50V30C0 13 31 7 50 0c19 7 50 13 50 30v20z'/%3E%3C/svg%3E");

  /* Eight-fold star-and-cross lattice, after the screen in the logo */
  --lattice: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80' fill='none' stroke='%23CFAE68' stroke-width='1'%3E%3Cpath d='M40 12 68 40 40 68 12 40z'/%3E%3Cpath d='M20.2 20.2h39.6v39.6H20.2z'/%3E%3Cpath d='M40 0v12M68 40h12M40 68v12M0 40h12M0 0l20.2 20.2M80 0 59.8 20.2M80 80 59.8 59.8M0 80l20.2-20.2'/%3E%3Ccircle cx='40' cy='40' r='6'/%3E%3C/svg%3E");

  /* Border band: a chain of eight-point stars */

  /* Single star, for ornaments and bullets */
  --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23A8843E'%3E%3Cpath d='M23 12 12 23 1 12 12 1z'/%3E%3Cpath d='M19.78 19.78H4.22V4.22h15.56z'/%3E%3C/svg%3E");
  --star-gold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23CFAE68'%3E%3Cpath d='M23 12 12 23 1 12 12 1z'/%3E%3Cpath d='M19.78 19.78H4.22V4.22h15.56z'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; background: var(--night); }
body {
  margin: 0; background: var(--parchment); color: var(--ink);
  font-family: var(--font); font-size: var(--step-0); line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); word-spacing: .14em; line-height: 1.2; margin: 0 0 .5em; color: var(--maroon); text-wrap: balance; font-weight: 600; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; max-width: 68ch; }
a { color: var(--maroon); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--maroon-2); text-decoration-thickness: 2px; }
::selection { background: var(--maroon); color: var(--on-dark); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
[lang="ar"] { font-family: var(--font-ar); }
.tnum { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--gold); color: var(--night); padding: .75rem 1rem; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip:focus { top: 1rem; }
.skip:hover { color: var(--night); }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.lede { font-size: var(--step-1); color: var(--ink-soft); line-height: 1.55; }
.muted { color: var(--ink-soft); }

/* Dark surfaces share the lattice */
.dark { background-color: var(--night); color: var(--on-dark); position: relative; isolation: isolate; }
.dark::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--lattice) center top / 80px 80px; opacity: .13; pointer-events: none; }
.dark h1, .dark h2, .dark h3 { color: var(--gold-soft); }
.page-head, .verse-section { border-bottom: 1px solid var(--gold-line); }
.dark p { color: var(--on-dark); }
.dark a:not(.btn) { color: var(--gold-soft); }
.dark a:not(.btn):hover { color: #fff; }


/* Ornamental divider: line · star · line */
.ornament { display: flex; align-items: center; justify-content: center; gap: .75rem; color: var(--gold-line); margin: 0 auto 1rem; max-width: 18rem; }
.ornament::before, .ornament::after { content: ""; flex: 1; height: 1px; background: currentColor; }
.ornament i { width: 18px; height: 18px; background: var(--star) center / contain no-repeat; flex: none; }
.dark .ornament { color: var(--gold); }
.dark .ornament i { background-image: var(--star-gold); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem; padding: .7rem 1.4rem; border-radius: 999px;
  border: 2px solid var(--maroon); background: var(--maroon); color: var(--on-dark);
  font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { background: var(--maroon-2); border-color: var(--maroon-2); color: #fff; text-decoration: none; }
.btn--ghost { background: transparent; color: var(--maroon); }
.btn--ghost:hover { background: var(--maroon); color: var(--on-dark); }
.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--night); }
.btn--gold:hover { background: var(--gold-soft); border-color: var(--gold-soft); color: var(--night); }
.btn--gold-ghost { background: transparent; border-color: var(--gold); color: var(--gold-soft); }
.btn--gold-ghost:hover { background: var(--gold); color: var(--night); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.link-arrow { font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.link-arrow::after { content: "→"; transition: transform .2s ease; }
.link-arrow:hover::after { transform: translateX(3px); }

/* ---------- Next-prayer strip (inner pages) ---------- */
.strip { background: #1C0304; color: var(--on-dark-soft); font-size: var(--step--1); border-bottom: 1px solid rgba(207, 174, 104, .25); }
.strip .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.6rem; }
.strip a { color: var(--gold-soft); font-weight: 700; white-space: nowrap; }
.strip strong { color: var(--gold); }
.strip .strip-next { font-weight: 400; text-decoration: none; white-space: normal; color: var(--on-dark-soft); }
.strip .strip-next:hover { text-decoration: underline; color: #fff; }
.strip [data-next]:empty::before { content: "Today's prayer times"; }
@media (max-width: 560px) { .strip .strip-all { display: none; } }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--night); border-bottom: 1px solid rgba(207, 174, 104, .3); }
.site-header > .wrap { display: flex; align-items: center; gap: 1rem; min-height: 4.75rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; margin-right: auto; color: var(--on-dark); }
.brand img { width: 44px; height: auto; }
.brand-name { display: block; font-family: var(--font-display); word-spacing: .12em; font-weight: 600; font-size: 1.3rem; line-height: 1.1; color: var(--gold-soft); }
.brand-sub { display: block; font-size: .875rem; color: var(--on-dark-soft); line-height: 1.3; }
.brand:hover { color: var(--on-dark); text-decoration: none; }

.nav { display: none; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .15rem; }
.nav a { display: block; padding: .55rem .7rem; border-radius: 8px; text-decoration: none; color: var(--on-dark); font-weight: 600; font-size: 1.0625rem; position: relative; }
.nav a:hover { color: #fff; background: rgba(207, 174, 104, .14); }
.nav a[aria-current="page"] { color: var(--gold); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 10px; height: 10px; margin-left: -5px; background: var(--star-gold) center / contain no-repeat; }
.header-donate { min-height: 2.75rem; padding: .5rem 1.15rem; }
.menu-btn {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; padding: .5rem .9rem; border-radius: 999px;
  background: transparent; border: 1px solid rgba(207, 174, 104, .55); color: var(--gold-soft); font: inherit; font-weight: 700; cursor: pointer;
}
.menu-btn svg { width: 1.3rem; height: 1.3rem; }
.menu-btn .i-close { display: none; }
.menu-open .menu-btn .i-open { display: none; }
.menu-open .menu-btn .i-close { display: block; }

.mobile-menu { display: none; border-top: 1px solid rgba(207, 174, 104, .3); background: var(--night); max-height: calc(100dvh - 4.75rem); overflow-y: auto; }
.menu-open .mobile-menu { display: block; }
.mobile-menu .wrap { display: block; }
.mobile-menu ul { list-style: none; margin: 0; padding: .5rem 0 1rem; }
.mobile-menu li a {
  display: flex; align-items: center; justify-content: space-between; min-height: 3.5rem; padding: .5rem 0;
  border-bottom: 1px solid rgba(207, 174, 104, .2); font-size: 1.25rem; font-weight: 700; text-decoration: none; color: var(--on-dark);
}
.mobile-menu li a::after { content: ""; width: 12px; height: 12px; background: var(--star-gold) center / contain no-repeat; opacity: .8; }
.mobile-menu li a[aria-current="page"] { color: var(--gold); }
.mobile-menu .menu-contact { padding: 0 0 1.5rem; color: var(--on-dark-soft); font-size: var(--step--1); }
.mobile-menu .menu-contact a { color: var(--gold-soft); font-weight: 700; }

@media (max-width: 420px) {
  .brand-sub { display: none; }
  .brand img { width: 38px; }
  .brand-name { font-size: 1.15rem; }
  .menu-btn span { display: none; }
  .menu-btn { padding-inline: .7rem; }
}
@media (min-width: 1100px) {
  .nav { display: block; }
  .menu-btn, .mobile-menu { display: none !important; }
}

/* ==========================================================================
   The verse — first thing on the homepage
   ========================================================================== */
.verse { text-align: center; padding-block: clamp(1.25rem, 4vw, 2.5rem) clamp(1.25rem, 3.5vw, 2.25rem); }
.verse .bismillah { font-family: var(--font-quran); color: var(--gold); font-size: clamp(1.15rem, 1rem + .8vw, 1.5rem); margin: 0 auto .4rem; line-height: 2; max-width: none; }
.verse blockquote { margin: 0; }
.verse .ar {
  font-family: var(--font-quran); color: #fff; max-width: 40rem; margin: 0 auto .75rem;
  font-size: clamp(1.45rem, 1.1rem + 1.9vw, 2.4rem); line-height: 1.95;
}
.verse .en { color: var(--on-dark); font-size: clamp(1.0625rem, 1rem + .4vw, 1.3125rem); max-width: 38rem; margin: 0 auto .6rem; line-height: 1.55; }
.verse cite { font-style: normal; color: var(--gold); font-weight: 700; font-size: .9375rem; letter-spacing: .02em; }
.verse .ornament { margin-bottom: .75rem; }
@media (max-width: 600px) {
  .verse .bismillah { font-size: 1rem; line-height: 1.7; margin-bottom: .1rem; }
  .verse .ornament { display: none; }
  .verse .ar { line-height: 1.8; margin-bottom: .35rem; }
  .verse .en { font-size: 1rem; margin-bottom: .3rem; }
  .verse cite { font-size: .875rem; }
  .verse-section + .board-section { padding-top: 1.25rem; }
  .verse-section + .board-section .board-title { margin-bottom: 1.25rem; }
  .verse-section + .board-section .board-title h2 { font-size: 1.6rem; }
}

/* Homepage hero: photos that slowly zoom while cross-fading, under a deep maroon veil */
.hero-slides { position: absolute; inset: 0; z-index: -2; overflow: hidden; background: var(--night); }
.hero-slides::after { content: ""; position: absolute; inset: 0; background:
  radial-gradient(70% 60% at 50% 50%, rgba(42, 5, 7, .45) 0%, rgba(42, 5, 7, 0) 100%),
  linear-gradient(180deg, rgba(42, 5, 7, .62) 0%, rgba(42, 5, 7, .40) 45%, rgba(42, 5, 7, .70) 100%); }
.verse-section::before { opacity: 0; }  /* the photos replace the lattice here */
.verse-section .bismillah, .verse-section .ar, .verse-section .en, .verse-section cite { text-shadow: 0 1px 2px rgba(20, 2, 3, .9), 0 0 18px rgba(20, 2, 3, .75); }
.hero-slide {
  position: absolute; inset: -2%; background-size: cover; background-position: center;
  opacity: 0; transition: opacity 2.5s ease-in-out;
  animation: ken-burns 24s ease-in-out infinite alternate; will-change: transform, opacity;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide:nth-child(odd) { transform-origin: 30% 40%; }
.hero-slide:nth-child(even) { transform-origin: 70% 60%; animation-direction: alternate-reverse; }
@keyframes ken-burns { from { transform: scale(1); } to { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .hero-slide { animation: none; transition: none; } }

/* Inner-page title band */
.page-title { text-align: center; padding-block: clamp(2.25rem, 6vw, 4rem); }
.page-title h1 { color: var(--gold-soft); margin: 0 0 .1em; }
.page-title .title-ar { display: block; font-family: var(--font-ar); color: var(--gold); font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); line-height: 1.6; margin: 0 auto .5rem; max-width: none; }
.page-title .lede { color: var(--on-dark-soft); margin-inline: auto; }
.page-title .btn-row { justify-content: center; }

/* ==========================================================================
   Prayer board (home + prayer times page)
   A dark panel with a stepped parapet (shurafat) along its top edge.
   Phone: rows. Desktop: five columns.
   ========================================================================== */
.board-section { padding-block: clamp(1.75rem, 4vw, 2.75rem) var(--section); }
.board-title { text-align: center; margin-bottom: 1.75rem; }
.board-title h1, .board-title h2 { margin: 0 0 .2rem; font-size: var(--step-3); }
.board-date { color: var(--ink-soft); font-size: var(--step--1); margin: 0 auto; }
.board-date .hijri { color: var(--gold-text); font-weight: 700; white-space: nowrap; }

.salah {
  position: relative; isolation: isolate; margin-top: 16px;
  background: var(--night); color: var(--on-dark);
  border: 1px solid var(--gold-line); border-radius: 4px 4px var(--radius) var(--radius);
  outline: 1px solid rgba(207, 174, 104, .45); outline-offset: -9px;
  padding: 1.5rem 1.25rem 1.25rem;
}
.salah::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--lattice) center / 80px 80px; opacity: .1; border-radius: inherit; }
/* the parapet */
.salah::after { content: ""; position: absolute; left: 14px; right: 14px; top: -16px; height: 16px; background: url("../images/shurafat.svg") center bottom / 28px 16px repeat-x; }

.salah-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: .1rem .6rem; text-align: center; padding: .25rem .5rem 1.1rem; margin-bottom: .5rem; border-bottom: 1px solid rgba(207, 174, 104, .35); }
.next-label { flex-basis: 100%; margin: 0; color: var(--gold); font-weight: 700; font-size: var(--step--1); }
.next-name { margin: 0; font-family: var(--font-display); font-size: var(--step-3); color: #fff; line-height: 1.15; }
.next-name [lang="ar"] { color: var(--gold-soft); font-size: .8em; margin-left: .2em; }
.next-time { margin: 0; font-size: var(--step-3); font-weight: 700; line-height: 1.15; color: var(--gold-soft); font-variant-numeric: tabular-nums; }
.next-time small { font-size: .55em; margin-left: .1em; font-weight: 600; }
.next-in { flex-basis: 100%; margin: .15rem 0 0; color: var(--on-dark-soft); }
.next-in strong { color: #fff; }

.arcade { list-style: none; margin: 0; padding: 0; }
.arcade li { display: grid; grid-template-columns: 1fr auto 5.9rem; gap: .75rem; align-items: center; padding: .75rem .6rem; border-top: 1px solid rgba(207, 174, 104, .22); }
.arcade .arcade-head { color: var(--gold); font-size: .9375rem; font-weight: 600; padding-block: .25rem .5rem; border-top: 0; }
.arcade .arcade-head span:not(:first-child) { text-align: right; }
.n-name { font-weight: 700; font-size: var(--step-1); color: #fff; line-height: 1.15; }
.n-name [lang="ar"] { display: block; font-weight: 400; font-size: 1.1rem; color: var(--gold-soft); line-height: 1.35; }
.n-begins { text-align: right; color: var(--on-dark-soft); font-size: var(--step-1); white-space: nowrap; font-variant-numeric: tabular-nums; }
.n-begins .asr2 { display: block; font-size: .9375rem; margin-top: .1rem; }
.n-jamaah { text-align: right; color: #fff; font-weight: 700; font-size: 1.75rem; white-space: nowrap; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ampm { font-size: max(.62em, .875rem); font-weight: 600; margin-left: .12em; color: var(--gold-soft); }
.mithl { display: inline-block; font-size: .8125rem; font-weight: 600; color: var(--gold); margin-right: .35em; letter-spacing: .01em; }
.n-begins .asr2 .mithl { color: var(--gold); }
.n-jamaah .second { display: block; font-size: 1rem; font-weight: 600; color: var(--gold-soft); margin-top: .15rem; }
.n-label { display: none; }
.arcade li.is-next { background: var(--gold); border-radius: 8px; border-top-color: transparent; }
.arcade li.is-next + li { border-top-color: transparent; }
.arcade li.is-next .n-name, .arcade li.is-next .n-jamaah { color: var(--night); }
.arcade li.is-next .n-name [lang="ar"], .arcade li.is-next .ampm, .arcade li.is-next .n-begins, .arcade li.is-next .n-label, .arcade li.is-next .mithl, .arcade li.is-next .second { color: #4A2A10; }
/* Past prayers are dimmed with colour (not transparency) so they stay readable */
.arcade li.is-past .n-name, .arcade li.is-past .n-jamaah { color: #C9B49A; }
.arcade li.is-past .n-begins, .arcade li.is-past .ampm, .arcade li.is-past .n-name [lang="ar"], .arcade li.is-past .n-label, .arcade li.is-past .mithl, .arcade li.is-past .second { color: #B39C82; }
.arcade li.sunrise { padding-block: .45rem; }
.arcade li.sunrise .n-name { font-size: var(--step--1); font-weight: 600; color: var(--on-dark-soft); }
.arcade li.sunrise .n-begins { font-size: var(--step--1); }
.arcade li.board-error { display: block; color: var(--on-dark); padding: 1rem; text-align: center; }
.sunrise-note { display: none; }
.salah.no-data .salah-head, .salah.no-data .sunrise-note { display: none !important; }

@media (max-width: 380px) {
  .salah { padding-inline: .8rem; }
  .arcade li { grid-template-columns: 1fr auto 5.2rem; gap: .5rem; padding-inline: .4rem; }
  .n-jamaah { font-size: 1.5rem; }
}

@media (min-width: 960px) {
  .verse .ar { max-width: 56rem; }
  .verse-section + .board-section { padding-top: 1.5rem; }
  .verse-section + .board-section .board-title { margin-bottom: 1.4rem; }
  .verse-section + .board-section .board-title h2 { font-size: 2.1rem; }
  .salah { padding: 1.25rem 2rem 1.25rem; }
  .salah-head { padding-bottom: .8rem; }
  .salah-head { justify-content: center; gap: .1rem 1rem; }
  .next-label, .next-in { flex-basis: auto; }
  .next-label::after { content: ":"; }
  .next-in::before { content: "· "; color: var(--gold); }
  .arcade { display: grid; grid-template-columns: repeat(5, 1fr); }
  .arcade .arcade-head, .arcade li.sunrise { display: none; }
  .arcade li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .1rem; border: 0; border-left: 1px solid rgba(207, 174, 104, .28); padding: 1rem .75rem 1.1rem; border-radius: 0; }
  .arcade li:nth-child(2) { border-left: 0; }
  .arcade li.board-error { grid-column: 1 / -1; border: 0; }
  .arcade li.is-next { border-radius: 10px; border-left-color: transparent; }
  .arcade li.is-next + li { border-left-color: transparent; }
  .n-name { display: flex; flex-direction: column-reverse; align-items: center; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; margin-bottom: .6rem; }
  .n-name [lang="ar"] { font-size: 2rem; line-height: 1.3; color: var(--gold); }
  .arcade li.is-next .n-name [lang="ar"] { color: var(--maroon); }
  .n-label { display: block; font-size: .875rem; color: var(--gold); font-weight: 600; margin-top: .55rem; }
  .n-begins, .n-jamaah { text-align: center; }
  .n-jamaah { font-size: 2.2rem; }
  .sunrise-note { display: block; text-align: center; margin: 1rem auto 0; padding-top: .9rem; border-top: 1px solid rgba(207, 174, 104, .22); color: var(--on-dark-soft); font-size: var(--step--1); max-width: none; }
}

/* Jumu'ah cartouche */
.jumuah {
  max-width: 46rem; margin: 1.5rem auto 0;
  background: var(--parchment-2); border: 1px solid var(--gold-line); border-radius: var(--radius);
  outline: 1px solid var(--gold-line); outline-offset: -7px;
  padding: 1.4rem 1.5rem; text-align: center;
}
.jumuah h2 { font-size: var(--step-2); margin: 0 0 .5rem; }
.jumuah h2 [lang="ar"] { font-family: var(--font-ar); color: var(--gold-text); font-weight: 400; margin-left: .35rem; }
.jumuah-times { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 2.5rem; margin: 0 0 .5rem; }
.jumuah-times div { display: flex; flex-direction: column; }
.jumuah-times dt { font-size: var(--step--1); color: var(--ink-soft); }
.jumuah-times dd { margin: 0; font-size: 2rem; font-weight: 700; color: var(--maroon); line-height: 1.15; font-variant-numeric: tabular-nums; }
.jumuah-note { margin: 0 auto; font-size: var(--step--1); color: var(--ink-soft); }
.jumuah-note strong { color: var(--ink); }
@media (min-width: 960px) { .jumuah { max-width: none; } }

.board-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.75rem; margin-top: 1.25rem; }
.board-links a { font-weight: 700; display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; }
.board-links svg { width: 1.2rem; height: 1.2rem; }

/* ---------- Monthly timetable ---------- */
.month-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.month-bar h2 { margin: 0; font-size: var(--step-2); }
.month-nav { display: flex; gap: .5rem; }
.month-nav button { min-width: 3rem; }
.month-nav button[disabled] { opacity: .4; cursor: not-allowed; }
.table-scroll { overflow-x: auto; border: 1px solid var(--gold-line); border-radius: var(--radius); background: var(--parchment); -webkit-overflow-scrolling: touch; }
.month { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 56rem; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.month th, .month td { padding: .55rem .6rem; text-align: center; white-space: nowrap; border-bottom: 1px solid var(--line); }
.month thead th { background: var(--night); color: var(--gold-soft); font-family: var(--font-display); font-weight: 600; position: sticky; top: 0; }
.month thead tr:first-child th { border-bottom: 0; padding-bottom: 0; }
.month thead tr:last-child th { font-family: var(--font); font-size: .875rem; color: var(--on-dark-soft); font-weight: 600; }
.month th[scope="row"], .month thead th:first-child { position: sticky; left: 0; text-align: left; z-index: 1; }
.month th[scope="row"] { background: var(--parchment-2); }
.month thead th:first-child { z-index: 2; background: var(--night); }
.month td.j { color: var(--maroon); font-weight: 700; }
.month td.b { color: var(--ink-soft); }
.month .grp { border-left: 1px solid var(--line); }
.month thead .grp { border-left-color: rgba(207, 174, 104, .3); }
.month tr.fri th[scope="row"] { color: var(--maroon); }
.month tr.today td, .month tr.today th { background: #F1DDB3; }
.month tr.today th[scope="row"] { box-shadow: inset 4px 0 0 var(--maroon); }
.month .hijri { display: block; font-size: .8rem; color: var(--ink-soft); font-weight: 400; }
.table-note { font-size: var(--step--1); color: var(--ink-soft); margin-top: .75rem; }

/* ==========================================================================
   Content blocks
   ========================================================================== */
.section-head { text-align: center; margin-bottom: 2rem; }
.section-head h2 { margin: 0 0 .25rem; }
.section-head p { margin: .25rem auto 0; color: var(--ink-soft); }
.section-head .link-arrow { margin-top: .5rem; }

/* Quick links */
.doors { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem; }
.doors a {
  position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem;
  min-height: 10rem; padding: 1.4rem .9rem 1.2rem;
  background: var(--night); color: var(--on-dark); text-decoration: none;
  border: 1px solid var(--gold-line); border-radius: var(--radius);
  outline: 1px solid rgba(207, 174, 104, .4); outline-offset: -7px;
  transition: background-color .25s ease, outline-color .25s ease;
}
.doors a::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--lattice) center / 60px 60px; opacity: .1; border-radius: inherit; }
.doors a:hover { background: var(--maroon); outline-color: var(--gold); color: #fff; }
.doors svg { width: 2rem; height: 2rem; color: var(--gold); margin-bottom: .4rem; }
.doors strong { font-family: var(--font-display); font-weight: 600; color: var(--gold-soft); font-size: var(--step-1); line-height: 1.2; }
.doors span { font-size: .9375rem; color: var(--on-dark-soft); line-height: 1.4; }
.doors a:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 8rem; }
@media (min-width: 760px) { .doors { grid-template-columns: repeat(5, 1fr); } .doors a:last-child:nth-child(odd) { grid-column: auto; min-height: 10rem; } }

.split { display: grid; gap: 2rem; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; } .split--wide-left { grid-template-columns: 1.4fr 1fr; } }

/* Framed panel (illuminated double border) */
.panel { background: var(--parchment); border: 1px solid var(--gold-line); border-radius: var(--radius); outline: 1px solid var(--gold-line); outline-offset: -7px; padding: 1.6rem; }

/* News list */
.news { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.news li { padding: 1.25rem 0; border-bottom: 1px solid var(--line); display: grid; gap: .25rem; }
@media (min-width: 700px) { .news li { grid-template-columns: 11rem 1fr; gap: 1.5rem; } }
.news time, .news .when { color: var(--gold-text); font-weight: 700; font-size: var(--step--1); }
.news h3 { margin: 0 0 .25rem; }
.news p { margin: 0; color: var(--ink-soft); }
.news .tag { display: inline-block; font-size: .875rem; font-weight: 700; color: var(--maroon); background: var(--parchment-2); border: 1px solid var(--line); border-radius: 999px; padding: .1rem .6rem; margin-bottom: .35rem; }

/* Definition rows (services, levels) */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows > li { padding: 1.4rem 0; border-bottom: 1px solid var(--line); display: grid; gap: .5rem 2rem; }
@media (min-width: 760px) { .rows > li { grid-template-columns: 15rem 1fr; } }
.rows h2, .rows h3 { margin: 0; font-size: var(--step-2); }
.rows h2 [lang="ar"], .rows h3 [lang="ar"] { display: block; font-family: var(--font-ar); font-weight: 400; color: var(--gold-text); font-size: 1.2rem; margin-top: .2rem; }
.rows p:last-child { margin-bottom: 0; }
.rows .meta { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; color: var(--ink); font-weight: 600; margin: 0 0 .5rem; padding: 0; list-style: none; }
.rows .meta li { display: inline-flex; align-items: center; gap: .4rem; }
.rows .meta svg { width: 1.1rem; height: 1.1rem; color: var(--gold-text); }

/* Schedule table */
.schedule { width: 100%; border-collapse: collapse; }
.schedule th, .schedule td { text-align: left; padding: .85rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.schedule th { color: var(--ink); font-weight: 700; width: 45%; }
.schedule td { color: var(--maroon); font-weight: 700; font-variant-numeric: tabular-nums; }
.schedule td small { display: block; font-weight: 400; color: var(--ink-soft); font-size: var(--step--1); }
.schedule .t { white-space: nowrap; }
@media (max-width: 560px) {
  .schedule tr { display: block; padding: .85rem 0; border-bottom: 1px solid var(--line); }
  .schedule th, .schedule td { display: block; width: auto; padding: 0; border: 0; }
  .schedule td { margin-top: .3rem; }
}

/* Steps, numbered inside stars */
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; align-items: start; }
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 3rem; height: 3rem;
  background: var(--star-gold) center / contain no-repeat; color: var(--night); font-weight: 700; font-size: 1.1rem;
}
.steps strong { display: block; color: var(--ink); }
.steps p { margin: 0; color: var(--ink-soft); }

/* Tinted band */
.tint { background: var(--parchment-2); border-block: 1px solid var(--line); }

/* Star-bullet list */
.stars { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem 2rem; }
@media (min-width: 640px) { .stars { grid-template-columns: repeat(2, 1fr); } }
.stars--one { grid-template-columns: 1fr !important; }
.stars li { position: relative; padding-left: 1.75rem; }
.stars li::before { content: ""; position: absolute; left: 0; top: .3em; width: 1rem; height: 1rem; background: var(--star) center / contain no-repeat; }
.stars strong { color: var(--maroon); }
.dark .stars li::before { background-image: var(--star-gold); }

/* Placeholder for content the masjid still needs to supply */
.needs { border: 2px dashed var(--gold-line); border-radius: var(--radius); background: #FFF6DF; padding: 1rem 1.15rem; color: var(--ink); font-size: var(--step--1); }
.needs::before { content: "Content needed — "; font-weight: 700; color: var(--gold-text); }
.needs p { margin: 0; display: inline; }

/* Donate */
.funds { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.funds > li { display: grid; gap: .75rem 2rem; padding: 1.6rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 820px) { .funds > li { grid-template-columns: 14rem 1fr auto; align-items: center; } }
.funds h2 { margin: 0; font-size: var(--step-2); }
.funds h2 [lang="ar"] { display: block; font-family: var(--font-ar); font-weight: 400; color: var(--gold-text); font-size: 1.35rem; margin-top: .15rem; }
.funds p { margin: 0; color: var(--ink-soft); }
.funds .btn { white-space: nowrap; }
.funds .needs { margin-top: .75rem; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--parchment-2); }
@media (min-width: 760px) { .gallery { grid-template-columns: repeat(4, 1fr); } }

/* Contact */
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.contact-list li { display: grid; grid-template-columns: 2.75rem 1fr; gap: .9rem; align-items: start; }
.contact-list .ic { width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--maroon); display: grid; place-items: center; color: var(--gold); }
.contact-list .ic svg { width: 1.25rem; height: 1.25rem; }
.contact-list h2 { margin: 0 0 .15rem; font-family: var(--font); font-size: var(--step-0); color: var(--ink-soft); font-weight: 600; }
.contact-list p { margin: 0; font-size: var(--step-1); font-weight: 700; }
.contact-list a { text-decoration: none; }
.contact-list .email { font-size: var(--step-0); }
.contact-list a:hover { text-decoration: underline; }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--gold-line); background: var(--parchment-2); aspect-ratio: 4 / 3; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Support band */
.give { text-align: center; }
.give p { margin-inline: auto; }
.give .btn-row { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { margin-top: var(--section); border-top: 1px solid var(--gold-line); }
.site-footer--flush { margin-top: 0; border-top-color: rgba(207, 174, 104, .35); }
.site-footer .wrap { padding-block: 3.5rem 2rem; }
.footer-grid { display: grid; gap: 2.25rem; }
@media (min-width: 820px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.site-footer img { width: 132px; margin-bottom: 1.25rem; }
.site-footer h2 { color: var(--gold); font-size: var(--step-0); margin-bottom: .75rem; }
.site-footer p, .site-footer li { color: var(--on-dark-soft); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.site-footer p { margin: 0 0 .5rem; }
.footer-base { border-top: 1px solid rgba(207, 174, 104, .25); margin-top: 2.5rem; padding-top: 1.25rem; font-size: .9375rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; color: var(--on-dark-soft); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .strip, .site-footer, .board-links, .month-nav, .btn { display: none !important; }
  .table-scroll { border: 0; overflow: visible; }
  .month { min-width: 0; font-size: 10pt; }
}
