/*
 * Masjid Hassan of Al-Islam. White pages and the burnt orange of the
 * building's brick, as Hamza asked: orange and white. Inter, as on
 * theummah.io, set a little larger for the elders who read this site.
 */
:root {
  --bg: #fffdfb;
  --tint: #fcf4ee;
  --card: #ffffff;
  --ink: #26170f;
  --ink-2: #44322a;
  --muted: #6a5a51;
  --line: #efe3da;
  --field: #dccbbf;
  --dark: #8a3510;
  --dark-2: #9e3f15;
  --on-dark: #fffaf6;
  --on-dark-muted: #f6d9c7;
  --accent: #b84a14;
  --accent-hover: #9c3d0f;
  --accent-tint: #fbebdf;
  --accent-text: #a8420f;
  --body-size: 1.125rem;
}

/* --------------------------------------------------------------- base */
:root {
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --pad: clamp(64px, 7vw, 104px);
  --r: 14px;
  --r-lg: 20px;
  --nav-h: 64px;
  --shadow: 0 1px 2px rgb(20 10 18 / 0.05), 0 10px 30px -12px rgb(20 10 18 / 0.16);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 100px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--body-size)/1.65 var(--font); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
img, video, iframe, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap--narrow { width: min(760px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 600; text-decoration: none; }
.skip:focus { left: 12px; }

/* --------------------------------------------------------------- type */
h1, h2, h3 { margin: 0; text-wrap: balance; color: inherit; }
.h1 { font-size: clamp(2.25rem, 1.6rem + 2.2vw, 3.4rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; }
.h2 { font-size: clamp(1.75rem, 1.35rem + 1.3vw, 2.5rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
.h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.lede { margin: 16px 0 0; max-width: 62ch; text-wrap: pretty; font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem); line-height: 1.6; color: var(--muted); }
.kicker { margin: 0 0 12px; font-size: 0.875rem; font-weight: 600; color: var(--accent-text); }
.muted { color: var(--muted); }
.hl { color: inherit; }

/* ------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1.5px solid var(--accent); background: var(--accent); color: #fff; font-weight: 600; font-size: 0.98rem; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--line { background: transparent; border-color: var(--field); color: var(--ink); }
.btn--line:hover { background: transparent; border-color: var(--ink); }
.btn--soft { background: var(--accent-tint); border-color: var(--accent-tint); color: var(--accent-text); }
.btn--soft:hover { background: var(--accent-tint); border-color: var(--accent-text); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 0.92rem; }
.btn svg { width: 17px; height: 17px; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--accent-text); text-decoration: none; }
.link svg { width: 16px; height: 16px; transition: transform 0.15s; }
.link:hover svg { transform: translateX(3px); }
.t-dark .btn--line, .hero--photo .btn--line, .t-accent .btn--line { border-color: rgb(255 255 255 / 0.55); color: #fff; }
.t-dark .btn--line:hover, .hero--photo .btn--line:hover, .t-accent .btn--line:hover { border-color: #fff; }
.t-accent .btn:not(.btn--line) { background: #fff; border-color: #fff; color: var(--accent-text); }
@media (max-width: 520px) { .btn { white-space: normal; text-align: center; padding-block: 10px; } }

/* ---------------------------------------------------- floating nav */
.nav { position: fixed; z-index: 50; top: calc(12px + var(--bar-push, 0px)); left: 50%; transform: translateX(-50%); width: min(var(--wrap) + 40px, 100% - 24px); }
.nav-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--nav-h); padding: 0 10px 0 20px; border-radius: 16px; background: var(--card); border: 1px solid rgb(20 10 18 / 0.06); box-shadow: 0 4px 24px rgb(20 10 18 / 0.08); }
.brand { display: flex; flex-direction: column; justify-content: center; flex: none; text-decoration: none; color: var(--ink); line-height: 1.15; }
.brand-name { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.015em; }
.brand-sub { font-size: 0.75rem; font-weight: 500; color: var(--muted); }
.menu { display: none; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.menu > li { position: relative; }
.menu-btn, .menu-link { display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--ink-2); font-size: 0.95rem; font-weight: 500; text-decoration: none; cursor: pointer; }
.menu-btn:hover, .menu-link:hover, .menu-btn[aria-expanded="true"], .menu-link[aria-current="page"] { background: var(--tint); color: var(--ink); }
.menu-btn svg { width: 14px; height: 14px; transition: transform 0.2s; }
.menu-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.mega { position: absolute; top: calc(100% + 14px); left: -12px; min-width: 300px; padding: 8px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 24px 48px -20px rgb(20 10 18 / 0.25); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity 0.15s, transform 0.15s, visibility 0s linear 0.15s; }
.mega.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.mega-links a { display: block; padding: 12px 14px; border-radius: 10px; text-decoration: none; }
.mega-links a:hover { background: var(--tint); }
.mega-links strong { display: block; font-size: 0.97rem; font-weight: 600; }
.mega-links span { display: block; margin-top: 2px; font-size: 0.875rem; color: var(--muted); }
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-right > .btn { display: none; }
.burger { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: none; cursor: pointer; }
.burger span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); box-shadow: 0 6px 0 var(--ink), 0 -6px 0 var(--ink); }
@media (min-width: 1100px) { .menu { display: flex; } .burger { display: none; } .nav-right > .btn { display: inline-flex; } }
@media (min-width: 640px) and (max-width: 1099px) { .nav-right > .btn:last-of-type { display: inline-flex; } }

