/* web27 styles (step 11 design).
   Uses logical properties (inline-start/end) so Arabic, Urdu and other RTL languages mirror correctly. */

/* ===== Theme: change the site colors here ===== */
:root {
  --bg: #ffffff;         /* page background */
  --main: #00222C;       /* main color: top bar, buttons, bands, footer */
  --silver: #F9F9F9;     /* very soft silver: cards and labels */
  --link: #0264B3;       /* links in texts */
  --link-hover: #8E1212; /* links on mouse over */
  --gold: #C9A24A;       /* second color: details */
  --gold-l: #E9C77B;     /* light gold: on dark bands */
  --on-main: #ffffff;    /* text on the main color */
  --ink: #16202A;        /* text */
  --muted: #5A6570;      /* secondary text */
  --line: #E5E7EA;       /* borders */
  /* ============================================ */
  --accent: var(--main);
  --accent-ink: var(--on-main);
  --soft: var(--silver);
  --on-main-muted: color-mix(in srgb, var(--on-main) 75%, var(--main));
  --radius: 14px;
  --wrap: 1200px;
  --sans: 'AmiriAr', 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'AmiriAr', 'IBM Plex Serif', Georgia, serif;
  --mono: 'AmiriAr', 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  font-size: 17px;
}
[dir="rtl"] { --sans: 'Amiri', 'Noto Naskh Arabic', Tahoma, serif; --serif: 'Amiri', 'Noto Naskh Arabic', Tahoma, serif; }
:root[dir="rtl"] { font-size: 18px; }

