/* Public website (#web). Scoped under .site so it never touches the app or the admin panel. */
.site { --w-green: #0b2a23; --w-green-2: #123a2f; --w-gold: #d9ab67; --w-gold-d: #a9772f; --w-cream: #f7f3ea; --w-paper: #ffffff; --w-ink: #17231f; --w-mute: #56655e; --w-line: #e1dccd;
  position: fixed; inset: 0; z-index: 150; overflow-y: auto; overflow-x: hidden; background: var(--w-cream); color: var(--w-ink); font: 16px/1.6 'Montserrat', system-ui, sans-serif; color-scheme: light; -webkit-text-size-adjust: 100%; }
.site[hidden] { display: none; }
.site *, .site *::before, .site *::after { box-sizing: border-box; }
.site :where(button) { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
.site :where(svg) { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.site :where(img) { max-width: 100%; display: block; }
.site :where(h1, h2, h3) { line-height: 1.2; margin: 0; text-wrap: balance; }
.site :where(p) { margin: 0; }
.site .ar { font-family: 'Amiri', 'Noto Kufi Arabic', serif; }
.s-wrap { width: min(1160px, 100%); margin-inline: auto; padding-inline: max(20px, env(safe-area-inset-left, 0px)); }

/* Header */
.s-bar { position: sticky; top: 0; z-index: 20; background: var(--w-green); color: #f3f0e7; border-bottom: 1px solid rgba(217, 171, 103, .3); }
.s-bar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; position: relative; }
.s-brand { display: flex; align-items: center; gap: 10px; text-align: start; }
.s-brand b { display: block; font-size: 15px; letter-spacing: .02em; line-height: 1.15; }
.s-brand small { display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--w-gold); }
.s-mark { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--w-gold); color: var(--w-green); font-size: 20px; }
.s-nav { display: flex; align-items: center; gap: 4px; }
.s-nav > button:not(.s-cta) { padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: #d6e2dc; }
.s-nav > button:not(.s-cta):hover { background: rgba(255, 255, 255, .08); color: #fff; }
.s-lang { display: inline-flex; margin-inline: 8px; border: 1px solid rgba(217, 171, 103, .4); border-radius: 999px; overflow: hidden; }
.s-lang button { padding: 5px 10px; font-size: 12px; color: #d6e2dc; }
.s-lang button.is-on { background: var(--w-gold); color: var(--w-green); font-weight: 700; }
.s-cta { padding: 9px 18px; border-radius: 999px; background: var(--w-gold); color: var(--w-green); font-weight: 700; font-size: 14px; }
.s-burger { display: none; width: 42px; height: 42px; border-radius: 10px; place-items: center; font-size: 22px; color: #fff; }

/* Hero */
.s-hero { position: relative; min-height: min(640px, 82vh); display: grid; align-items: end; background: var(--w-green); color: #fff; isolation: isolate; }
.s-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.s-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(7, 29, 24, .88), rgba(7, 29, 24, .1) 62%); }
.s-hero-in { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding-block: 56px 40px; }
.s-hero-card { max-width: 620px; }
.s-kicker { color: var(--w-gold); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; font-weight: 700; margin-bottom: 10px; }
.s-hero h1 { font-size: clamp(32px, 5vw, 56px); font-weight: 800; text-transform: uppercase; letter-spacing: .01em; }
.s-hero-card > p:not(.s-kicker) { margin-top: 14px; font-size: 18px; color: #e3ece7; max-width: 52ch; }
.s-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.s-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .7); color: #fff; font-weight: 700; font-size: 14px; letter-spacing: .03em; transition: transform .15s, background .15s; }
.s-btn:hover { transform: translateY(-1px); }
.s-btn.gold { background: var(--w-gold); border-color: var(--w-gold); color: var(--w-green); }
.s-btn.dark { border-color: var(--w-green); color: var(--w-green); }
.s-btn.sm { padding: 8px 18px; font-size: 13px; }
.s-btn.block { width: 100%; padding: 15px; font-size: 16px; }
.s-btn:disabled { opacity: .6; cursor: progress; }
.s-next { min-width: 240px; padding: 20px 22px; border-radius: 18px; background: rgba(11, 42, 35, .82); backdrop-filter: blur(6px); border: 1px solid rgba(217, 171, 103, .5); display: grid; gap: 2px; }
.s-next small { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--w-gold); }
.s-next b { font-size: 28px; line-height: 1.1; }
.s-next .ar { font-size: 26px; color: var(--w-gold); line-height: 1.3; }
.s-next p { display: flex; gap: 8px; margin-top: 10px; font-size: 13px; color: #cfdcd5; line-height: 1.4; }

/* Sections */
.s-sec { padding-block: clamp(48px, 7vw, 88px); }
.s-sec.alt { background: #efe9da; }
.s-head { margin-bottom: 28px; max-width: 62ch; }
.s-head h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; color: var(--w-green); }
.s-head h2::after { content: ''; display: block; width: 56px; height: 3px; margin-top: 12px; border-radius: 2px; background: var(--w-gold); }
.s-head p { margin-top: 12px; color: var(--w-mute); }
.s-empty { color: var(--w-mute); padding: 24px 0; }

/* Prayer times */
.s-split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.s-times { list-style: none; margin: 0; padding: 0; background: var(--w-paper); border: 1px solid var(--w-line); border-radius: 18px; overflow: hidden; }
.s-times li { display: grid; grid-template-columns: 1.4fr 1fr 1fr; align-items: center; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--w-line); font-variant-numeric: tabular-nums; }
.s-times li.head { border-top: 0; background: var(--w-green); color: var(--w-gold); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; padding-block: 12px; }
.s-times .n { display: flex; align-items: baseline; gap: 10px; }
.s-times .n em { font-style: normal; color: var(--w-gold-d); font-size: 20px; }
.s-times .end { color: var(--w-mute); text-align: end; }
.s-times li.head .end { color: var(--w-gold); }
.s-times li.is-now { background: #fbf1dc; box-shadow: inset 4px 0 0 var(--w-gold); }
.s-times li.is-now b::after { content: '●'; color: #3aa655; font-size: 10px; margin-inline-start: 8px; vertical-align: middle; }
.s-times li.jummah { background: #f2f6f3; }
.s-side { display: grid; gap: 14px; }
.s-note { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 14px; background: var(--w-green); color: #eaf1ed; }
.s-note svg { color: var(--w-gold); margin-top: 3px; }
.s-updates { background: var(--w-paper); border: 1px solid var(--w-line); border-radius: 18px; padding: 20px; display: grid; gap: 14px; }
.s-updates h3 { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--w-gold-d); }
.s-updates article { padding-inline-start: 14px; border-inline-start: 3px solid var(--w-gold); }
.s-updates article p { color: var(--w-mute); font-size: 14px; }

/* Card grids */
.s-grid { display: grid; gap: 22px; }
.s-grid.ev { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.s-grid.pr { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.s-grid.du { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.s-card { display: flex; flex-direction: column; text-align: start; background: var(--w-paper); border: 1px solid var(--w-line); border-radius: 18px; overflow: hidden; transition: transform .18s, box-shadow .18s; min-width: 0; }
button.s-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(11, 42, 35, .14); }
.s-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--w-green); }
.s-card.flat img { aspect-ratio: 16 / 10; }
.s-card .b { display: grid; gap: 6px; padding: 16px 18px 18px; align-content: start; flex: 1; }
.s-card .b small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--w-gold-d); font-weight: 700; }
.s-card .b > b { font-size: 17px; line-height: 1.3; color: var(--w-green); }
.s-card .b > span { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--w-mute); }
.s-card .b > span svg { margin-top: 3px; }
.s-card .b > p { color: var(--w-mute); font-size: 14px; }
.s-card .bar { height: 8px; border-radius: 99px; background: #e8e2d2; overflow: hidden; margin-top: 6px; }
.s-card .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--w-gold-d), var(--w-gold)); border-radius: 99px; }
.s-card .amt { display: block; font-size: 13px; color: var(--w-mute); }
.s-card .amt b { color: var(--w-green); font-size: 15px; }
.s-card .s-btn { justify-self: start; margin-top: 8px; border-color: var(--w-green); color: var(--w-green); }
.s-card .s-btn.gold { border-color: var(--w-gold); color: var(--w-green); }