.drawer { position: fixed; inset: 0; z-index: 60; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer-scrim { position: absolute; inset: 0; background: rgb(20 10 18 / 0.45); opacity: 0; transition: opacity 0.25s; }
.drawer.is-open .drawer-scrim { opacity: 1; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; width: min(380px, 90vw); padding: max(18px, env(safe-area-inset-top)) 22px max(22px, env(safe-area-inset-bottom)); overflow-y: auto; background: var(--card); transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.drawer.is-open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.drawer-close { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: none; cursor: pointer; }
.drawer-close svg { width: 18px; height: 18px; }
.drawer details, .drawer-panel > a.drawer-top { border-bottom: 1px solid var(--line); }
.drawer summary, .drawer-panel > a.drawer-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 2px; font-size: 1.125rem; font-weight: 600; text-decoration: none; list-style: none; cursor: pointer; }
.drawer-panel > a.drawer-top[hidden], .menu-link[hidden] { display: none; }
.drawer summary::-webkit-details-marker { display: none; }
.drawer summary svg { width: 18px; height: 18px; }
.drawer details[open] summary svg { transform: rotate(180deg); }
.drawer details div { padding-bottom: 10px; }
.drawer details a { display: block; padding: 9px 2px; color: var(--muted); text-decoration: none; }
.drawer-foot { display: grid; gap: 10px; margin-top: auto; padding-top: 24px; }
.drawer-foot .btn { width: 100%; }

.topbar { position: relative; z-index: 51; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; min-height: 40px; padding: 8px 48px; background: var(--dark); color: var(--on-dark); font-size: 0.92rem; font-weight: 500; text-align: center; }
.topbar a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.topbar a svg { width: 14px; height: 14px; }
.topbar-x { position: absolute; top: 50%; right: 8px; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: var(--on-dark-muted); cursor: pointer; transform: translateY(-50%); }
.topbar-x svg { width: 14px; height: 14px; }
.tb-short { display: none; }

/* ---------------------------------------------------------- sections */
.s { padding-block: var(--pad); }
.t-white { background: var(--bg); }
.t-tint { background: var(--tint); }
.t-dark { background: var(--dark); color: var(--on-dark); }
.t-dark .lede, .t-dark .muted, .t-dark .rt { color: var(--on-dark-muted); }
.t-dark .kicker { color: var(--on-dark-muted); }
.t-accent { background: var(--accent); color: #fff; }
.t-accent .lede { color: rgb(255 255 255 / 0.9); }
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 40px; margin-bottom: clamp(28px, 3.5vw, 44px); }
.sec-head > div { max-width: 680px; }

/* ------------------------------------------------------------- hero */
/* One full-width photograph with the words over its darker side. */
.hero--photo { position: relative; display: flex; align-items: flex-end; min-height: clamp(540px, 76svh, 700px); padding: calc(var(--nav-h) + 90px) 0 clamp(56px, 7vw, 88px); color: #fff; isolation: isolate; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero--photo::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(24 8 22 / 0.86) 0%, rgb(24 8 22 / 0.62) 42%, rgb(24 8 22 / 0.15) 80%), linear-gradient(0deg, rgb(24 8 22 / 0.45), transparent 45%); }
.hero--photo .hero-copy { max-width: 640px; }
.hero--photo .lede { color: rgb(255 255 255 / 0.9); }
.hero--photo .kicker { color: rgb(255 255 255 / 0.85); }
@media (max-width: 700px) { .hero--photo::before { background: linear-gradient(0deg, rgb(24 8 22 / 0.92) 15%, rgb(24 8 22 / 0.6) 60%, rgb(24 8 22 / 0.35)); } }
/* Words on the left, something useful on the right (today's prayer times). */
.hero--split { padding: calc(var(--nav-h) + clamp(44px, 4.5vw, 72px)) 0 clamp(48px, 5vw, 72px); }
.hero-grid { display: grid; gap: clamp(36px, 5vw, 64px); align-items: center; }
@media (min-width: 960px) { .hero--split .hero-grid { grid-template-columns: 1.15fr 0.85fr; } }
.hero-status { display: flex; align-items: flex-start; gap: 10px; margin: 22px 0 0; max-width: 56ch; font-size: 1rem; font-weight: 500; color: var(--ink-2); }
.hero-status::before { content: ''; flex: none; width: 10px; height: 10px; margin-top: 0.5em; border-radius: 50%; background: var(--accent); }

/* page header */
.phead { padding: calc(var(--nav-h) + clamp(56px, 6vw, 88px)) 0 clamp(40px, 5vw, 64px); }
.phead-grid { display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; }
.phead .h1 { max-width: 20ch; }
.phead-img { overflow: hidden; border-radius: var(--r-lg); aspect-ratio: 4 / 3; background: var(--tint); }
.phead-img img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .phead.has-img .phead-grid { grid-template-columns: 1.1fr 0.9fr; } }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; font-size: 0.9rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs li + li::before { content: '/'; margin-right: 8px; opacity: 0.6; }

/* -------------------------------------------------------- rich text */
.rt { color: var(--ink-2); max-width: 64ch; }
.rt > :first-child { margin-top: 0; }
.rt > :last-child { margin-bottom: 0; }
.rt p { margin: 0 0 1em; }
.rt ul { margin: 0 0 1em; padding-left: 1.2em; }
.rt li { margin: 0.3em 0; }
.rt a, .prose a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.rt blockquote, .prose blockquote { margin: 1.4em 0; padding: 18px 22px; border-radius: var(--r); background: var(--tint); font-size: 1.05rem; color: var(--ink); }
.prose { font-size: 1.0625rem; line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.2em; }
.prose h2 { margin: 1.8em 0 0.5em; font-size: 1.6rem; font-weight: 700; letter-spacing: -0.015em; }
.prose h3 { margin: 1.6em 0 0.4em; font-size: 1.2rem; }
.prose img { border-radius: var(--r); }
.source { margin: 24px 0 0; font-size: 0.9rem; color: var(--muted); }

/* ------------------------------------------------------------ split */
.split { display: grid; gap: clamp(32px, 5vw, 72px); align-items: center; }
.split .h2 { margin-bottom: 18px; }
.split-media { overflow: hidden; border-radius: var(--r-lg); background: var(--tint); }
.split-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.split-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.split-pair img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r); }
.split-map { overflow: hidden; border-radius: var(--r-lg); aspect-ratio: 4 / 3; background: var(--tint); }
.split-map iframe { width: 100%; height: 100%; border: 0; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split--flip > :first-child { order: 2; } .split--text { grid-template-columns: minmax(0, 720px); } }
/* Words with nothing beside them (a widget whose link is not in yet) stand
   as one centered block rather than half a layout with an empty side. */
