/* ── RTL / Hebrew global layout ────────────────────────── */
body {
  direction: rtl;
  text-align: right;
  font-family: "Arial", "Helvetica Neue", sans-serif;
}

/* Navbar: title right-aligned, items flow RTL */
.navbar {
  direction: rtl;
}
.navbar-nav {
  flex-direction: row-reverse;
}
.navbar-brand {
  margin-right: 0;
  margin-left: 1rem;
}

/* Table of contents on left side for RTL pages */
#quarto-sidebar, .sidebar {
  direction: rtl;
}

/* Code blocks always LTR */
pre, code, .sourceCode, .cell-output {
  direction: ltr !important;
  text-align: left !important;
  font-family: "Fira Code", "Courier New", monospace;
}

/* English/LTR inline spans */
.ltr {
  direction: ltr;
  display: inline-block;
  unicode-bidi: embed;
}

/* Block-level LTR (citations, references) */
.ltr-block {
  direction: ltr;
  text-align: left;
  unicode-bidi: embed;
}

/* Blockquotes used for citations — keep LTR */
blockquote {
  direction: ltr;
  text-align: left;
  border-right: none;
  border-left: 4px solid #dee2e6;
  padding-left: 1rem;
  padding-right: 0;
  margin-right: 0;
}

/* Tables: RTL header and cells */
table {
  direction: rtl;
}
th, td {
  text-align: right;
}

/* Callout boxes */
.callout {
  direction: rtl;
  text-align: right;
}

/* Hero banner on home page */
.hero-banner {
  text-align: center;
  direction: rtl;
  padding: 3rem 1rem;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: white;
  border-radius: 8px;
  margin-bottom: 2rem;
}

/* Schedule table links */
.schedule-table a {
  text-decoration: none;
  color: #0f3460;
  font-weight: 500;
}
.schedule-table a:hover {
  text-decoration: underline;
}

/* Footer / author credit */
.author-credit {
  text-align: center;
  color: #666;
  font-size: 0.85rem;
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #dee2e6;
}

/* ── Reveal.js slide-specific RTL rules ─────────────────── */

/* All slide content: RTL + right-aligned */
.reveal .slides section,
.reveal .slides section > * {
  direction: rtl;
  text-align: right;
  unicode-bidi: embed;
}

/* Headings */
.reveal .slides h1,
.reveal .slides h2,
.reveal .slides h3,
.reveal .slides h4 {
  direction: rtl;
  text-align: right;
}

/* Paragraphs and lists */
.reveal .slides p,
.reveal .slides li,
.reveal .slides ul,
.reveal .slides ol {
  direction: rtl;
  text-align: right;
}

/* Bullet lists: hang on the right */
.reveal .slides ul,
.reveal .slides ol {
  padding-right: 1.5em;
  padding-left: 0;
}

/* Tables inside slides */
.reveal .slides table th,
.reveal .slides table td {
  text-align: right;
  direction: rtl;
}

/* Code blocks inside slides: always LTR */
.reveal .slides pre,
.reveal .slides code,
.reveal .slides .sourceCode {
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: isolate;
}

/* Blockquotes in slides: LTR (citations) */
.reveal .slides blockquote {
  direction: ltr;
  text-align: left;
  border-left: 4px solid rgba(255,255,255,0.4);
  border-right: none;
  padding-left: 1rem;
  padding-right: 0;
  margin-left: 0;
}

/* Callout / alert boxes in slides */
.reveal .slides .callout {
  direction: rtl;
  text-align: right;
}

/* Fragment animations: preserve direction */
.reveal .slides .fragment {
  direction: rtl;
  text-align: right;
}

/* Incremental lists */
.reveal .slides .incremental li {
  direction: rtl;
  text-align: right;
}

/* Figure captions */
.reveal .slides figcaption {
  direction: rtl;
  text-align: right;
}

/* ltr-block inside slides (reference citations) */
.reveal .slides .ltr-block {
  direction: ltr;
  text-align: left;
  unicode-bidi: embed;
}
