@font-face {
  font-family: "RoobertHebrewMono";
  src: url("RoobertHebrewBETA-SemiMonoRegular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "RoobertHebrewRealMono";
  src: url("RoobertHebrewBETA-MonoRegular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}


@font-face {
  font-family: "RoobertHebrewMonoBold";
  src: url("RoobertHebrewBETA-SemiMonoBold.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "greta";
  src: url("GretaTextH+L-Bold.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

:root {
  --soft-grey: #f0f0f0;
}

body {
  direction: rtl;
  font-family: "RoobertHebrewMono", sans-serif;
  background: #d8d8d8;
  color: #333;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  font-size: 16px;
  counter-reset: lesson-block;
  transition: background-color 0.25s;
}

body.is-css-section {
  background-color: #282828;
}
.scroll-topic-indicator {
  position: fixed;
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  padding: 6px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.red {
  color: #ff4d4d;
}

.scroll-topic-button {
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  background: transparent;
  font-family: "RoobertHebrewMonoBold";
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #282828;
  opacity: 0.4;
  cursor: pointer;
  transition: opacity 0.2s, background-color 0.2s, color 0.2s;
}

.scroll-topic-button.is-active {
  opacity: 1;
  background-color: #282828;
  color: #ffffff;
}

p:not(.highlight) , li:not(.highlight) {
  margin-block-start: 6px !important;
  margin-block-end: 6px !important;
}

strong {
  font-family: "RoobertHebrewMonoBold";
  font-weight: normal;
}

.css-examples li {
  margin-top: 60px !important;
  padding-top: 60px !important;
  border-top: 1px solid rgb(225, 225, 225);
}

ul {
  padding-inline-start: 24px;
  list-style-type: disc;
}

section {
  padding: 20px;
  background-color: white;
  width: calc(100% - 60px);
  max-width: 800px;
  margin: 6rem auto;
  border-radius: 8px;
  border-top-right-radius: 0px;
  position: relative;
}

section:not(.title-section) {
  counter-increment: lesson-block;
}

section:not(.title-section)::before {
  content: "" counter(lesson-block);
  position: absolute;
  top: 0px;
  right: -32px;
  height: 32px;
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top-left-radius: 0px;
  border-top-right-radius: 4px;
  border-bottom-left-radius: 0px;
  border-bottom-right-radius: 4px;
  background-color: #ffffff ;
  color: #282828;
  font-family: "RoobertHebrewMonoBold";
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.title-section {
  background-color: #28282800;
}
h1 {
  font-size: 60px;
  line-height: 1.2;
  font-family: "RoobertHebrewMonoBold";
  margin: 80px 0 20px 0;
}
h2 {
  color: #282828;
  font-size: 24px;
  font-family: "RoobertHebrewMonoBold";
}
pre {
  background: #282828;
  color: #a6ff80;
  padding: 1rem;
  overflow-x: auto;
  border-radius: 4px;
  text-align: left;
  direction: ltr;
  transition: all 0.25s;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}
th,
td {
  border: 1px solid #e1e1e1;
  padding: 0.5rem 1rem;
  text-align: center;
}

.position th,
td {
  text-align: right;
}

th {
  font-family: "RoobertHebrewMonoBold";
}

code {
  /* font-size: 17px; */
  direction: ltr;
  text-align: left;
  padding: 2px 6px;
  border-radius: 4px;
  background-color: var(--soft-grey);
}

pre code {
  padding: 0px;
  background-color: rgba(0, 0, 0, 0) !important;
  font-family: 'RoobertHebrewRealMono' !important;
}

pre code.hljs {
  background: transparent;
}

/* pre code::before {
  content: "  ";
} */

.result {
  margin-bottom: 10px;
  padding: 1rem;
  border-radius: 4px;
  /* border: 1px solid rgb(233 233 233); */
}


.highlight {
  font-family: "RoobertHebrewMonoBold";
  color: rgb(0, 0, 0);
  padding: 16px;
  line-height: 1.5;
  background-color: var(--soft-grey);
  border-radius: 4px;
  margin-top: 40px;
  margin-bottom: 0px !important;
}

.tags-example li {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 16px 0;
  border-bottom: 1px solid rgb(225, 225, 225);
}

.tags-example li:first-child {
  padding-top: 0;
}

.tags-example li:last-child {
  border-bottom: 0px solid black;
}

.tags-example li code {
  display: inline;
  
  width: 40%;
  min-width: 40%;
}

.tags-example ul {
  padding: 0;
}

.tags-example span,
.right {
  direction: rtl;
}

a {
  color: rgb(0, 81, 255);
}

img {
  width: 100%;
}

.flex-container {
  display: flex;
  gap: 1rem;
  justify-content: center;
  padding: 80px 20px;
  background-color: var(--soft-grey);
}

.flex-container.not-flex {
  flex-direction: column;
}

.flex-item {
  background-color: white;
  padding: 20px 30px;
  border-radius: 6px;
  font-weight: bold;
  text-align: center;
}

.result button {
  transition: background-color 0.3s, color 0.3s;
  cursor: pointer;
}

.square {
  width: 100px;
  height: 100px;
  background-color: rgb(175, 255, 63);
}

.black-bg {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  
  pointer-events: none;
  background-color: #f0f0f0;
  opacity: 0;
  transition: opacity 0.25s ;
}


body.show-black-bg .black-bg {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}



.example {
  cursor: pointer;
  position: relative;
}

/* .example:not(:last-child) {
  margin-bottom: 120px;
} */

.example.exclude {
  z-index: 3;
  
}


.example p {
  opacity: 1;
  transition: opacity 0.25s;
}

.example.exclude p {
  opacity: 0;
}

@media (hover: hover) {
  .result button:hover {
    background-color: rgb(91, 3, 255) !important;
    color: white;
  }
  a:hover {
    color: black;
  }
}

@media (max-width: 640px) {
  .scroll-topic-indicator {
    right: 12px;
    padding: 4px;
    gap: 4px;
  }

  .scroll-topic-button {
    font-size: 11px;
    padding: 6px 10px;
  }

  h1 {
    margin: 0;
    font-size: 40px;
    line-height: 1.2;
  }
}

.optional {
  font-size: 0.6em;
  font-weight: normal;
  opacity: 0.5;
}

.smaller {
  font-size: 0.8em;
  font-weight: normal;
  opacity: 0.7;
}

/* ═══════════════════════════════════════════ */
/*  AI CLASS (03) — New Components             */
/* ═══════════════════════════════════════════ */

/* Comparison cards (side by side) */
.comparison-cards {
  display: flex;
  gap: 16px;
  margin: 16px 0;
}

.comparison-card {
  flex: 1;
  padding: 16px;
  background: #282c34;
  border-radius: 8px;
  color: #e0e0e0;
}

.comparison-card h4 {
  margin-top: 0;
  color: #61afef;
  font-family: "RoobertHebrewMonoBold";
}

.comparison-card.ml h4 {
  color: #98c379;
}

.comparison-card p {
  color: #ccc !important;
}

/* Concept cards summary */
.concepts-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.concept-card {
  padding: 16px;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  background: #fafafa;
}

.concept-card strong {
  font-family: "RoobertHebrewMonoBold";
  display: block;
  margin-bottom: 4px;
}

.concept-card p {
  margin: 0 !important;
}

/* Modality grid */
.modality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.modality-card {
  padding: 14px;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  background: #fafafa;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.modality-card:hover {
  border-color: #282828;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.modality-card strong {
  font-family: "RoobertHebrewMonoBold";
  display: block;
  margin-bottom: 4px;
}

.modality-card p {
  margin: 0 !important;
  font-size: 14px;
  opacity: 0.8;
}

/* Model I/O Diagram */
.model-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 40px 20px;
  background: var(--soft-grey);
  border-radius: 8px;
  margin: 20px 0;
}

.diagram-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.diagram-label {
  font-family: "RoobertHebrewMonoBold";
  font-size: 14px;
  margin-bottom: 8px;
  color: #666;
}

.diagram-tag {
  padding: 8px 18px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
}

.diagram-center {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.diagram-model {
  padding: 24px 30px;
  background: #282828;
  color: white;
  border-radius: 12px;
  font-family: "RoobertHebrewMonoBold";
  font-size: 18px;
  text-align: center;
  line-height: 1.4;
}

.diagram-arrow {
  font-size: 28px;
  color: #888;
  line-height: 1;
}

/* Tool links row (enhanced) */
.tool-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.tool-links a {
  padding: 8px 18px;
  border: 1px solid #282828;
  border-radius: 20px;
  text-decoration: none;
  font-family: "RoobertHebrewMonoBold";
  font-size: 14px;
  color: #282828;
  transition: background-color 0.2s, color 0.2s;
}

@media (hover: hover) {
  .tool-links a:hover {
    background: #282828;
    color: white;
  }
}

/* Exercise cards */
.exercise-card {
  padding: 20px;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  margin-bottom: 14px;
  border-right: 4px solid #282828;
}

.exercise-card h3 {
  margin-top: 0;
  font-family: "RoobertHebrewMonoBold";
}

.exercise-card.challenge {
  border-right-color: #ff4d4d;
  background: #fff8f8;
}

/* Coding section dark background */
body.is-coding-section {
  background-color: #282828;
}

/* Responsive — AI class */
@media (max-width: 640px) {
  .comparison-cards {
    flex-direction: column;
  }

  .model-diagram {
    flex-direction: column;
    padding: 24px 12px;
  }

  .diagram-arrow {
    transform: rotate(90deg);
  }

  .modality-grid {
    grid-template-columns: 1fr;
  }
}