.split--text { justify-content: center; text-align: center; }
.split--text .btns { justify-content: center; }

/* rows: alternating photo and text, for a page that walks through programs */
.row { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; }
.row + .row { margin-top: clamp(48px, 6vw, 80px); }
.row-img { overflow: hidden; border-radius: var(--r-lg); aspect-ratio: 3 / 2; background: var(--tint); }
.row-img img { width: 100%; height: 100%; object-fit: cover; }
.row-body .h3 { margin-bottom: 10px; font-size: 1.5rem; }
.row-body .btns { margin-top: 20px; }
@media (min-width: 900px) { .row { grid-template-columns: 1fr 1fr; } .row:nth-child(even) .row-img { order: 2; } }

/* ------------------------------------------------------------ cards */
.cards { display: grid; gap: 24px 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.card { display: flex; flex-direction: column; text-decoration: none; }
.card-img { overflow: hidden; margin-bottom: 18px; border-radius: var(--r); aspect-ratio: 3 / 2; background: var(--tint); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
a.card:hover .card-img img { transform: scale(1.03); }
.card p { margin: 8px 0 0; color: var(--muted); }
.card .link { margin-top: 14px; }

/* duo: two audiences side by side */
.duo { display: grid; gap: 20px; }
@media (min-width: 860px) { .duo { grid-template-columns: 1fr 1fr; } }
.duo-panel { display: flex; flex-direction: column; padding: clamp(28px, 3.5vw, 44px); border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); }
.duo-panel .h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.duo-panel > p { margin: 12px 0 0; color: var(--muted); }
.duo-panel ul { margin: 22px 0 0; padding: 0; list-style: none; }
.duo-panel li { padding: 11px 0; border-top: 1px solid var(--line); font-weight: 500; }
.duo-panel .btns { margin-top: auto; padding-top: 26px; }

/* quote */
.quote { display: grid; gap: 28px; align-items: center; max-width: 980px; margin: 0 auto; }
@media (min-width: 760px) { .quote { grid-template-columns: auto 1fr; gap: 48px; } }
.quote-img img { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; }
.quote blockquote { margin: 0; font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem); font-weight: 500; line-height: 1.45; letter-spacing: -0.01em; }
.quote figcaption { margin-top: 18px; }
.quote figcaption b { display: block; font-weight: 600; }
.quote figcaption span { color: var(--on-dark-muted); }
.t-white .quote figcaption span, .t-tint .quote figcaption span { color: var(--muted); }
.quote .btns { margin-top: 22px; }

