/* ──────────────────────────────────────────────────────────────
   Arabily — Curriculum-Seiten (Lektionen & Buch-Hubs)
   Design 1:1 aus index.html übernommen: Navy/Mint, Inter +
   Noto Naskh Arabic, dieselben Container-Breiten und Buttons.
   Nur die Bausteine, die es dort noch nicht gab (Breadcrumb,
   Vokabeltabelle, Stat-Bar, Pagination), sind neu.

   Eine bewusste Abweichung: die Nav-Leiste ist hier nicht fixiert,
   sondern scrollt mit — Begründung steht bei der Regel.
   ────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #0e1b2e;        /* Navy aus den Store-Grafiken */
  --bg2:     #13253c;
  --bg3:     #182e49;
  --border:  rgba(255,255,255,0.09);
  --text:    #f2f7fb;
  --muted:   #9db1c5;
  --mint:    #1be0af;        /* Akzent aus den Store-Grafiken */
  --mint-d:  #0f9c79;
  --navy-ink:#062018;        /* dunkle Schrift auf Mint-Buttons */
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background:
    radial-gradient(ellipse 90% 55% at 70% 0%, rgba(27,224,175,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 80% 70% at 15% 100%, rgba(43,108,176,0.14) 0%, transparent 65%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 5vw; }

/* ── NAV ──
   Bewusst **nicht** fixiert und nicht sticky: die Leiste steht oben und
   scrollt mit. Auf der Startseite klebt sie am oberen Rand, hier nicht —
   diese Seiten sind lange Tabellen, und eine aus dem Dokumentfluss genommene
   Leiste hat beim Scrollen und beim Seitenwechsel immer wieder Reste anderer
   Elemente über sich stehen lassen. Ohne fixed/sticky kann sich nichts mehr
   überlagern.
   Aussehen (Glas-Hintergrund, 64 px, Trennlinie) wie in index.html. */
nav {
  /* Eigener Stapelkontext über dem Seiteninhalt: Logo, Sprachumschalter und
     der App-Knopf liegen damit garantiert über allem, was danach kommt.
     Ohne das malt CSS positionierte Nachfahren (.page-head, section — beide
     `position: relative`) nach dem nicht positionierten <nav>, also darüber. */
  position: relative;
  z-index: 10;
  background: rgba(14,27,46,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
/* Inhalt der Leiste auf dieselbe Spalte wie der Seiteninhalt (.wrap),
   damit Logo und Knöpfe mit Überschrift und Tabelle fluchten. */
.nav-inner {
  max-width: 1000px; margin: 0 auto; padding: 0 5vw;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
}
.nav-logo {
  font-size: 1.35rem; font-weight: 800; color: var(--text);
  text-decoration: none; letter-spacing: -0.3px;
  display: inline-flex; align-items: center; gap: 9px;
  flex-shrink: 0;
}
.nav-logo img { width: 28px; height: 28px; border-radius: 7px; }
.nav-logo i { color: var(--mint); font-style: normal; }
.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-cta {
  padding: 9px 20px; border-radius: 100px;
  background: var(--mint); color: var(--navy-ink);
  font-size: 0.875rem; font-weight: 700;
  text-decoration: none; border: none; cursor: pointer;
  transition: filter 0.2s, transform 0.15s;
  white-space: nowrap;
}
.nav-cta:hover { filter: brightness(1.1); transform: translateY(-1px); }

/* ── SPRACHUMSCHALTER (direkte 1:1-Links, kein JS) ── */
.lang-switch { display: flex; align-items: center; gap: 4px; padding: 3px; border-radius: 100px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border); }
.lang-switch a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 100px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.3px;
  color: var(--muted); text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.lang-switch a:hover { color: var(--mint); background: rgba(27,224,175,0.10); }
.lang-switch a[aria-current="true"] { color: var(--navy-ink); background: var(--mint); }
.lang-switch .flag { font-size: 0.95rem; line-height: 1; }
@media (max-width: 640px) {
  .lang-switch a { padding: 5px 9px; }
  .lang-switch .lang-label { display: none; }
}
@media (max-width: 420px) {
  .nav-cta { padding: 9px 14px; font-size: 0.8rem; }
  .nav-logo span { display: none; }
}

/* ── DEKO-STERNE (wie auf den Store-Grafiken) ── */
.star { position: absolute; pointer-events: none; opacity: 0.16; }

/* ── BREADCRUMB ── */
.crumbs { padding: 26px 0 0; font-size: 0.8rem; color: var(--muted); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.crumbs a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.crumbs a:hover { color: var(--mint); }
.crumbs li + li::before {
  content: '›'; margin-right: 8px; color: rgba(157,177,197,0.55);
}
.crumbs [aria-current="page"] { color: var(--text); font-weight: 600; }

/* ── KOPF DER SEITE ── */
.page-head { padding: 18px 0 8px; position: relative; }
.page-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(27,224,175,0.10); border: 1px solid rgba(27,224,175,0.4);
  border-radius: 100px; padding: 6px 16px;
  font-size: 0.72rem; font-weight: 700; color: var(--mint);
  margin-bottom: 20px; letter-spacing: 1.4px; text-transform: uppercase;
}
.page-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); }
h1 {
  font-size: clamp(1.85rem, 4vw, 2.9rem);
  font-weight: 800; line-height: 1.1; letter-spacing: -1px;
  margin-bottom: 16px;
}
h1 span { color: var(--mint); }
.page-sub {
  font-size: clamp(0.97rem, 1.5vw, 1.08rem);
  color: var(--muted); max-width: 660px; line-height: 1.75;
}