/* Donate */
.s-donate { max-width: 760px; margin-inline: auto; background: var(--w-paper); border: 1px solid var(--w-line); border-radius: 22px; padding: clamp(20px, 4vw, 36px); box-shadow: 0 18px 40px rgba(11, 42, 35, .08); }
.s-donate h3 { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--w-gold-d); margin: 22px 0 12px; }
.s-donate h3:first-child { margin-top: 0; }
.s-amts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.s-amts button { padding: 13px 0; border-radius: 12px; border: 1.5px solid var(--w-line); background: #fff; font-weight: 700; color: var(--w-green); }
.s-amts button.is-on { background: var(--w-green); border-color: var(--w-green); color: var(--w-gold); }
.s-donate .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.s-donate .row.three { grid-template-columns: 1.2fr 1.4fr 1fr; }
.s-donate .f { display: grid; gap: 5px; margin-bottom: 14px; min-width: 0; }
.s-donate .f span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--w-mute); }
.s-donate input, .s-donate select, .s-tools input { width: 100%; min-width: 0; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--w-line); background: #fff; color: var(--w-ink); font: inherit; font-size: 15px; }
.s-donate input:focus, .s-donate select:focus, .s-tools input:focus { outline: 0; border-color: var(--w-gold-d); box-shadow: 0 0 0 3px rgba(217, 171, 103, .3); }
.s-fine { font-size: 13px; color: var(--w-mute); margin-bottom: 14px; }
.s-err { padding: 10px 14px; border-radius: 10px; background: #fdecea; color: #a02820; font-size: 14px; margin-bottom: 14px; }
.s-err[hidden] { display: none; }
.s-thanks { text-align: center; display: grid; gap: 12px; justify-items: center; }
.s-thanks .ck { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #e5f4e8; color: #1f7a46; font-size: 28px; }
.s-thanks dl { width: 100%; margin: 8px 0; display: grid; gap: 0; text-align: start; border: 1px solid var(--w-line); border-radius: 14px; overflow: hidden; }
.s-thanks dl div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 16px; border-top: 1px solid var(--w-line); }
.s-thanks dl div:first-child { border-top: 0; }
.s-thanks dt { color: var(--w-mute); font-size: 13px; }
.s-thanks dd { margin: 0; font-weight: 600; text-align: end; overflow-wrap: anywhere; }

/* Chips, gallery, duas, Ummah */
.s-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.s-chips button { padding: 7px 16px; border-radius: 999px; border: 1.5px solid var(--w-line); background: #fff; font-size: 13px; font-weight: 600; color: var(--w-mute); }
.s-chips button.is-on { background: var(--w-green); border-color: var(--w-green); color: var(--w-gold); }
.s-masonry { columns: 3 240px; column-gap: 14px; }
.s-masonry button { display: block; width: 100%; margin-bottom: 14px; border-radius: 14px; overflow: hidden; break-inside: avoid; }
.s-masonry img { width: 100%; height: auto; transition: transform .3s; }
.s-masonry button:hover img { transform: scale(1.04); }
.s-tools { display: grid; gap: 14px; margin-bottom: 8px; }
.s-search { position: relative; display: block; max-width: 420px; }
.s-search svg { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--w-mute); }
.s-search input { padding-inline-start: 42px; }
.s-hadith { margin: 0 0 28px; padding: 24px 28px; border-radius: 18px; background: var(--w-green); color: #f3f0e7; display: grid; gap: 10px; }
.s-hadith .ar { font-size: 28px; line-height: 1.8; color: var(--w-gold); text-align: center; }
.s-hadith p:not(.ar) { text-align: center; font-size: 17px; }
.s-hadith cite { text-align: center; font-size: 13px; color: #a9c0b6; font-style: normal; }
.s-dua { background: var(--w-paper); border: 1px solid var(--w-line); border-radius: 16px; padding: 18px 20px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.s-dua small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--w-gold-d); font-weight: 700; }
.s-dua > b { color: var(--w-green); }
.s-dua .ar { font-size: 24px; line-height: 1.9; color: var(--w-green); }
.s-dua .tr { font-style: italic; color: var(--w-mute); font-size: 14px; }
.s-dua .mean { font-size: 14px; }
.s-feed { display: grid; gap: 18px; max-width: 760px; }
.s-post { background: var(--w-paper); border: 1px solid var(--w-line); border-radius: 18px; padding: 20px 22px; display: grid; gap: 12px; }
.s-post header { display: flex; align-items: center; gap: 12px; }
.s-post .av { width: 42px; height: 42px; border-radius: 50%; background: var(--w-green); color: var(--w-gold); display: grid; place-items: center; font-weight: 800; flex: none; }
.s-post header > span:nth-child(2) { display: grid; line-height: 1.3; min-width: 0; flex: 1; }
.s-post small { color: var(--w-mute); font-size: 12px; }
.s-post em { font-style: normal; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; background: #f3ead6; color: var(--w-gold-d); padding: 4px 10px; border-radius: 999px; font-weight: 700; }
.s-post img { border-radius: 12px; width: 100%; }

/* Footer */
.s-foot { background: var(--w-green); color: #cfdcd5; padding-block: 36px; font-size: 14px; }
.s-foot .s-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.s-foot b { color: #fff; font-size: 16px; }

/* Dialogs */
.s-modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; background: rgba(5, 20, 16, .72); overflow-y: auto; }
.s-sheet { position: relative; width: min(760px, 100%); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); background: #fff; border-radius: 20px; overflow: hidden; }
.s-sheet img { width: 100%; height: 100%; object-fit: cover; }
.s-sheet .b { padding: 28px 26px; display: grid; gap: 10px; align-content: start; }
.s-sheet .b small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--w-gold-d); font-weight: 700; }
.s-sheet h3 { font-size: 24px; color: var(--w-green); }
.s-sheet .when { display: flex; gap: 8px; align-items: flex-start; color: var(--w-mute); font-size: 14px; }
.s-sheet .when svg { margin-top: 4px; }
.s-modal .x { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; background: rgba(11, 42, 35, .85); color: #fff; display: grid; place-items: center; }
.s-modal.photo figure { margin: 0; max-width: min(1000px, 100%); display: grid; gap: 10px; justify-items: center; }
.s-modal.photo img { max-height: 80vh; width: auto; border-radius: 12px; }
.s-modal.photo figcaption { color: #fff; }

/* Language-specific tweaks */
html[dir='rtl'] .site { font-family: 'Noto Kufi Arabic', 'Noto Nastaliq Urdu', 'Montserrat', system-ui, sans-serif; }
html[lang='ur'] .site { font-family: 'Noto Nastaliq Urdu', 'Montserrat', system-ui, sans-serif; line-height: 1.9; }
html[lang='hi'] .site { font-family: 'Noto Sans Devanagari', 'Montserrat', system-ui, sans-serif; }
html[dir='rtl'] .s-hero::after { background: linear-gradient(0deg, rgba(7, 29, 24, .88), rgba(7, 29, 24, .1) 62%); }
html[dir='rtl'] .s-times li.is-now { box-shadow: inset -4px 0 0 var(--w-gold); }
html.web-open, html.web-open body { overflow: hidden; }

/* Tablet and phone */
@media (max-width: 960px) {
  .s-hero::after { background: linear-gradient(0deg, rgba(7, 29, 24, .94) 20%, rgba(7, 29, 24, .55)); }
  .s-burger { display: grid; }
  .s-nav { display: none; position: absolute; top: 100%; inset-inline: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px max(20px, env(safe-area-inset-left, 0px)) 18px; background: var(--w-green); border-bottom: 1px solid rgba(217, 171, 103, .3); }
  .s-nav.is-open { display: flex; }
  .s-nav > button:not(.s-cta) { text-align: start; padding: 12px; font-size: 16px; }
  .s-lang { margin: 8px 0; align-self: flex-start; }
  .s-cta { margin-top: 6px; padding: 13px; }
  .s-split { grid-template-columns: 1fr; }
  .s-hero-in { flex-direction: column; align-items: stretch; }
  .s-next { min-width: 0; }
}
@media (max-width: 600px) {
  .s-hero { min-height: 560px; }
  .s-hero-card > p:not(.s-kicker) { font-size: 16px; }
  .s-amts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .s-donate .row, .s-donate .row.three { grid-template-columns: 1fr; gap: 0; }
  .s-times li { padding-inline: 14px; }
  .s-sheet { grid-template-columns: 1fr; }
  .s-sheet img { aspect-ratio: 16 / 10; }
  .s-grid.ev { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .s-grid.du { grid-template-columns: minmax(0, 1fr); }
  .s-brand small { display: none; }
}
@media (prefers-reduced-motion: reduce) { .site * { transition: none !important; } }