/* list */
.list-grid { display: grid; gap: clamp(28px, 5vw, 72px); }
@media (min-width: 960px) { .list-grid { grid-template-columns: 0.8fr 1.2fr; } }
.list { display: grid; align-content: start; column-gap: 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin: 0; padding: 0; list-style: none; }
.list li { position: relative; padding: 14px 0 14px 22px; border-top: 1px solid var(--line); }
.list li::before { content: ''; position: absolute; left: 2px; top: 1.45em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.list b { font-weight: 600; }
.list small { display: block; margin-top: 2px; font-size: 0.94rem; color: var(--muted); }

/* timeline */
.timeline { max-width: 880px; margin: 0; padding: 0; list-style: none; }
.tl { display: grid; gap: 4px 32px; padding: 22px 0; border-top: 1px solid var(--line); }
.tl:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .tl { grid-template-columns: 140px 1fr; } }
.tl-when { font-weight: 700; color: var(--accent-text); }
.tl-body p { margin: 4px 0 0; color: var(--muted); }

/* gallery */
.gallery { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(46%, 250px), 1fr)); }
.gallery button { overflow: hidden; padding: 0; border: 0; border-radius: 12px; aspect-ratio: 1; background: var(--tint); cursor: zoom-in; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }

/* people */
.people { display: grid; gap: 28px 20px; grid-template-columns: repeat(auto-fill, minmax(min(46%, 220px), 1fr)); }
.person { display: grid; gap: 2px; text-decoration: none; }
.person-img { overflow: hidden; margin-bottom: 10px; border-radius: var(--r); aspect-ratio: 4 / 5; background: var(--tint); }
.person-img img { width: 100%; height: 100%; object-fit: cover; }
.person span:last-child { color: var(--muted); }

/* videos */
.vgrid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.rcard { display: flex; flex-direction: column; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.rcard-img { position: relative; overflow: hidden; border-radius: var(--r); aspect-ratio: 16 / 9; background: var(--dark-2); }
.rcard-img img { width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; left: 16px; bottom: 16px; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--accent-text); box-shadow: var(--shadow); }
.play svg { width: 20px; height: 20px; margin-left: 3px; }
.rcard-title { margin-top: 12px; font-weight: 600; }
.rcard-sub { font-size: 0.92rem; color: var(--muted); }
.t-dark .rcard-sub { color: var(--on-dark-muted); }

/* downloads */
.files { display: grid; gap: 12px; max-width: 820px; margin: 0; padding: 0; list-style: none; }
.file { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding: 18px 20px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); text-decoration: none; }
.file:hover { border-color: var(--ink); }
.file-i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-tint); color: var(--accent-text); }
.file-i svg { width: 20px; height: 20px; }
.file b { display: block; }
.file small { color: var(--muted); }
.file-meta { margin-left: auto; font-size: 0.9rem; color: var(--muted); }

