:root {
  --bg: #f7f4ef;
  --card: #ffffff;
  --text: #1f1f1f;
  --muted: #5c5c5c;
  --accent: #8b2f2f;
  --accent-soft: #f0dede;
  --border: #e5ddd2;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--border);
  background: #fffaf4;
  padding: 18px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.brand img {
  width: 44px;
  height: 44px;
}

.brand h1 {
  margin: 0;
  font-size: 1.2rem;
}

.nav-title {
  margin: 14px 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.page-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-links li {
  margin-bottom: 8px;
}

.page-links a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}

.page-links a:hover,
.page-links a.active {
  background: var(--accent-soft);
  color: #4a1212;
}

.controls {
  margin-top: 18px;
  display: grid;
  gap: 8px;
}

.lang-toggle {
  display: flex;
  gap: 6px;
}

.lang-toggle button {
  flex: 1;
  border: 1px solid var(--border);
  background: white;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 700;
}

.lang-toggle button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.home-link {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 700;
}

.content {
  padding: 30px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  max-width: 980px;
}

.home-hero {
  display: flex;
  justify-content: center;
  margin: 10px 0 18px;
}

.home-hero img {
  width: 100%;
  max-width: 820px;
  height: auto;
  border-radius: 12px;
}

.home-welcome {
  margin: 6px auto 14px;
  max-width: 820px;
  text-align: center;
}

.home-welcome h3 {
  margin: 0 0 10px;
  font-size: 1.6rem;
  color: #4a1212;
}

.home-welcome p {
  margin: 0;
  font-size: 1.05rem;
}

h2 {
  margin-top: 0;
  font-size: 1.8rem;
}

p {
  line-height: 1.55;
}

.placeholder {
  border: 1px dashed #cab7a4;
  background: #fffaf4;
  border-radius: 10px;
  padding: 12px;
}

.lang-he {
  display: none !important;
}

.lang-en,
.lang-content:not(.lang-he) {
  display: block;
}

/* When Hebrew is selected, show Hebrew copy and hide English (paired blocks). */
html[lang-choice="he"] .lang-en {
  display: none !important;
}

html[lang-choice="he"] .lang-he {
  display: block !important;
}

/* Keep the same grid as English: sidebar | main (full remaining width).
   Do not set direction on `body` — that reverses the grid and shrinks the
   main area visually. RTL only where text should read Hebrew. */
html[lang-choice="he"] .sidebar {
  direction: rtl;
}

html[lang-choice="he"] .content {
  direction: rtl;
}

html[lang-choice="he"] .card {
  max-width: none;
}

.footer-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

}