/* Fonts: same files as www.tawkit.net (/fonts/) */
@font-face { font-family: 'Amiri'; src: url('/fonts/AmiriRegular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Amiri'; src: url('/fonts/AmiriBold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
/* Arabic letters inside Latin pages (language names, Arabic titles...) always in Amiri */
@font-face { font-family: 'AmiriAr'; src: url('/fonts/AmiriRegular.woff2') format('woff2'); font-weight: 400; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'AmiriAr'; src: url('/fonts/AmiriBold.woff2') format('woff2'); font-weight: 700; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'IBM Plex Serif'; src: url('/fonts/IBMPlexSerif-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Serif'; src: url('/fonts/IBMPlexSerif-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('/fonts/IBMPlexSans-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/IBMPlexMono-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/IBMPlexMono-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
  overflow-x: clip;
}
[dir="rtl"] body { line-height: 1.9; }
h1, h2, h3, strong, b, th, .btn, .brand b { font-family: var(--serif); font-weight: 700; }

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: none; }
img { max-width: 100%; height: auto; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 16px; }

.skip { position: absolute; top: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { width: auto; height: auto; clip-path: none; inset-inline-start: 16px; top: 8px; background: var(--bg); padding: 6px 10px; z-index: 10; }

.devbar { background: #faeeda; color: #633806; font-size: 13px; text-align: center; padding: 4px 8px; }

/* Header */
.site-header { border-block-end: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.25rem; color: var(--ink); text-decoration: none; }
.main-nav { display: flex; gap: 20px; flex-wrap: wrap; flex: 1; }
.main-nav a { color: var(--ink); text-decoration: none; padding-block: 4px; }
.main-nav a[aria-current="page"] { border-block-end: 2px solid var(--accent); }

/* Language menu */
.lang-switch { position: relative; }
.lang-switch summary { cursor: pointer; list-style: none; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch ul { position: absolute; inset-inline-end: 0; z-index: 5; margin: 6px 0 0; padding: 6px; list-style: none;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); min-width: 180px; max-height: 60vh; overflow: auto; }
.lang-switch li a { display: block; padding: 4px 10px; color: var(--ink); text-decoration: none; border-radius: 6px; }
.lang-switch li a:hover, .lang-switch li a[aria-current="true"] { background: var(--soft); }

/* Main */
.site-main { padding-block: 40px 96px; }
h1 { font-size: 2rem; line-height: 1.3; margin: 0 0 16px; }
h2 { font-size: 1.4rem; line-height: 1.35; margin: 0 0 12px; }
h3 { font-size: 1.08rem; line-height: 1.4; margin: 20px 0 8px; }
.lead { font-size: 1.2rem; color: var(--muted); margin: 0 0 20px; }
.block { padding-block: 32px; border-block-start: 1px solid var(--line); }
.block > p { max-width: 760px; }
.block-cta { margin-block: 20px 0; }
.dev-note { color: var(--muted); font-size: 14px; }

/* Home: hero */
.hero { display: grid; gap: 32px; align-items: center; padding-block: 8px 40px; }
.badges ul { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.badges li { padding: 2px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); font-size: .92rem; }
.hero-pic { margin: 0; }
.hero-pic img { display: block; width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
@media (min-width: 900px) { .hero { grid-template-columns: 1fr 1fr; } }

/* Home: AI box */
.block-ai_box { border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); padding: 24px; }
.block-ai_box + .block { border-block-start: 0; }

/* Home: cards (where it runs, install steps, features, sellers) */
.block-where_it_runs ul, .block-install_steps ol, .tiles, .contacts {
  list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.block-where_it_runs ul, .block-install_steps ol { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.block-where_it_runs li, .block-install_steps ol li, .tile, .contacts li {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--bg); }
.block-where_it_runs li strong, .block-install_steps li strong { display: block; font-size: 1.05rem; }
.block-where_it_runs li a { display: inline-block; margin-block-start: 8px; }

.block-install_steps ol { counter-reset: step; }
.block-install_steps ol li { counter-increment: step; }
.block-install_steps ol li::before { content: counter(step); display: grid; place-items: center; width: 34px; height: 34px;
  margin-block-end: 10px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; }

.tile h3 { margin: 0 0 4px; }
.tile p { margin: 0; color: var(--muted); font-size: .95rem; }

.contacts li { display: flex; flex-direction: column; gap: 2px; padding-block: 12px; }
.contacts .where, .contacts .price { color: var(--muted); font-size: .95rem; }
.contacts .wa { margin-block-start: 4px; white-space: nowrap; }

/* Home: screenshots */
.shots { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 12px; }
.shots-landscape { grid-template-columns: repeat(3, 1fr); }
.shots-portrait { grid-template-columns: repeat(6, 1fr); }
.shots a { display: block; }
.shots img { display: block; width: 100%; border-radius: 8px; border: 1px solid var(--line); }

/* Home: numbers */
.stats { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-wrap: wrap; gap: 16px 48px; }
.stats strong { display: block; font-size: 2.2rem; line-height: 1.1; color: var(--accent); }
.stats span { color: var(--muted); }

/* Home: guides, library, release */
.guide-list { padding-inline-start: 20px; }
.guide-list li span { display: block; color: var(--muted); font-size: .95rem; }
.books { columns: 3 240px; column-gap: 32px; padding-inline-start: 20px; margin: 16px 0; }
.books li { break-inside: avoid; margin-block-end: 6px; }
.fmt { margin-inline-start: 6px; padding: 0 5px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: .72rem; }
.release-line { font-weight: 600; }

/* Features and screenshots pages */
.page.page-wide { max-width: none; }
.page-wide > p { max-width: 760px; }
.feature-group { padding-block: 16px; }
.feature-group h2 { margin-block-start: 16px; }
.tile h3 a { color: inherit; text-decoration: none; }
.tile h3 a:hover { color: var(--link-hover); text-decoration: none; }
.tile p + p, .tile ul { margin-block-start: 8px; font-size: .95rem; }
:target { scroll-margin-top: 16px; }
.tile:target { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.page { max-width: 760px; }
.child-pages { padding-inline-start: 20px; }
blockquote { margin: 16px 0; padding: 4px 16px; border-inline-start: 3px solid var(--line); color: var(--muted); }
pre { background: var(--soft); padding: 12px 16px; border-radius: var(--radius); overflow: auto; direction: ltr; }
code { direction: ltr; unicode-bidi: isolate; }

/* Buttons */
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 10px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; background: var(--bg); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Footer */
.site-footer { border-block-start: 1px solid var(--line); background: var(--soft); padding-block: 24px; font-size: 15px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-nav a { color: var(--ink); text-decoration: none; }
.waqf, .copy { color: var(--muted); margin: 8px 0 0; }


/* Language suggestion banner */
.lang-banner { position: fixed; inset-inline-start: 16px; bottom: 16px; z-index: 20; display: flex; gap: 10px; align-items: center;
  padding: 8px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.lang-banner[hidden] { display: none; }
.lang-banner button { border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--muted); }

@media (max-width: 640px) {
  :root { font-size: 16px; }
  h1 { font-size: 1.6rem; }
  .block-ai_box { padding: 16px; }
  /* screenshots: a row you swipe sideways */
  .shots { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%;
    overflow-x: auto; scroll-snap-type: x mandatory; padding-block-end: 6px; }
  .shots-portrait { grid-auto-columns: 42%; }
  .shots li { scroll-snap-align: start; }
  .header-row { gap: 12px; padding-block: 8px; }
  .main-nav { order: 3; flex-basis: 100%; gap: 14px; }
  .lang-banner { inset-inline: 16px; bottom: 72px; }
}

/* Download pages */
.dl-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); margin-block: 16px 32px; }
.dl-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--bg); }
.dl-card h2 { font-size: 1.2rem; }
.files { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
.file { display: flex; flex-direction: column; gap: 2px; }
.file .btn { text-align: center; }
.file-name { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.notes { color: var(--muted); font-size: .92rem; padding-inline-start: 20px; margin: 8px 0 0; }
.device .dl-card { margin-block: 24px; }
.dl-web { border-color: var(--accent); background: var(--soft); margin-block: 16px; }
.dl-web .file-name { margin-inline-start: 8px; }

/* Help center */
.help-search { display: flex; flex-direction: column; gap: 6px; max-width: 520px; }
.help-search input { font: inherit; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.help-group { padding-block: 12px; }
.guide-cards { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.guide-cards li { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.guide-cards a { font-weight: 600; text-decoration: none; }
.guide-cards a:hover { color: var(--link-hover); text-decoration: none; }
.guide-cards span { display: block; color: var(--muted); font-size: .92rem; margin-block-start: 4px; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: .92rem; margin-block-end: 12px; }
.crumbs a { color: var(--muted); }
.short-answer { border-inline-start: 3px solid var(--accent); padding-inline-start: 14px; }
.guide h2 { margin-block-start: 28px; }
.guide ol li, .guide ul li { margin-block-end: 6px; }
.related { margin-block-start: 32px; padding: 16px 20px; background: var(--soft); border-radius: var(--radius); }
.related h2 { margin-block-start: 0; font-size: 1.1rem; }
.ask-box { margin-block-start: 32px; padding: 20px; border: 1px solid var(--accent); border-radius: var(--radius); }
.ask-box h2 { margin-block-start: 0; font-size: 1.15rem; }
.faq-item { border-block-end: 1px solid var(--line); padding-block: 12px; }
.faq-item summary { cursor: pointer; font-weight: 600; }
.faq-answer { padding-block-start: 8px; }

/* Community and volunteers */
.country-tiles { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.country-tiles a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.country-tiles a:hover { border-color: var(--accent); }
.country-tiles .flag { font-size: 1.4rem; line-height: 1; }
.country-tiles .cname { flex: 1; }
.country-tiles .count { color: var(--muted); font-size: .9rem; }
.country-contact { padding: 12px 16px; background: var(--soft); border-inline-start: 3px solid var(--accent); border-radius: 6px; }
.country-contact .wa { margin-inline-start: 6px; white-space: nowrap; }
.badge { display: inline-block; width: fit-content; padding: 0 8px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.contacts li.is-contact { border-color: var(--accent); }
.notes-line { color: var(--muted); font-size: .92rem; }

/* Forms */
.form p { display: flex; flex-direction: column; gap: 4px; margin: 0 0 14px; }
.form input, .form select, .form textarea { font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); max-width: 100%; }
.form button { align-self: flex-start; font: inherit; cursor: pointer; }
.news-msg { flex-basis: 100%; margin: 6px 0 0; font-size: 1rem; }
.news-msg:empty { display: none; }
.news-msg.ok { color: #9be3bf; }
.news-msg.err { color: #ffb4b4; }
.updates .news-msg.ok { color: #0b6b3a; }
.updates .news-msg.err { color: #8E1212; }
.form .hp, .news-form .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.notice { padding: 12px 16px; border-radius: var(--radius); }
.notice.ok { background: #e1f5ee; color: #085041; }
.notice.err { background: #fcebeb; color: #791f1f; padding-inline-start: 32px; }

/* AI assistant (same behaviour as the current www.tawkit.net chat):
   round button bottom end; wide centered window with a dark overlay on computers;
   full screen on phones. The iframe loads on first open. */
.ai-button { position: fixed; inset-inline-end: 24px; bottom: 24px; z-index: 9998; display: flex; align-items: center; gap: 10px;
  height: 56px; padding-inline: 16px 20px; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  text-decoration: none; font-weight: 600; box-shadow: 0 4px 20px rgba(0,0,0,.25); transition: transform .2s, box-shadow .2s; }
.ai-button:hover { transform: scale(1.04); box-shadow: 0 6px 24px rgba(0,0,0,.32); }
.ai-button svg { width: 26px; height: 26px; fill: currentColor; flex: none; }
.ai-button .icon-close { display: none; }
.ai-open .ai-button .icon-open, .ai-open .ai-button .ai-label { display: none; }
.ai-open .ai-button .icon-close { display: block; }
.ai-open .ai-button { padding: 0; width: 56px; justify-content: center; }
.ai-badge { position: absolute; top: -2px; inset-inline-end: -2px; width: 16px; height: 16px; border-radius: 50%;
  background: #e84040; border: 2px solid #fff; display: none; }
.ai-badge.visible { display: block; }
.ai-overlay { position: fixed; inset: 0; z-index: 9998; background: rgba(0,0,0,.4); }
.ai-overlay[hidden] { display: none; }
.ai-panel { position: fixed; z-index: 9999; top: 50%; left: 50%; translate: -50% -50%;
  width: min(900px, calc(100vw - 50px)); height: min(680px, calc(100vh - 50px));
  display: flex; flex-direction: column; background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 8px 48px rgba(0,0,0,.18); opacity: 0; transform: translateY(16px) scale(.97);
  transition: opacity .22s ease, transform .22s ease; }
.ai-panel[hidden] { display: none; }
.ai-panel.open { opacity: 1; transform: none; }
.ai-panel iframe { width: 100%; height: 100%; border: 0; display: block; }
.ai-close { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 10; width: 32px; height: 32px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ai-close:hover { background: rgba(0,0,0,.8); }
.ai-inline { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-block: 16px; }
.ai-inline iframe { display: block; width: 100%; height: min(680px, 80vh); border: 0; }
@media (max-width: 600px) {
  .ai-panel { top: 0; left: 0; translate: none; width: 100%; height: 100%; border-radius: 0; }
  .ai-button { inset-inline-end: 16px; bottom: 16px; padding: 0; width: 56px; justify-content: center; }
  .ai-button .ai-label { display: none; }
}

/* Prayer times */
.pt-meta { display: flex; flex-wrap: wrap; gap: 6px 24px; color: var(--muted); }
.pt-meta strong { color: var(--ink); }
.pt-grid { list-style: none; padding: 0; margin: 16px 0 8px; display: grid; gap: 10px; grid-template-columns: repeat(6, 1fr); }
.pt-grid li { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 8px; text-align: center; background: var(--bg); }
.pt-grid .pn { display: block; color: var(--muted); font-size: .95rem; }
.pt-grid .tm { display: block; font-size: 1.6rem; font-weight: 700; direction: ltr; font-variant-numeric: tabular-nums; }
.pt-grid .is-next { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.pt-grid .is-next .pn { color: var(--accent-ink); }
.pt-grid .is-sunrise .tm { font-weight: 500; }
.table-wrap { overflow-x: auto; }
.pt-month table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.pt-month th, .pt-month td { padding: 6px 8px; border-block-end: 1px solid var(--line); text-align: center; white-space: nowrap; }
.pt-month td { direction: ltr; }
.pt-month thead th { background: var(--soft); font-weight: 600; }
.pt-month tr.today { background: #e1f5ee; font-weight: 700; }
.pt section { margin-block-start: 32px; }
.city-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 6px 16px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.city-list a { text-decoration: none; }
.city-list a:hover { color: var(--link-hover); text-decoration: none; }
@media (max-width: 640px) {
  .pt-grid { grid-template-columns: repeat(3, 1fr); }
  .pt-grid .tm { font-size: 1.35rem; }
}

/* =====================================================================
   Step 11 design layer (overrides the plain styles above)
   ===================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { padding-inline: 24px; }
h1 { font-size: 2.2rem; line-height: 1.15; letter-spacing: -.01em; }
h2 { font-size: 1.45rem; line-height: 1.25; }
h3 { font-size: 1.1rem; }
[dir="rtl"] h1, [dir="rtl"] h2 { line-height: 1.45; letter-spacing: 0; }
.page h1, .pt h1 { font-size: 2rem; }
.page h2, .guide h2 { font-size: 1.3rem; }
.lead.short-answer, .short-answer { font-size: 1.02rem; color: var(--muted); }

/* Top bar: the links users know from the old site */
.topbar { background: var(--main); color: var(--on-main); }
.topbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; min-height: 44px; }
.top-links { display: flex; flex-wrap: wrap; flex: 1; gap: 0 4px; }
.top-links a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 12px; color: var(--on-main);
  text-decoration: none; font-family: var(--mono); font-weight: 700; font-size: 13px; letter-spacing: .06em; }
[dir="rtl"] .top-links a { font-family: var(--sans); font-size: 16px; letter-spacing: 0; }
.top-links a:hover { color: var(--link-hover); text-decoration: none; }
.top-links a.hl { color: var(--gold-l); }
.topbar .lang-switch summary { border: 0; color: var(--on-main); padding: 10px 12px; font-size: 14px; }
.topbar .lang-switch summary { display: inline-flex; align-items: center; gap: 7px; }
.topbar .lang-switch ul { color: var(--ink); box-shadow: 0 12px 32px rgba(0,0,0,.15); }

/* Header: logo, name, menu */
.site-header { background: var(--bg); }
.header-row { gap: 12px 36px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand .logo { width: 84px; height: 84px; flex: none; }
.brand b { display: block; font-size: 1.6rem; line-height: 1; }
.brand small { display: block; color: var(--muted); font-size: .8rem; margin-block-start: 6px; font-weight: 400; font-family: var(--sans); }
.main-nav { justify-content: flex-end; gap: 2px 6px; }
.main-nav a { padding: 10px 12px; border-radius: 10px; }
.main-nav a:hover { background: var(--silver); }
.main-nav a[aria-current="page"] { border: 0; background: var(--silver); color: var(--main); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 24px;
  border: 1px solid color-mix(in srgb, var(--main) 28%, var(--bg)); border-radius: 12px; background: var(--bg); color: var(--ink); font-size: 1rem; cursor: pointer; }
.btn-primary { background: var(--main); border-color: var(--main); color: var(--on-main); }
.btn-gold { background: var(--gold-l); border-color: var(--gold-l); color: var(--main); }
.btn:hover { filter: brightness(1.08); }

/* Main area */
.site-main { padding-block: 32px 0; }
.block { padding-block: 64px; border: 0; }
.block > h2 { font-size: 1.75rem; }
.block > p { font-size: 1.08rem; color: var(--muted); }
.full-bleed, .block-ai_box, .block-newsletter { margin-inline: calc(50% - 50vw); padding-inline: max(24px, calc(50vw - var(--wrap) / 2 + 24px)); }

/* Hero */
.hero { padding-block: 0 24px; gap: 40px; }
.hero h1 { font-size: 2.7rem; }
.hero .lead { font-size: 1.1rem; }
.hero .lead { font-size: 1.2rem; }
.badges ul { margin: 0 0 18px; }
.badges li { border: 0; background: var(--silver); color: var(--main); padding: 6px 16px; font-family: var(--mono); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
[dir="rtl"] .badges li { font-family: var(--sans); font-size: 1rem; letter-spacing: 0; }
.hero-text { display: flex; flex-direction: column; }
.hero-text .badges { order: -1; }
.hero-pic img { border: 0; border-radius: 0; box-shadow: none; }
@media (min-width: 900px) { .hero { grid-template-columns: 5fr 7fr; } }
.hero-fade img { transition-duration: 2.5s !important; }
.hero-fade { display: grid; align-items: center; margin: 0; }
.hero-fade img { grid-area: 1 / 1; width: 100%; opacity: 0; transition: opacity 1.2s ease; align-self: center; }
.hero { align-items: center; }
.hero-text > :last-child { margin-block-end: 0; }
.hero-fade img.on { opacity: 1; }

/* Bands in the main color: AI box and newsletter */
.block-ai_box, .block-newsletter { background: var(--main); color: var(--on-main); border-radius: 0; padding-block: 44px; }
.block-ai_box + .block { border: 0; }
.block-ai_box > h2, .block-newsletter > h2 { font-size: 1.7rem; color: var(--on-main); }
.block-ai_box > p, .block-newsletter > p { color: var(--on-main-muted); max-width: 820px; }
.block-ai_box em { color: var(--gold-l); font-style: normal; }
.block-ai_box .btn, .block-newsletter .block-cta .btn { background: var(--gold-l); border-color: var(--gold-l); color: var(--main); }
.block-newsletter .block-cta .btn { background: none; border: 0; padding: 0; min-height: 0; color: var(--gold-l); }
.news-form { display: flex; flex-wrap: wrap; gap: 10px; max-width: 620px; margin-block-start: 16px; }
.news-form input[type=email] { flex: 1 1 220px; min-width: 0; max-width: 100%; min-height: 50px; padding: 0 16px; border: 0; border-radius: 12px; font: inherit; }


/* Cards: very soft silver */
.block-where_it_runs li, .block-install_steps ol li, .tile, .contacts li, .dl-card, .guide-cards li,
.country-tiles a, .pt-grid li, .related, .country-contact { background: var(--silver); border: 1px solid #EEEFF1; border-radius: 18px; }
.block-where_it_runs li, .block-install_steps ol li { padding: 22px; }
.block-install_steps ol li::before { width: 42px; height: 42px; background: var(--main); color: var(--gold-l); font-family: var(--mono); }
.tile { padding: 22px; }
.stats strong { color: var(--main); font-family: var(--mono); }

/* App in a real place: full-width picture (placeholder until the picture is added) */
.situ { position: relative; min-height: 560px; display: flex; align-items: flex-end; color: #fff; overflow: hidden;
  background: radial-gradient(ellipse at 70% 30%, color-mix(in srgb, var(--main) 55%, #3a3a3a), #0d0d0d 75%); padding-inline: 0; }
.situ img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.situ-cap { position: relative; width: 100%; padding-block: 56px; background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.situ h2 { font-size: 2.1rem; max-width: 680px; color: #fff; }
.situ p { color: #e8e8e8; font-size: 1.15rem; max-width: 600px; margin: 10px 0 0; }

/* Prayer times */
.pt-grid li { border: 0; }
.pt-grid .tm { font-family: var(--mono); }
.pt-grid .is-next { background: var(--main); color: var(--on-main); }
.pt-grid .is-next .tm { color: var(--gold-l); }
.pt-month thead th { background: var(--silver); }
.pt-month td { font-family: var(--mono); font-size: .92rem; }
.pt-month tr.today { background: color-mix(in srgb, var(--gold-l) 30%, var(--bg)); }

/* Footer */
.site-footer { background: var(--main); color: var(--on-main-muted); border: 0; padding-block: 40px; margin-block-start: 64px; }
.footer-nav a { color: var(--on-main); }
.waqf, .copy { color: var(--on-main-muted); }

a.btn:hover, .main-nav a:hover, .brand:hover, .ai-button:hover, .country-tiles a:hover { text-decoration: none; }
.block-ai_box a:not(.btn), .block-newsletter a:not(.btn), .situ a { color: var(--gold-l); }
.top-links a:hover { color: var(--gold-l); }
.main-nav a:hover { color: var(--ink); }
.btn:hover { color: inherit; }
.btn-primary:hover { color: var(--on-main); }
.brand:hover { color: var(--ink); }

/* Rich footer */
.foot-grid { display: grid; gap: 28px 28px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
@media (min-width: 1000px) { .foot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.foot-col h2 { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-l); margin: 0 0 12px; font-family: var(--mono); }
[dir="rtl"] .foot-col h2 { font-family: var(--serif); font-size: 1.05rem; letter-spacing: 0; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .92rem; line-height: 1.45; }
.foot-col li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.foot-col a { color: var(--on-main); opacity: .88; }
.foot-col a:hover { opacity: 1; color: var(--gold-l); }
.foot-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin-block-start: 36px; padding-block-start: 20px; border-block-start: 1px solid color-mix(in srgb, var(--on-main) 15%, var(--main)); }
.foot-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--on-main) !important; font-family: var(--serif); font-weight: 700; font-size: 1.25rem; }
.foot-brand:hover { text-decoration: none; }
.foot-bottom .copy { margin: 0; }

/* AI button */
.ai-button { background: var(--main); color: var(--on-main); border: 2px solid var(--gold-l); font-family: var(--serif); }

@media (max-width: 640px) {
  h1, .hero h1, .page h1, .pt h1 { font-size: 1.75rem; }
  .block > h2, h2 { font-size: 1.35rem; }
  .situ { min-height: 420px; }
  .situ h2 { font-size: 1.6rem; }
  .brand .logo { width: 64px; height: 64px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .brand b { font-size: 1.3rem; }
  .topbar-row { align-items: flex-start; }
  .top-links a { min-height: 38px; padding-inline: 7px; font-size: 12px; white-space: nowrap; }
  .topbar .lang-switch summary { padding: 9px 6px; }
  .main-nav { justify-content: flex-start; }
  .block { padding-block: 44px; }
}

/* Small x to hide the floating AI button (the top bar and page links still open the assistant) */
.ai-hide { position: fixed; z-index: 9999; bottom: 66px; inset-inline-end: 18px; width: 24px; height: 24px; padding: 0;
  border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--muted); font-size: 15px; line-height: 1;
  cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.15); display: flex; align-items: center; justify-content: center; }
.ai-hide:hover { color: var(--ink); }
.ai-open .ai-hide, .ai-hidden .ai-hide, .ai-hidden .ai-button { display: none; }
.ai-hidden.ai-open .ai-button { display: flex; }
@media (max-width: 600px) { .ai-hide { bottom: 60px; inset-inline-end: 10px; } }

/* Volunteers: names in the hover red, WhatsApp with its logo */
.contacts .pname, .contacts li > strong { color: var(--link-hover); }
.wa { display: inline-flex; align-items: center; gap: 6px; }
.wa-ico { color: #25D366; flex: none; }

.home .site-main, .site-main:has(.hero) { padding-block-start: 12px; }
.mail-ico { color: var(--link); flex: none; }

/* Phones crop the wide pictures from the sides: keep the TV in view (left in picture 1) */
#situation-1 img { object-position: 12% 50%; }

/* Hero: one fixed 4:3 box; every picture fits inside it (no jump between pictures of other sizes).
   Best pictures: 1200x900 webp, white or transparent background. */
.hero-fade { aspect-ratio: 4 / 3; width: 100%; }
.hero-fade img { width: 100%; height: 100%; object-fit: contain; }

/* Screenshot zoom (site.js) */
.lb { position: fixed; inset: 0; z-index: 2147483000; background: rgba(0, 20, 26, .92); display: flex; align-items: center; justify-content: center; padding: 48px 56px; }
.lb[hidden] { display: none; }
html.lb-on { overflow: hidden; }
.lb-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 100%; max-height: 100%; }
.lb-img { display: block; max-width: 100%; max-height: calc(100vh - 130px); width: auto; height: auto; object-fit: contain; border-radius: 6px; background: #000; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lb-cap { color: #e8eef0; font-size: .9rem; text-align: center; }
.lb button { position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 30px; line-height: 1; cursor: pointer; }
.lb button:hover, .lb button:focus-visible { background: rgba(255, 255, 255, .28); outline: 2px solid #fff; outline-offset: 2px; }
.lb-x { top: 12px; inset-inline-end: 12px; }
.lb-prev { inset-inline-start: 6px; top: 50%; transform: translateY(-50%); }
.lb-next { inset-inline-end: 6px; top: 50%; transform: translateY(-50%); }
.shots a { cursor: zoom-in; }
@media (max-width: 600px) { .lb { padding: 56px 8px 16px; } .lb-prev, .lb-next { top: auto; bottom: 12px; transform: none; } }

/* Pictures gallery (/gallery/) */
.gal-pg { font-size: 1rem; font-weight: 400; opacity: .7; }
.gal-intro { max-width: 760px; }
.gal-grid { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gal-grid figure { margin: 0; background: var(--silver); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.gal-grid a { display: block; cursor: zoom-in; background: #e9ecef; }
.gal-grid img { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain; transition: transform .4s ease; }
.gal-grid a:hover img, .gal-grid a:focus-visible img { transform: scale(1.02); }
.gal-grid figcaption { padding: 10px 14px; display: flex; gap: 10px; align-items: center; font-size: .92rem; }
.gal-lang { background: var(--main); color: #fff; border-radius: 20px; padding: 2px 10px; font-size: .82rem; white-space: nowrap; }
.gal-cap { opacity: .8; }
.gal-empty { padding: 40px 0; opacity: .7; }
.gal-nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; margin: 24px 0; }
.gal-nav a, .gal-nav span { min-width: 40px; text-align: center; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); }
.gal-nav [aria-current] { background: var(--main); color: #fff; border-color: var(--main); }
.gal-nav .gal-dots { border: 0; min-width: 0; padding: 8px 2px; }
@media (max-width: 700px) { .gal-grid { grid-template-columns: 1fr; gap: 14px; } }

/* Share buttons */
.share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0; }
.share-label { font-weight: 600; margin-inline-end: 4px; }
.share-btn { font: inherit; font-size: .9rem; border: 1px solid var(--line); background: #fff; color: var(--main); border-radius: 20px; padding: 5px 14px; cursor: pointer; text-decoration: none; }
.share-btn:hover, .share-btn:focus-visible { border-color: var(--link); color: var(--link); }
.share-native { background: var(--main); color: #fff; border-color: var(--main); }
.gal-home { margin-top: 12px; }

/* 11o: more space between the popular how-tos; AI box button turns red on hover */
.guide-list li { margin-block-end: 14px; }
.guide-list li:last-child { margin-block-end: 0; }
.block-ai_box .btn:hover, .block-ai_box .btn:focus-visible { background: var(--link-hover); border-color: var(--link-hover); color: #fff; filter: none; }

/* Page banners (3:1 under the H1; phones 2:1, centre kept) */
.page-banner { margin: 12px 0 28px; }
.page-banner img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: cover; object-position: center; border-radius: var(--radius); background: var(--silver); }
@media (max-width: 600px) { .page-banner { margin: 8px 0 20px; } .page-banner img { aspect-ratio: 2 / 1; } }

/* 12b: clear keyboard focus everywhere (blue on light, gold on dark parts) */
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 3px; }
.topbar :focus-visible, .site-footer :focus-visible, .block-ai_box :focus-visible, .block-newsletter :focus-visible, .situ :focus-visible, .ai-button:focus-visible { outline-color: var(--gold-l); }

/* 12b phone: shorter header = one row of top links + one row of menu, both swipe sideways */
@media (max-width: 600px) {
  .topbar-row { flex-wrap: nowrap; }
  .top-links { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .top-links::-webkit-scrollbar, .main-nav::-webkit-scrollbar { display: none; }
  .topbar .lang-switch { flex: none; }
  .header-row { padding-block: 10px 6px; }
  .main-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; margin-inline: -8px; padding-inline: 8px; }
  .main-nav a { white-space: nowrap; flex: none; padding: 8px 10px; }
  .lang-banner { bottom: 104px; }
}

/* Site map page */
.sitemap h2 { margin-block-start: 32px; }
.sm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 32px; }
.sm-grid h2, .sm-grid h3 { font-size: 1.1rem; margin-block: 16px 6px; }
.sm-grid ul, .sm-cols { list-style: none; padding: 0; margin: 0; }
.sm-grid li, .sm-cols li { padding-block: 3px; }
.sm-cols { columns: 4 200px; column-gap: 32px; }
.sm-cols small { color: var(--muted); }
.credit { margin-block-start: 32px; font-size: .82rem; color: var(--muted); }

/* Separator line in texts (--- in Markdown): very soft, with space above */
.page hr, article hr { border: 0; border-top: 1px solid #E6E8EB; margin: 72px 0 28px; height: 0; background: none; }
