/*
 * Lantern v1. Built on Minaret's rules (copied, so each template versions
 * independently), on a night palette whatever the device's theme: deep
 * indigo, warm gold light, the cover photo behind the mosque's name.
 * Logical properties only, for right to left.
 */
:root {
  --bg: #0f1424;
  --surface: #161d33;
  --text: #f3eee2;
  --muted: #b9b2a1;
  --line: #27304d;
  --accent: #f2c36b;
  --accent-soft: rgba(242, 195, 107, 0.14);
  --on-accent: #241a05;
  --glow: rgba(242, 195, 107, 0.22);
  --radius: 16px;
  --font-latin: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Amiri", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-arabic: "Amiri", "Noto Naskh Arabic", "Geeza Pro", "Segoe UI", Tahoma, serif;
  --font-urdu: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Urdu Typesetting", var(--font-arabic);
  --font-bengali: "Noto Sans Bengali", "Hind Siliguri", "Vrinda", var(--font-latin);
  color-scheme: dark;
}
/* The accent choice tints the light: emerald, sapphire or gold. */
[data-accent="evergreen"] { --accent: #8fe0c2; --accent-soft: rgba(143, 224, 194, 0.14); --on-accent: #0c241b; --glow: rgba(143, 224, 194, 0.2); }
[data-accent="twilight"] { --accent: #9cc9ff; --accent-soft: rgba(156, 201, 255, 0.14); --on-accent: #0d1b33; --glow: rgba(156, 201, 255, 0.2); }
[data-accent="rosewood"] { --accent: #f2c36b; --accent-soft: rgba(242, 195, 107, 0.14); --on-accent: #241a05; --glow: rgba(242, 195, 107, 0.22); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--font-latin);
}
:lang(ar) body, [lang="ar"] { font-family: var(--font-arabic); }
:lang(ur) body, [lang="ur"] { font-family: var(--font-urdu); line-height: 2.1; }
:lang(bn) body, [lang="bn"] { font-family: var(--font-bengali); line-height: 1.75; }

a { color: var(--accent); }
img { max-inline-size: 100%; block-size: auto; }
main, .top, .nav, .foot { max-inline-size: 44rem; margin-inline: auto; padding-inline: 1rem; }

/* Header and navigation */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1rem 0.5rem; }
.brand { font-weight: 700; color: var(--text); text-decoration: none; }
.langs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.langs a { text-decoration: none; padding: 0.2rem 0.6rem; border: 1px solid var(--line); border-radius: 999px; font-size: 0.9rem; }
.nav { display: flex; gap: 0.25rem; overflow-x: auto; padding-block: 0.25rem 0.5rem; scrollbar-width: none; }
.nav a {
  flex: none; padding: 0.4rem 0.8rem; border-radius: 999px; text-decoration: none; color: var(--muted);
}
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* Typography */
section { margin-block: 1.5rem; }
h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); line-height: 1.2; margin-block: 0.5rem; }
h2 { font-size: 1.25rem; margin-block: 0 0.75rem; }
h3 { font-size: 1.05rem; margin-block: 0; }
:lang(ur) h1, :lang(ur) h2, :lang(ur) h3 { line-height: 1.9; }
.note, .tagline, .when, time { color: var(--muted); }

/* Hero */
.hero { padding-block: 1rem 0.5rem; border-block-end: 3px solid var(--accent); }
.cover { display: block; inline-size: 100%; aspect-ratio: 8 / 3; object-fit: cover; border-radius: var(--radius); }
.tagline { margin: 0; }

/* Seasonal banner */
.banner {
  display: flex; flex-direction: column; gap: 0.15rem; padding: 0.9rem 1rem; border-radius: var(--radius);
  background: var(--accent); color: var(--on-accent); text-decoration: none;
}
.banner h2 { margin: 0; font-size: 1.05rem; }

/* Prayer times */
.times .widget { min-block-size: 12rem; }
.loading { color: var(--muted); }
.times .iqamah-widget {
  max-inline-size: 100%;
  --w-bg: var(--surface);
  --w-surface: #11172a;
  --w-text: var(--text);
  --w-text-2: var(--muted);
  --w-muted: var(--muted);
  --w-brand: var(--accent);
  --w-brand-2: var(--accent);
  --w-brand-light: var(--accent-soft);
  --w-gold: var(--accent);
  --w-gold-soft: var(--accent-soft);
  --w-active-bg: var(--accent-soft);
  --w-line: var(--line);
  --w-line-strong: var(--line);
  --w-header-from: #11172a;
  --w-header-via: var(--surface);
  --w-header-to: var(--surface);
  --w-shadow: none;
  border: 1px solid var(--line);
}
.times .iqamah-widget .iqw-header {
  color: var(--text);
  border-bottom: 1px solid var(--line);
}
.times .iqamah-widget .iqw-date,
.times .iqamah-widget .iqw-hijri-date {
  color: var(--muted);
  opacity: 1;
}
.times .iqamah-widget .iqw-footer-logo {
  filter: brightness(0) invert(0.8);
}

/* Cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.cards li, .card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem;
}
.cards p { margin-block: 0.4rem 0; }
.tag { display: inline-block; padding: 0.12rem 0.65rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 0.85rem; font-weight: 500; }
.more { margin-block-start: 0.75rem; }

/* Visit */
.address { margin-block: 0 0.85rem; font-size: 1.02rem; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem; padding: 0; margin: 0 0 0.9rem; }
.chips li { padding: 0.2rem 0.75rem; background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); border-radius: 999px; font-size: 0.88rem; font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.btn {
  display: inline-block; padding: 0.6rem 1.15rem; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 600;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-1px); opacity: 0.94; }
.btn-quiet { background: var(--accent-soft); color: var(--accent); }

/* About */
.people { list-style: none; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); }
.people li { display: flex; flex-direction: column; gap: 0.2rem; }
.people img { inline-size: 4rem; block-size: 4rem; border-radius: 50%; object-fit: cover; }
.people span { color: var(--muted); font-size: 0.9rem; }

/* Gallery */
.grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); }
.grid figure { margin: 0; }
.grid img { inline-size: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: calc(var(--radius) / 2); }
.grid figcaption { font-size: 0.85rem; color: var(--muted); }

/* Donate and facts */
dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: 0.5rem 0 0; }
dt { color: var(--muted); }
dd { margin: 0; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; text-align: start; unicode-bidi: isolate; }
.donate .card { margin-block: 0.75rem; }

/* Ramadan timetable */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { inline-size: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 0.45rem 0.75rem; text-align: start; border-block-end: 1px solid var(--line); white-space: nowrap; }
thead th { background: var(--surface); position: sticky; inset-block-start: 0; font-size: 0.9rem; }
tbody tr:last-child td { border-block-end: 0; }
tr.today td { background: var(--accent-soft); font-weight: 600; }
.eid-times { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.3rem; }
.eid-times span:first-child { font-weight: 700; }
.where { color: var(--muted); }

/* Footer */
.foot { padding-block: 2rem 3rem; color: var(--muted); font-size: 0.9rem; border-block-start: 1px solid var(--line); margin-block-start: 2rem; }
.foot p { margin-block: 0.3rem; }
.unverified { font-style: italic; }
.bank-name { margin: 0.25rem 0 0; font-weight: 600; }


/* ── Lantern ── */
body { background: radial-gradient(60rem 30rem at 50% -10rem, var(--glow), transparent 70%) no-repeat, var(--bg); }
h1, h2 { font-family: var(--font-display); font-weight: 600; }
:lang(ar) h1, :lang(ar) h2 { font-family: var(--font-arabic); }
:lang(ur) h1, :lang(ur) h2 { font-family: var(--font-urdu); }
:lang(bn) h1, :lang(bn) h2 { font-family: var(--font-bengali); }
h2 { color: var(--accent); letter-spacing: 0.01em; }

/* The photo spans every row; the name and tagline take the last two, so
   they stack at the bottom whatever the script's line height. */
.hero { border: 0; display: grid; grid-template-rows: 1fr auto auto; padding: 0; border-radius: var(--radius); overflow: hidden; margin-block-start: 0.5rem; }
.hero .cover { grid-area: 1 / 1 / -1 / -1; inline-size: 100%; aspect-ratio: 4 / 3; border-radius: 0; filter: brightness(0.6) saturate(0.9); }
@media (min-width: 40rem) { .hero .cover { aspect-ratio: 16 / 7; } }
.hero h1, .hero .tagline { grid-column: 1; z-index: 1; padding-inline: 1.25rem; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6); }
.hero h1 { grid-row: 2; margin-block: 0 0.15rem; }
.hero .tagline { grid-row: 3; margin-block: 0 1.1rem; color: var(--text); opacity: 0.92; }
.hero h1:last-child { margin-block-end: 1.1rem; }
/* No cover photo: illuminated night card with subtle geometric star pattern. */
.hero:not(:has(.cover)) {
  display: block;
  padding: 2rem 1.5rem 1.5rem;
  background:
    radial-gradient(120% 100% at 50% 0%, var(--glow), transparent 75%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23f2c36b' stroke-opacity='.08' stroke-width='1.1'%3E%3Crect x='16' y='16' width='24' height='24'/%3E%3Crect x='16' y='16' width='24' height='24' transform='rotate(45 28 28)'/%3E%3C/g%3E%3C/svg%3E"),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px -18px var(--glow);
}
.hero:not(:has(.cover)) > * { padding-inline: 0; margin-block: 0 0.25rem; text-shadow: none; }

.times { padding: 1rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 0 0 1px var(--glow), 0 18px 40px -24px var(--glow); }
.banner { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #fff)); }
.cards li, .card { background: var(--surface); }
.btn { box-shadow: 0 6px 18px -8px var(--glow); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; background: none; }
thead th { background: var(--surface); }
