/**
 * kkl.css — Haggadah di Pesach Multimediale · Vista a schermo
 * e-brei.net · Fondazione KKL Italia
 * Stili di stampa: kkl_print.css
 */
/**
 * kkl.css — Haggadah di Pesach Multimediale
 * e-brei.net · Fondazione KKL Italia
 *
 * Font locali richiesti (cartella font/):
 *   OpenDyslexic-Regular.otf, OpenDyslexic-Bold.otf, OpenDyslexic-Italic.otf
 *   dyslexia-hebrew-extended.otf
 */
/* ============================================================
   e-brei.net Design System — Haggadah di Pesach Multimediale
   ============================================================ */

/* ── CSS Custom Properties ── */
:root {
  --navy:        #1e3a5f;
  --navy-light:  #2d5a8c;
  --gold:        #d4af37;
  --gold-light:  #e5c045;
  --gold-pale:   #fdf8e8;
  --beige:       #f5f1e8;
  --text:        #2c2c2c;
  --text-mid:    #444;
  --muted:       #888;
  --border:      rgba(30,58,95,.15);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── Body ── */
body {
  font-family: 'Open Sans', sans-serif;
  background: var(--beige);
  color: var(--text);
  line-height: 1.6;
}

/* ── Main content container ── */
.haggadah-content {
  width: 90%;
  max-width: 90%;
  margin: 0 auto;
  padding: 24px 0 80px;
}

/* ── Typography ── */
h1, h2, h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--navy);
  text-align: center;
  line-height: 1.2;
}

h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.55em;
  color: var(--navy);
  margin: 2.2em 0 0.6em;
  padding: 0.45em 0 0.45em 0;
  border-bottom: 2px solid var(--gold);
  text-align: center;
  scroll-margin-top: 110px;   /* clears sticky header */
}

h5 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25em;
  color: var(--navy);
  margin: 1.8em 0 0.4em;
  text-align: center;
}

p {
  margin: 0.55em 0;
  font-size: 1em;
  text-align: justify;
}

a { color: var(--navy); transition: color .2s; }
a:hover { color: var(--gold); }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.2em 0;
}

img { max-width: 100%; height: auto; border: none; }

table {
  border-collapse: collapse;
  width: 100%;
}
td { padding: 4px 6px; }

audio {
  width: 100%;
  max-width: 520px;
  display: block;
  margin: 6px 0;
}

li { display: block; }

/* ── Row stampa: ebraico a destra, traslitterato a sinistra ── */
.row-stampa {
  display: flex;
  flex-direction: row-reverse;   /* .he andrà a destra, .tr a sinistra */
  gap: 20px;
  align-items: baseline;
  margin: 0.15em 0;
}
.row-stampa p.he {
  flex: 1;
  text-align: right;
  margin: 0;
}
.row-stampa p.tr {
  flex: 1;
  text-align: left;
  margin: 0;
}

/* ── Content classes ── */
.he {
  direction: rtl;
  font-family: 'Rubik', Verdana, sans-serif;
  font-size: 1.25em;
  line-height: 1.95;
  text-align: right;
  color: var(--navy);
  letter-spacing: 0.3px;
  margin: 0.4em 0;
}

.tr {
  font-size: 1.1em;
  line-height: 1.75;
  color: #1a3a1a;
  margin: 0.4em 0;
  text-align: left;
}

.nota {
  font-size: 0.88em;
  color: var(--text-mid);
  font-style: italic;
  margin: 0.4em 0;
  text-align: justify;
}


/* Section headings always visible, even inside hidden .nota */
.hideNota .nota > h3,
.hideNota .nota > h4,
.nota > h3,
.nota > h4 { display: block !important; }
/* ── Hide classes ── */
.hideNota .nota { display: none; }
.hideHe   .he   { display: none; }
.hideTr   .tr   { display: none; }

/* ─────────────────────────────────────────────
   HEADER — tutto sticky, colonne che wrappano
   ───────────────────────────────────────────── */
#mainHeader {
  position: sticky;
  top: 0;
  z-index: 200;
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,.1);
}

/* Riga superiore con le colonne dei controlli */
.header-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 7px 18px;
  border-bottom: 1px solid rgba(30,58,95,.08);
}

/* ── Colonna 1: logo ── */
.header-col-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.header-col-brand a {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.site-logo {
  height: 46px;
  width: auto;
}

/* ── Colonna 2: titolo ── */
.header-col-title {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  border-left: 2px solid var(--gold);
  padding-left: 12px;
}
.header-page-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
}
.header-title-sep {
  width: 1px;
  height: 28px;
  background: rgba(30,58,95,.2);
  flex-shrink: 0;
}
.header-hebrew {
  font-family: 'Rubik', Verdana, sans-serif;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--navy);
  direction: rtl;
  opacity: .75;
}