/* ── STAT-BAR ── */
.stat-bar {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 30px 0 6px;
}
.stat-chip {
  display: flex; align-items: center; gap: 12px;
  background: rgba(19,37,60,0.75);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 18px;
  min-width: 132px;
}
.stat-chip svg {
  width: 18px; height: 18px; flex-shrink: 0;
  fill: none; stroke: var(--mint); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.stat-chip .stat-num {
  font-size: 1.35rem; font-weight: 800; letter-spacing: -0.5px; line-height: 1.15;
}
.stat-chip .stat-label { font-size: 0.74rem; color: var(--muted); line-height: 1.3; }

/* ── ABSCHNITTE ── */
section { position: relative; }
.section-title {
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 800; letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.section-sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 22px; }

/* ── FEATURE-CTA (oben & unten) ── */
.cta-block { margin: 46px 0; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 16px;
}
.feature-card {
  background: rgba(19,37,60,0.75);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 22px;
  transition: border-color 0.2s, transform 0.2s;
  /* Layer vorab compositen — sonst blitzt beim Hover eine eckige
     Ebene hinter der abgerundeten Karte auf (wie bei .store-btn). */
  transform: translateY(0); will-change: transform;
}
.feature-card:hover { border-color: rgba(27,224,175,0.4); transform: translateY(-2px); }
.feature-icon {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(27,224,175,0.12);
  border-radius: 13px;
  margin-bottom: 15px;
}
.feature-icon svg {
  width: 21px; height: 21px; fill: none; stroke: var(--mint);
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.feature-title { font-size: 1rem; font-weight: 700; margin-bottom: 7px; }
.feature-desc { font-size: 0.875rem; color: var(--muted); line-height: 1.65; }

/* ── STORE-BUTTONS ── */
.store-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 13px 24px; border-radius: 14px;
  background: var(--mint); color: var(--navy-ink); text-decoration: none;
  font-weight: 800; font-size: 1rem;
  box-shadow: 0 6px 28px rgba(27,224,175,0.30);
  transition: transform 0.15s, filter 0.15s;
  transform: translateY(0); will-change: transform;
}
.store-btn:hover { filter: brightness(1.08); transform: translateY(-2px); }
.store-btn svg { width: 22px; height: 22px; fill: currentColor; }
.store-btn .lines { text-align: left; line-height: 1.12; }
.store-btn .lines small { display: block; font-size: 0.66rem; font-weight: 700; opacity: 0.75; }

/* ── CTA-BOX (unten, wie .cta-box auf der Startseite) ── */
.cta-box {
  background: linear-gradient(160deg, var(--bg3) 0%, var(--bg2) 100%);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 44px 36px;
  text-align: center;
  position: relative; overflow: hidden;
}
.cta-box::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 90% at 50% 0%, rgba(27,224,175,0.10) 0%, transparent 60%);
  pointer-events: none;
}
.cta-arabic {
  font-family: 'Noto Naskh Arabic', serif;
  font-size: 2.4rem; color: rgba(27,224,175,0.55);
  direction: rtl; margin-bottom: 14px; line-height: 1.6;
}
.cta-box h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; margin-bottom: 12px; letter-spacing: -0.5px; }
.cta-box p { color: var(--muted); margin-bottom: 8px; font-size: 0.95rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-box .store-row { justify-content: center; position: relative; }

/* ── VOKABELTABELLE ── */
.table-card {
  background: rgba(19,37,60,0.6);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.vocab { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
table.vocab caption { text-align: left; padding: 16px 20px 0; color: var(--muted); font-size: 0.8rem; }
table.vocab thead th {
  text-align: left;
  padding: 14px 20px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--mint);
  background: rgba(27,224,175,0.06);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.vocab thead th.col-ar { text-align: right; }
table.vocab tbody td { padding: 13px 20px; border-bottom: 1px solid rgba(255,255,255,0.05); vertical-align: middle; }
table.vocab tbody tr:last-child td { border-bottom: none; }
table.vocab tbody tr:nth-child(even) { background: rgba(255,255,255,0.017); }
table.vocab tbody tr:hover { background: rgba(27,224,175,0.045); }

.cell-num { color: rgba(157,177,197,0.5); font-size: 0.78rem; font-variant-numeric: tabular-nums; width: 1%; white-space: nowrap; }

/* Arabisch — großzügige Zeilenhöhe, damit Tashkeel nicht abgeschnitten wird */
.ar {
  font-family: 'Noto Naskh Arabic', serif;
  direction: rtl; text-align: right;
  font-size: 1.6rem; line-height: 2.05;
  white-space: nowrap;
}
.cell-ar { text-align: right; min-width: 160px; }
.word-type {
  display: block; margin-top: 2px;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase;
  color: rgba(157,177,197,0.75); text-align: right; direction: ltr;
}

.cell-empty { color: rgba(157,177,197,0.35); direction: ltr; }

/* Zwischenüberschrift, wenn eine Lektion Wörter und Verben hat */
.table-heading {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 1.3px; text-transform: uppercase;
  color: var(--mint);
  margin: 30px 0 12px;
}
.table-heading:first-of-type { margin-top: 0; }

.cell-tr { min-width: 200px; }
.tr-main { font-weight: 500; }
.tr-sub { display: block; font-size: 0.79rem; color: var(--muted); margin-top: 3px; line-height: 1.5; }

@media (max-width: 560px) {
  table.vocab { font-size: 0.88rem; }
  table.vocab thead th, table.vocab tbody td { padding: 11px 14px; }
  .ar { font-size: 1.42rem; }
  .cell-num { display: none; }
  table.vocab thead th.col-num { display: none; }
}

/* ── LEKTIONS-GITTER (Buch-Hub) ── */
.lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 12px;
}
.lesson-card {
  display: block; text-decoration: none; color: inherit;
  background: rgba(19,37,60,0.75);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 17px 18px;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
  /* Layer vorab compositen — sonst blitzt beim Hover eine eckige
     Ebene hinter der abgerundeten Karte auf (wie bei .store-btn). */
  transform: translateY(0); will-change: transform;
}
.lesson-card:hover { border-color: rgba(27,224,175,0.45); transform: translateY(-2px); background: rgba(24,46,73,0.9); }
.lesson-card .lc-no { font-size: 0.68rem; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--mint); }
.lesson-card .lc-title { font-size: 1.02rem; font-weight: 700; margin-top: 5px; letter-spacing: -0.3px; }
.lesson-card .lc-meta { font-size: 0.78rem; color: var(--muted); margin-top: 5px; }

/* ── ANDERE BÜCHER ── */
.book-links { display: flex; flex-wrap: wrap; gap: 10px; }
.book-links a {
  display: inline-block;
  padding: 9px 16px; border-radius: 100px;
  background: rgba(19,37,60,0.75); border: 1px solid var(--border);
  color: var(--muted); text-decoration: none;
  font-size: 0.84rem; font-weight: 600;
  transition: color 0.2s, border-color 0.2s;
}
.book-links a:hover { color: var(--mint); border-color: rgba(27,224,175,0.4); }

/* ── PAGINATION ── */
.pager {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin: 40px 0 0;
}
.pager a {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  background: rgba(19,37,60,0.75);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: inherit; text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
  /* Layer vorab compositen — sonst blitzt beim Hover eine eckige
     Ebene hinter der abgerundeten Karte auf (wie bei .store-btn). */
  transform: translateY(0); will-change: transform;
}
.pager a:hover { border-color: rgba(27,224,175,0.45); transform: translateY(-2px); }
.pager a.next { justify-content: flex-end; text-align: right; grid-column: 2; }
.pager a.prev { grid-column: 1; }
.pager .pg-dir { font-size: 0.68rem; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase; color: var(--mint); }
.pager .pg-title { font-size: 0.95rem; font-weight: 700; margin-top: 3px; }
.pager svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: var(--mint); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pager-hub { margin-top: 12px; text-align: center; }
.pager-hub a {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.86rem; font-weight: 600; color: var(--muted); text-decoration: none;
  padding: 9px 18px; border-radius: 100px; border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
}
.pager-hub a:hover { color: var(--mint); border-color: rgba(27,224,175,0.4); }
.pager-hub svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 560px) {
  .pager { grid-template-columns: 1fr; }
  .pager a.prev, .pager a.next { grid-column: 1; }
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  margin-top: 64px;
  padding: 28px 5vw 40px;
}
.footer-inner { max-width: 1000px; margin: 0 auto; }
.footer-top {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
}
.footer-logo { font-size: 0.9rem; color: var(--muted); }
.footer-logo i { color: var(--mint); font-style: normal; font-weight: 700; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 0.8rem; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }
.disclaimer {
  margin-top: 22px; padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 0.74rem; line-height: 1.7;
  color: rgba(157,177,197,0.72);
  max-width: 900px;
}
@media (max-width: 700px) { .footer-top { justify-content: center; text-align: center; } }

/* ── ZUGÄNGLICHKEIT ── */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 6px;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
