/* Shahin app pages. Same calm look as the apps: warm paper, soft green, a touch of gold.
   No external requests: fonts are served from this site (OFL licences next to them). */

@font-face {
  font-family: 'IBM Plex Sans Arabic';
  src: url('fonts/IBMPlexSansArabic_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  src: url('fonts/IBMPlexSansArabic_600SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Amiri Quran';
  src: url('fonts/AmiriQuran_400Regular.ttf') format('truetype');
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-alt: #efebe3;
  --text: #1e2a2e;
  --text-2: #5c6a6d;
  --accent: #2e7d6b;
  --accent-text: #2b7464;
  --on-accent: #ffffff;
  --accent-soft: #e3f1ec;
  --gold: #b8924a;
  --border: #e4dfd5;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1517;
    --surface: #172024;
    --surface-alt: #1e292e;
    --text: #e9edec;
    --text-2: #9dabaa;
    --accent: #62bba5;
    --accent-text: #62bba5;
    --on-accent: #0f1517;
    --accent-soft: #1d3631;
    --gold: #d4b26e;
    --border: #263236;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.75;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

a { color: var(--accent-text); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Language switch. Shown only when JavaScript can switch; without it both languages show. */
.lang-switch {
  display: none;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
}
html[data-lang] .lang-switch { display: flex; }
.lang-switch button {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  min-height: 44px;
  min-width: 112px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent-text);
  cursor: pointer;
}
.lang-switch button[aria-pressed='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

html[data-lang='ar'] .only-en,
html[data-lang='en'] .only-ar { display: none; }

/* Header: icon, name, ornament (line · star · line) */
.app-head { text-align: center; margin-bottom: 28px; }
.app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 6px 20px rgba(30, 42, 46, 0.12);
}
.app-name {
  font-family: 'Amiri Quran', 'IBM Plex Sans Arabic', serif;
  font-weight: 400;
  font-size: 40px;
  line-height: 1.6;
  margin: 12px 0 0;
}
.app-name .latin {
  display: block;
  font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.04em;
}
.ornament { display: block; margin: 14px auto 0; color: var(--gold); }

.tagline { text-align: center; color: var(--text-2); margin: 0 0 24px; }

/* Hadith card */
.hadith {
  text-align: center;
  background: var(--accent-soft);
  border-radius: 20px;
  padding: 20px;
  margin: 0 0 28px;
}
.hadith q {
  display: block;
  font-family: 'Amiri Quran', 'IBM Plex Sans Arabic', serif;
  font-size: 26px;
  line-height: 2;
  quotes: '«' '»';
}
.hadith .meaning { display: block; margin-top: 4px; }
.hadith cite { display: block; font-style: normal; font-size: 15px; color: var(--text-2); margin-top: 6px; }

/* Cards and sections */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  margin: 0 0 16px;
}
.card.summary { border-color: var(--accent); }
h1 { font-size: 26px; line-height: 1.5; margin: 0 0 4px; text-align: center; }
h2 { font-size: 19px; line-height: 1.5; margin: 0 0 8px; }
.card p, .card ul { margin: 0 0 10px; }
.card > :last-child { margin-bottom: 0; }
.card ul { padding-inline-start: 22px; }
.card li { margin-bottom: 4px; }
.muted { color: var(--text-2); font-size: 15px; }
.center { text-align: center; }

.facts {
  list-style: none;
  padding: 0 !important;
  margin: 0;
  display: grid;
  gap: 8px;
}
.facts li {
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.facts li::before {
  content: '✓';
  color: var(--accent-text);
  font-weight: 600;
  flex: none;
}

/* FAQ */
details {
  border-top: 1px solid var(--border);
  padding: 12px 0;
}
details:first-of-type { border-top: 0; padding-top: 0; }
summary {
  font-weight: 600;
  cursor: pointer;
  min-height: 32px;
  list-style-position: outside;
}
details p { margin: 8px 0 0; }

/* Buttons and footer */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}
.links { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; margin: 24px 0 0; }
footer { text-align: center; color: var(--text-2); font-size: 14px; margin-top: 32px; }

/* "Apps by Shahin" link at the top of each app page, so every page leads back to the list of apps. */
.crumb {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-2);
  margin: -12px 0 20px;
}
.crumb a { color: var(--text-2); }

.apps-title { text-align: center; font-size: 17px; color: var(--text-2); font-weight: 600; margin: 8px 0 14px; }

/* App cards on the home page: one app per row. */
.apps {
  display: grid;
  gap: 16px;
}
.app-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
a.app-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(30, 42, 46, 0.1);
}
@media (prefers-reduced-motion: reduce) {
  .app-card, a.app-card:hover { transition: none; transform: none; }
}
.app-card img { width: 64px; height: 64px; border-radius: 15px; flex: none; }
.app-card strong { display: block; font-size: 19px; line-height: 1.5; }
.app-card span { display: block; color: var(--text-2); font-size: 15px; line-height: 1.6; }
.app-card.soon { background: transparent; border: 1.5px dashed var(--border); }
.soon-icon {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 15px;
  border: 1.5px dashed var(--border);
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 30px !important;
  color: var(--gold) !important;
}