/* ── Colonne controlli — stile comune ── */
.header-col-ctrl {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.ctrl-sep {
  width: 1px;
  height: 24px;
  background: rgba(30,58,95,.15);
  flex-shrink: 0;
}
.ctrl-label {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  margin-right: 2px;
}

/* Pulsanti toggle (Ebraico / Tr / Note / Affiancato / Segnalibro) */
.ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 11px;
  border: 1.5px solid rgba(30,58,95,.22);
  border-radius: 20px;
  background: transparent;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  font-family: 'Open Sans', sans-serif;
  white-space: nowrap;
  line-height: 1;
}
.ctrl-btn:hover        { background: var(--navy); color: white; border-color: var(--navy); }
.ctrl-btn.active       { background: var(--navy); color: white; border-color: var(--navy); }


/* ── Colonna ultima: torna al sito ── */
.header-back-link {
  font-size: 0.78rem;
  color: var(--navy);
  text-decoration: none;
  opacity: .6;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border: 1.5px solid rgba(30,58,95,.2);
  border-radius: 20px;
  transition: all .2s;
  flex-shrink: 0;
  margin-left: auto;  /* spinge a destra */
}
.header-back-link:hover { opacity: 1; background: var(--beige); color: var(--navy); }
.header-back-link svg   { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; }
.header-back-link .back-label { /* nascosto su mobile piccolo via media query */ }

/* ─────────────────────────────────────────────
   SECTION NAVIGATION (seder steps)
   ───────────────────────────────────────────── */
#sederNav {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-top: 1px solid rgba(255,255,255,.1);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#sederNav::-webkit-scrollbar { display: none; }

.seder-nav-menu {
  display: flex;
  list-style: none;
  padding: 0 16px;
  gap: 0;
  min-width: max-content;
}

.seder-nav-menu li a {
  display: block;
  color: rgba(245,241,232,.8);
  text-decoration: none;
  padding: 11px 13px;
  font-size: 0.8rem;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: all .2s;
  white-space: nowrap;
}

.seder-nav-menu li a:hover,
.seder-nav-menu li a.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* controlsBar merged into header */

/* ─────────────────────────────────────────────
   KKL BANNER (compact)
   ───────────────────────────────────────────── */
.kkl-banner {
  background: white;
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  padding: 14px 18px;
  margin: 16px 0 12px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.kkl-banner-logo {
  height: 56px;
  width: auto;
  flex-shrink: 0;
  opacity: .9;
}
.kkl-banner-text {
  font-size: 0.8rem;
  line-height: 1.65;
  color: #555;
}
.kkl-banner-text strong {
  font-size: 0.85rem;
  color: var(--navy);
  display: block;
  margin-bottom: 4px;
}
.kkl-banner-text a { color: var(--navy); text-decoration: underline; }

/* ─────────────────────────────────────────────
   CREDITS + LICENSE + PDF LINKS
   ───────────────────────────────────────────── */
.credits-bar {
  font-size: 0.82rem;
  color: #666;
  margin: 10px 0;
  padding: 10px 14px;
  background: rgba(30,58,95,.04);
  border-radius: 6px;
  line-height: 1.7;
}
.license-note {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  margin: 6px 0;
  font-style: italic;
}

/* ─────────────────────────────────────────────
   RESUME BANNER
   ───────────────────────────────────────────── */
#resumeBanner {
  display: none;
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  z-index: 300;
  font-size: 0.88rem;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
#resumeBanner.show { display: flex; }
.res-btn-yes {
  background: var(--gold);
  color: var(--navy);
  border: none;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.82rem;
  font-family: inherit;
}
.res-btn-no {
  background: transparent;
  color: rgba(255,255,255,.65);
  border: 1px solid rgba(255,255,255,.3);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.82rem;
  font-family: inherit;
}

/* ─────────────────────────────────────────────
   BACK TO TOP
   ───────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all .3s;
  z-index: 299;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { background: var(--gold); }
.back-to-top svg {
  width: 22px; height: 22px;
  stroke: currentColor; stroke-width: 2.5; fill: none;
}

/* ─────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .header-top { padding: 7px 14px; }
  .site-logo  { height: 42px; }
  .header-page-title { font-size: 1.1rem; }
  .header-hebrew { display: none; }
  .header-back-link span { display: none; }
  .haggadah-content { width: 95%; max-width: 95%; padding: 16px 0 80px; }
  .kkl-banner { flex-direction: column; gap: 10px; }
  .kkl-banner-logo { height: 40px; }
}

@media (max-width: 480px) {
  .ctrl-label { display: none; }
  .ctrl-btn   { padding: 4px 7px; font-size: 0.72rem; }

}

/* ─────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────── */
footer {
  background: var(--navy);
  color: rgba(245,241,232,.75);
  margin-top: 40px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  max-width: 90%;
  margin: 0 auto;
  padding: 32px 0 24px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  text-align: center;
  padding: 14px;
  font-size: 0.75rem;
  color: rgba(245,241,232,.45);
}

.footer-bottom a { color: var(--gold); }
.footer-bottom img { vertical-align: middle; margin-left: 4px; }

/* ── footer-content: testo bianco ── */
.footer-content { color: rgba(245,241,232,.75); }
.footer-content h1,
.footer-content h2,
.footer-content h3 { color: rgba(245,241,232,.92); }
.footer-content p   { color: rgba(245,241,232,.72); }
.footer-content a   { color: var(--gold-light); }
.footer-content a:hover { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════
   SCHEMA DI TRASLITTERAZIONE  (.sch-*)
   Classi per l'inclusione dello schema nella pagina credits.
   ══════════════════════════════════════════════════════════ */

/* ── Sezione contenitore ── */
.sch-section {
  margin-bottom: 2.8rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .65s ease, transform .65s ease;
}
.sch-section.visible { opacity: 1; transform: translateY(0); }

.sch-section-header {
  display: flex;
  align-items: baseline;
  gap: .9rem;
  margin-bottom: 1.2rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
.sch-section-number {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: .68rem;
  letter-spacing: .22em;
  color: var(--gold);
  flex-shrink: 0;
  font-variant: small-caps;
}
.sch-section-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
  border: none;
  margin: 0;
  padding: 0;
  text-align: left;
}

/* ── Sub-heading ── */
.sch-sub-heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: .75rem;
  letter-spacing: .22em;
  color: var(--gold);
  text-transform: uppercase;
  font-variant: small-caps;
  margin: 2rem 0 .9rem;
  display: flex;
  align-items: center;
  gap: .7rem;
}
.sch-sub-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}