/* CTA band */
.cta { text-align: center; }
.cta .h2 { max-width: 24ch; margin-inline: auto; }
.cta .lede { margin-inline: auto; }
.cta .btns { justify-content: center; }

/* ---------------------------------------------------------- widgets */
.widget-frame iframe { display: block; width: 100%; border: 0; background: transparent; color-scheme: light; }
.widget-frame--events iframe { height: var(--h, max(600px, calc(100svh - 110px))); }
@media (min-width: 940px) { .widget-frame--events iframe { height: var(--h, 1220px); } }
@media (min-width: 940px) and (hover: hover) and (pointer: fine) { .widget-frame--events:not(.is-open) iframe { height: var(--h, calc(31vw + 258px)); } }
@media (min-width: 1104px) and (hover: hover) and (pointer: fine) { .widget-frame--events:not(.is-open) iframe { height: var(--h, calc(25vw + 244px)); } }
@media (min-width: 1280px) and (hover: hover) and (pointer: fine) { .widget-frame--events:not(.is-open) iframe { height: var(--h, 560px); } }
.widget-frame--prayers iframe { height: var(--h, 545px); }
@media (max-width: 447px) { .widget-frame--prayers iframe { height: var(--h, 560px); } }
.widget-frame--donation { max-width: 520px; }
.widget-frame--donation iframe { height: var(--h, 800px); }
@media (max-width: 517px) { .widget-frame--donation iframe { height: var(--h, 840px); } }
@media (max-width: 427px) { .widget-frame--donation iframe { height: var(--h, 930px); } }
.widget-note { margin-top: 14px; font-size: 0.94rem; color: var(--muted); }
/* Where an Ummah widget will sit, on the review preview only. */
.widget-ph { display: grid; place-content: center; justify-items: center; gap: 6px; min-height: 240px; padding: 32px; border-radius: var(--r-lg); border: 1.5px dashed var(--field); background: var(--card); text-align: center; }
.widget-ph b { font-size: 1.05rem; }
.widget-ph p { max-width: 46ch; margin: 0; font-size: 0.95rem; color: var(--muted); }

/* -------------------------------------------------- contact and forms */
.formwrap { display: grid; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (min-width: 980px) { .formwrap { grid-template-columns: 0.85fr 1.15fr; } }
.contact-list { display: grid; margin: 24px 0 0; padding: 0; list-style: none; }
.contact-list li { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.contact-i { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-tint); color: var(--accent-text); }
.contact-i svg { width: 19px; height: 19px; }
.contact-list small { display: block; font-size: 0.85rem; color: var(--muted); }
.contact-list a, .contact-list span span { font-weight: 600; text-decoration: none; }
.map { overflow: hidden; margin-top: 24px; border-radius: var(--r-lg); aspect-ratio: 16 / 10; background: var(--tint); }
.map iframe { width: 100%; height: 100%; border: 0; }
.form { display: grid; gap: 16px; padding: clamp(24px, 3.5vw, 36px); border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); }
.form .h3 { margin-bottom: 2px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 0.95rem; font-weight: 600; }
.field label i { font-style: normal; font-weight: 400; color: var(--muted); }
.field input, .field textarea, .field select { width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid var(--field); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.field [aria-invalid="true"] { border-color: var(--accent); }
.form > * { grid-column: 1 / -1; }
@media (min-width: 640px) { .form { grid-template-columns: 1fr 1fr; } .form > .field.half { grid-column: auto; } }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.hp { position: absolute; left: -9999px; }
.form-status { margin: 0; min-height: 1.5em; font-size: 0.95rem; }
.form-status.ok { color: #1f7a45; font-weight: 600; }
.form-status.err { color: var(--accent-text); font-weight: 600; }

/* --------------------------------------------------------- articles */
.article-head { padding: calc(var(--nav-h) + clamp(56px, 6vw, 88px)) 0 24px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 16px; color: var(--muted); }
.article-body .prose { max-width: 720px; margin-inline: auto; }
.article-cover { overflow: hidden; margin-bottom: 40px; border-radius: var(--r-lg); }
.article-aside { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; max-width: 720px; margin: 36px auto 0; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); }
.share { display: flex; gap: 8px; }
.share a, .share button { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: none; cursor: pointer; }
.share svg { width: 16px; height: 16px; }
.pgrid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.pcard { display: grid; gap: 12px; text-decoration: none; }
.pcard-img { overflow: hidden; border-radius: var(--r); aspect-ratio: 16 / 10; background: var(--tint); }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; }
.pcard-meta { display: flex; gap: 12px; font-size: 0.9rem; color: var(--muted); }
.pcard h3 { margin: 4px 0 0; font-size: 1.2rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; }
.chip { display: inline-flex; padding: 6px 12px; border-radius: 999px; background: var(--tint); font-size: 0.9rem; text-decoration: none; }
.member { display: grid; gap: clamp(32px, 5vw, 64px); align-items: start; }
.member-photo { overflow: hidden; border-radius: var(--r-lg); aspect-ratio: 4 / 5; }
.member-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .member { grid-template-columns: 0.8fr 1.2fr; } }

