/*
 * Minaret v3. Logical properties only (inline/block, never left/right), so
 * the same sheet lays out Urdu and Arabic right to left.
 * Accents mirror the app's pairs in src/constants/design.ts: each light
 * accent has a dark partner (evergreen/emerald, twilight/sapphire, rosewood/amber).
 */
:root {
  --bg: #fbf8f2;
  --surface: #ffffff;
  --text: #1d1b16;
  --muted: #5f5a4e;
  --line: #e6dfd1;
  --accent: #065f46;
  --accent-soft: rgba(6, 95, 70, 0.1);
  --on-accent: #ffffff;
  --radius: 14px;
  --font-latin: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-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: light dark;
}
[data-accent="twilight"] { --accent: #2d3a8c; --accent-soft: rgba(45, 58, 140, 0.1); }
[data-accent="rosewood"] { --accent: #9d174d; --accent-soft: rgba(157, 23, 77, 0.1); }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12110e;
    --surface: #1c1a16;
    --text: #f5efe6;
    --muted: #b5ad9d;
    --line: #2f2b24;
    --accent: #8fe0c2;
    --accent-soft: rgba(143, 224, 194, 0.14);
    --on-accent: #0c241b;
  }
  [data-accent="twilight"] { --accent: #86c7ff; --accent-soft: rgba(134, 199, 255, 0.14); --on-accent: #0d1b33; }
  [data-accent="rosewood"] { --accent: #f4d06f; --accent-soft: rgba(244, 208, 111, 0.14); --on-accent: #2b2008; }
}

* { 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: 1.1rem 0.75rem;
  border-block-end: 3px solid var(--accent);
}
.hero:not(:has(.cover)) {
  padding: 1.5rem 1.35rem 1.25rem;
  background-color: var(--surface);
  background-image: radial-gradient(circle at 100% 0%, var(--accent-soft) 0%, transparent 55%);
  border: 1px solid var(--line);
  border-block-end: 4px solid var(--accent);
  border-radius: var(--radius);
}
.cover { display: block; inline-size: 100%; aspect-ratio: 8 / 3; object-fit: cover; border-radius: var(--radius); }
.tagline { margin: 0; font-size: 1.05rem; }

/* 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: color-mix(in srgb, var(--surface) 88%, var(--accent));
  --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-active-bg: var(--accent-soft);
  --w-line: var(--line);
  --w-line-strong: var(--line);
  --w-header-from: color-mix(in srgb, var(--surface) 92%, var(--accent));
  --w-header-via: var(--surface);
  --w-header-to: var(--surface);
  border: 1px solid var(--line);
}

/* 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;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}
.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; }