/* ── Tabelle ── */
.sch-tbl-wrap { overflow-x: auto; margin: 0 0 1.4rem; }

.sch-tbl-wrap table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.sch-tbl-wrap thead tr { background: var(--navy); color: var(--beige); }
.sch-tbl-wrap thead th {
  padding: .7rem 1rem;
  text-align: left;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-variant: small-caps;
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .16em;
}
.sch-tbl-wrap tbody tr { border-bottom: 1px solid var(--border); }
.sch-tbl-wrap tbody tr:nth-child(even) { background: rgba(212,175,55,.04); }
.sch-tbl-wrap tbody tr:hover          { background: rgba(212,175,55,.09); transition: background .15s; }
.sch-tbl-wrap td {
  padding: .65rem 1rem;
  vertical-align: middle;
  color: var(--text-mid);
  line-height: 1.5;
}

/* ── Celle speciali ── */
.sch-heb {
  font-size: 1.3rem;
  direction: rtl;
  font-family: 'Rubik', Verdana, sans-serif;
  color: var(--navy);
  letter-spacing: .04em;
  line-height: 1.8;
}
.sch-heb-sm {
  font-size: 1.1rem;
  direction: rtl;
  display: inline-block;
  font-family: 'Rubik', Verdana, sans-serif;
  color: var(--navy);
  margin-right: 2px;
}
.sch-trasl {
  font-family: 'Courier New', monospace;
  font-size: .82rem;
  background: var(--gold-pale);
  border: 1px solid rgba(212,175,55,.3);
  padding: .1rem .4rem;
  border-radius: 3px;
  color: var(--navy);
  letter-spacing: .02em;
}
.sch-note-cell {
  color: var(--muted);
  font-style: italic;
  font-size: .85rem;
}

/* ── Rule cards ── */
.sch-rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1rem;
  margin: .6rem 0 1.5rem;
}
.sch-rule-card {
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  background: white;
  padding: 1rem 1.2rem;
  font-size: .9rem;
  color: var(--text-mid);
  line-height: 1.65;
}
.sch-rule-card strong {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: .4rem;
}
.sch-rule-example {
  margin-top: .7rem;
  padding: .5rem .8rem;
  background: var(--gold-pale);
  border: 1px solid rgba(212,175,55,.25);
  font-size: .85rem;
  color: var(--text-mid);
  line-height: 1.8;
}

/* ── Nota box ── */
.sch-nota {
  background: var(--gold-pale);
  border: 1px solid rgba(212,175,55,.4);
  border-left: 4px solid var(--gold);
  padding: 1.1rem 1.5rem;
  margin: 1.5rem 0 0;
  font-size: .92rem;
  color: var(--text-mid);
  font-style: italic;
  line-height: 1.75;
}
.sch-nota-label {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-variant: small-caps;
  font-size: .68rem;
  letter-spacing: .22em;
  color: var(--gold);
  margin-bottom: .45rem;
  display: block;
  font-style: normal;
}

@media (max-width: 640px) {
  .sch-rule-grid { grid-template-columns: 1fr; }
  .sch-tbl-wrap thead th { font-size: .65rem; padding: .55rem .7rem; }
  .sch-tbl-wrap td { padding: .5rem .7rem; }
}