/* ----------------------------------------------------------- dialogs */
.dlg { width: 100%; height: 100%; max-width: none; max-height: none; padding: 0; border: 0; background: transparent; color: var(--ink); }
.dlg::backdrop { background: rgb(16 8 14 / 0.82); }
.dlg-in { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; }
.dlg-close { position: fixed; top: max(14px, env(safe-area-inset-top)); right: 14px; z-index: 2; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: #fff; cursor: pointer; }
.dlg-close svg { width: 18px; height: 18px; }
.player-wrap { width: min(1200px, 100%, (100dvh - 150px) * 16 / 9); }
.player-frame { overflow: hidden; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r); background: #000; }
.player-frame iframe, .player-frame video { width: 100%; height: 100%; border: 0; }
.player-title { margin-top: 12px; text-align: center; color: #fff; }
.join-box { display: flex; flex-direction: column; gap: 12px; width: min(500px, 100%); }
.join-head { color: #fff; }
.join-head b { display: block; font-size: 1.35rem; }
.join-head small { display: block; color: rgb(255 255 255 / 0.75); }
.join-box iframe { display: block; width: 100%; height: 1000px; border: 0; border-radius: 16px; background: transparent; color-scheme: light; }
#join .dlg-in { display: flex; flex-direction: column; align-items: center; overflow-y: auto; }
#join .join-box { margin-block: auto; padding-block: 56px 24px; }
@media (hover: none), (pointer: coarse) { #join .dlg-in { overflow: hidden; } #join .join-box { flex: 1; min-height: 0; margin: 0; padding-block: 56px 4px; } #join .join-frame { flex: 1; min-height: 0; } #join .join-box iframe { height: 100%; } #join .join-frame--ph { flex: none; } }
.join-frame iframe { opacity: 0; transition: opacity 0.3s; }
#join.is-ready .join-frame iframe { opacity: 1; }
.lb-img { width: auto; height: auto; max-width: min(1400px, 100%); max-height: calc(100vh - 120px); border-radius: 10px; }
.lb-nav { position: fixed; top: 50%; z-index: 2; display: grid; place-items: center; width: 50px; height: 50px; border: 0; border-radius: 50%; background: #fff; cursor: pointer; transform: translateY(-50%); }
.lb-nav svg { width: 20px; height: 20px; }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
.lb-count { position: fixed; bottom: 16px; left: 50%; color: #fff; transform: translateX(-50%); }

/* ------------------------------------------------------------ footer */
.foot { padding: clamp(56px, 6vw, 80px) 0 28px; background: var(--dark); color: var(--on-dark); }
.foot .brand { color: var(--on-dark); }
.foot .brand-sub { color: var(--on-dark-muted); }
.foot-top { display: grid; gap: 40px; }
@media (min-width: 960px) { .foot-top { grid-template-columns: 1fr 1.6fr; gap: 64px; } }
.foot-brand p { max-width: 38ch; margin: 16px 0 0; color: var(--on-dark-muted); }
.foot-social { display: flex; gap: 8px; margin-top: 20px; }
.foot-social a { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgb(255 255 255 / 0.2); border-radius: 50%; }
.foot-social svg { width: 17px; height: 17px; }
.foot-cols { display: grid; gap: 28px 24px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.foot-cols h2 { margin: 0 0 14px; font-size: 0.85rem; font-weight: 600; color: var(--on-dark-muted); }
.foot-cols ul { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.foot-cols a { text-decoration: none; }
.foot-cols a:hover { text-decoration: underline; }
.foot-contact { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 40px; padding-top: 24px; border-top: 1px solid rgb(255 255 255 / 0.14); color: var(--on-dark-muted); }
.foot-contact a { color: var(--on-dark); font-weight: 600; text-decoration: none; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 24px; font-size: 0.88rem; color: var(--on-dark-muted); }
.foot-meta { display: flex; gap: 16px; }
.foot-meta a { color: var(--on-dark-muted); text-decoration: none; }
.credit a { color: var(--on-dark); font-weight: 600; }

/* admin preview only (data-section exists only in the edit build) */
[data-section] { position: relative; }

/* ------------------------------------------------------ the logo lockup */
/* Mark beside the name in Marcellus, like CICC's header. */
.brand { flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; }
.foot-brand .brand { display: inline-flex; }
.brand-mark { width: 42px; height: 42px; flex: none; }
.brand-lines { display: flex; flex-direction: column; font-family: 'Marcellus', Georgia, serif; line-height: 1.12; white-space: nowrap; }
.brand-name { font-size: 1.16rem; font-weight: 400; letter-spacing: 0.01em; }
.brand-sub { font-size: 0.76rem; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-text); }
.foot .brand-sub { color: var(--on-dark-muted); }
.foot .brand-mark { width: 48px; height: 48px; }
.menu-link.is-active { background: var(--tint); color: var(--ink); }

/* ------------------------------------------- hero: photo, words centered */
.hero--center { position: relative; display: grid; place-items: center; min-height: clamp(520px, 76svh, 700px); padding: calc(var(--nav-h) + 72px) 0 72px; background: linear-gradient(160deg, #a8420f 0%, #7a2e0c 100%); color: #fff; text-align: center; isolation: isolate; overflow: hidden; }
.hero--center.has-img::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(28 12 4 / 0.5) 0%, rgb(28 12 4 / 0.55) 55%, rgb(28 12 4 / 0.72) 100%); }
.hero--center .hero-copy { max-width: 840px; }
.hero--center .h1 { font-size: clamp(2.4rem, 1.6rem + 2.6vw, 3.6rem); }
.hero--center .lede { margin-inline: auto; max-width: 52ch; color: rgb(255 255 255 / 0.92); }
.hero--center .kicker { color: rgb(255 255 255 / 0.85); }
.hero--center .btns { justify-content: center; }
.hero--center .btn:not(.btn--line) { background: #fff; border-color: #fff; color: var(--accent-text); }
.hero--center .btn:not(.btn--line):hover { background: var(--accent-tint); border-color: var(--accent-tint); }
.hero--center .btn--line { border-color: rgb(255 255 255 / 0.6); color: #fff; }
.hero--center .btn--line:hover { border-color: #fff; }

/* -------------------------- words beside a box run the box's full height */
/* Hamza's rule (2026-10-30): when a photo, map, form or widget sits on one
   side, the words opposite start at its top and their buttons end at its
   bottom. */
.split-copy { display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.split-copy .btns { margin-top: 0; }
.split-media img { height: 100%; aspect-ratio: auto; min-height: 320px; }
.split-map { aspect-ratio: auto; min-height: 400px; height: 100%; }
@media (min-width: 900px) { .split { align-items: stretch; } }
@media (max-width: 899px) { .split-copy .btns { margin-top: 4px; } .split-map { min-height: 320px; } }

/* --------------------------------------- history down a line in the middle */
.tlc-head { max-width: 680px; margin: 0 auto clamp(40px, 5vw, 64px); text-align: center; }
.tlc-head .lede { margin-inline: auto; }
.tlc { position: relative; max-width: 1000px; margin: 0 auto; padding: 0; list-style: none; }
.tlc-line { position: absolute; top: 4px; bottom: 0; left: 50%; width: 3px; border-radius: 3px; background: var(--line); overflow: hidden; transform: translateX(-50%); }
.tlc-fill { position: absolute; top: 0; left: 0; width: 100%; height: var(--p, 100%); border-radius: 3px; background: var(--accent); }
.tlc-item { position: relative; width: 50%; padding: 0 48px 44px 0; text-align: right; }
.tlc-item.is-right { margin-left: 50%; padding: 0 0 44px 48px; text-align: left; }
.tlc-item:last-child { padding-bottom: 0; }
.tlc-dot { position: absolute; top: 4px; right: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); box-shadow: 0 0 0 5px var(--accent-tint); transition: background 0.3s, box-shadow 0.3s; }
.tlc-item.is-right .tlc-dot { right: auto; left: -9px; }
.tlc-when { display: block; margin-bottom: 4px; font-size: 0.95rem; font-weight: 700; color: var(--accent-text); }
.tlc-card b { display: block; font-size: 1.15rem; }
.tlc-card p { margin: 6px 0 0; color: var(--muted); }
.tlc-card { transition: opacity 0.5s, transform 0.5s; }
/* While the line is filling (site.js adds .is-live), entries it has not
   reached yet wait, dimmed. */
.tlc.is-live .tlc-item:not(.is-on) .tlc-card { opacity: 0.35; transform: translateY(8px); }
.tlc.is-live .tlc-item:not(.is-on) .tlc-dot { background: var(--field); box-shadow: 0 0 0 5px var(--tint); }
.tlc-source { margin-top: 36px; text-align: center; }
@media (max-width: 759px) {
  .tlc-line { left: 9px; transform: none; }
  .tlc-item, .tlc-item.is-right { width: 100%; margin-left: 0; padding: 0 0 34px 44px; text-align: left; }
  .tlc-dot, .tlc-item.is-right .tlc-dot { left: 1px; right: auto; }
}
@media (prefers-reduced-motion: reduce) { .tlc-card, .tlc-dot { transition: none; } }

/* --------------------------- the closing card, floating above the footer */
.cta-sec { padding-bottom: clamp(40px, 4vw, 56px); }
.cta-card { position: relative; overflow: hidden; isolation: isolate; padding: clamp(44px, 6vw, 80px) clamp(24px, 5vw, 64px); border-radius: 24px; background: linear-gradient(135deg, #c2541c 0%, #8a3510 100%); color: #fff; text-align: center; box-shadow: 0 30px 60px -30px rgb(138 53 16 / 0.6); }
.cta-bg { position: absolute; inset: 0; z-index: -2; }
.cta-bg img { width: 100%; height: 100%; object-fit: cover; }
.cta-card.has-img::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(135deg, rgb(184 74 20 / 0.92), rgb(110 40 10 / 0.88)); }
.cta-card .h2 { max-width: 22ch; margin-inline: auto; }
.cta-card .lede { margin-inline: auto; color: rgb(255 255 255 / 0.9); }
.cta-card .btns { justify-content: center; }
.cta-card .btn:not(.btn--line) { background: #fff; border-color: #fff; color: var(--accent-text); }
.cta-card .btn--line { border-color: rgb(255 255 255 / 0.6); color: #fff; }
.cta-card .btn--line:hover { border-color: #fff; }
/* A widget's placeholder fills the height of the words beside it, as the
   widget itself will. */
.split-box.widget-frame { display: flex; flex-direction: column; }
.split-box .widget-ph { flex: 1; }
.hero--center .lede { text-wrap: balance; }
@media (min-width: 980px) { .formwrap--match { align-items: stretch; } }
/* The timeline zigzags: each entry starts beside the one before it, on the
   other side of the line, so the history reads without tall gaps. */
@media (min-width: 760px) { .tlc-item + .tlc-item { margin-top: -64px; } }
/* A photo beside words fills the words' height (with a floor), so a tall
   portrait never towers over a short paragraph. */
.split-media { position: relative; min-height: 340px; }
.split-media img { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.split-pair > div { position: relative; min-height: 300px; overflow: hidden; border-radius: var(--r); }
.split-pair > div img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
@media (max-width: 899px) { .split-media { min-height: 0; aspect-ratio: 4 / 3; } .split-pair > div { min-height: 0; aspect-ratio: 4 / 5; } }
.hero-credit { position: absolute; right: 16px; bottom: 12px; margin: 0; font-size: 0.78rem; color: rgb(255 255 255 / 0.75); }
/* The photo behind the closing card shows through: lighter than the hero's
   overlay, still dark enough for white words. */
.cta-card.has-img::before { background: linear-gradient(135deg, rgb(150 58 14 / 0.84), rgb(90 34 8 / 0.8)); }
.cta-bg img { transform: scale(1.6); transform-origin: 36% 32%; }
