:root {
  --earth-brown: #6b4a35;
  --deep-sea-blue: #1b3a4b;
  --antique-gold: #b8934a;
  --parchment: #f4ecdc;
  --ink: #2a2118;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: "Frank Ruhl Libre", "David Libre", Georgia, serif;
  line-height: 1.7;
}

.masthead {
  background: var(--deep-sea-blue);
  color: var(--parchment);
  padding: 3rem 1.5rem;
  text-align: center;
  border-bottom: 4px solid var(--antique-gold);
}
.masthead .portrait {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--antique-gold);
  margin-bottom: 1rem;
}
.about-link {
  display: inline-block;
  margin-top: 1rem;
  margin-inline-end: 0.6rem;
  color: var(--parchment);
  border: 1px solid var(--antique-gold);
  padding: 0.4rem 1rem;
  text-decoration: none;
  font-size: 0.9rem;
}
.about-link:hover { background: var(--antique-gold); color: var(--deep-sea-blue); }

.about-page .portrait-full {
  display: block;
  max-width: 320px;
  margin: 0 auto 2rem;
  border: 4px solid var(--antique-gold);
}
.about-page h2 { color: var(--earth-brown); margin-top: 2rem; }
.about-page .signature {
  font-style: italic;
  text-align: center;
  margin-top: 2.5rem;
  color: var(--deep-sea-blue);
}

.license-box {
  margin-top: 3rem;
  padding: 2rem 2.2rem;
  background: linear-gradient(135deg, #f4ecdc 0%, #ece1c8 100%);
  border: 1px solid var(--antique-gold);
  border-top: 3px solid var(--antique-gold);
  border-bottom: 3px solid var(--antique-gold);
  position: relative;
}
.license-box::before,
.license-box::after {
  content: "❖";
  display: block;
  text-align: center;
  color: var(--antique-gold);
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}
.license-box::after {
  margin-bottom: 0;
  margin-top: 0.8rem;
}
.license-box p {
  font-family: "David Libre", "Frank Ruhl Libre", Georgia, serif;
  font-style: italic;
  font-size: 0.98rem;
  line-height: 1.85;
  color: var(--ink);
  text-align: center;
  margin: 0;
}
.license-email {
  margin-top: 1rem !important;
  font-style: normal !important;
}
.license-email a {
  color: var(--earth-brown);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dotted var(--earth-brown);
}
.license-email a:hover {
  color: var(--deep-sea-blue);
  border-bottom-color: var(--deep-sea-blue);
}

.license-box-standalone {
  margin-top: 3rem;
}
.license-box-standalone p {
  font-size: 1.05rem;
}

.creator-bio {
  margin-top: 2rem;
  text-align: center;
}
.creator-bio p {
  font-family: "David Libre", "Frank Ruhl Libre", Georgia, serif;
  font-size: 0.92rem;
  color: #8a7a65;
  font-style: normal;
}
.creator-bio strong {
  color: var(--earth-brown);
  font-weight: 600;
}

.masthead.small { padding: 1.5rem; text-align: right; }

.letters-intro {
  color: #6a5a45;
  margin-bottom: 1.5rem;
}
.letter-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: white;
  border: 1px solid #d8c8a8;
  padding: 1.25rem;
}
.letter-form input,
.letter-form textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid #c9b98f;
  background: var(--parchment);
  color: var(--ink);
  resize: vertical;
}
.letter-form button {
  align-self: flex-start;
  background: var(--deep-sea-blue);
  color: var(--parchment);
  border: 1px solid var(--antique-gold);
  padding: 0.6rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
}
.letter-form button:hover { background: var(--earth-brown); }
.letter-status {
  margin: 0;
  font-size: 0.9rem;
  color: var(--earth-brown);
}

.letter-item {
  background: white;
  border: 1px solid #d8c8a8;
  border-right: 4px solid var(--antique-gold);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.letter-from {
  font-weight: bold;
  color: var(--deep-sea-blue);
  margin: 0 0 0.5rem;
}
.letter-question {
  font-style: italic;
  color: #6a5a45;
  border-right: 2px solid #c9b98f;
  padding-right: 0.8rem;
  margin: 0 0 1rem;
}
.letter-reply {
  margin: 0 0 0.5rem;
}
.letter-signature {
  text-align: left;
  font-style: italic;
  color: var(--earth-brown);
  margin: 0;
}
.masthead h1 { font-size: 2.5rem; margin: 0 0 0.3rem; letter-spacing: 0.05em; }
.masthead .subtitle { color: var(--antique-gold); margin: 0 0 1rem; }
.masthead .tagline { font-style: italic; opacity: 0.85; max-width: 40em; margin: 0 auto; }
.back-link { color: var(--antique-gold); text-decoration: none; }

.articles-grid {
  max-width: 900px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
  display: grid;
  gap: 1.25rem;
}

.article-card {
  display: block;
  background: white;
  border: 1px solid #d8c8a8;
  border-right: 5px solid var(--earth-brown);
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s;
}
.article-card:hover { transform: translateX(-4px); }
.article-card h2 { margin: 0 0 0.4rem; color: var(--deep-sea-blue); }
.article-card .meta { margin: 0; font-size: 0.9rem; color: #7a6a55; }

.loading { text-align: center; padding: 3rem; color: #8a7a65; }

.article-body {
  max-width: 700px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.chapter {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px dashed #c9b98f;
}
.chapter h2 { color: var(--earth-brown); }
.chapter-body h3 {
  color: var(--deep-sea-blue);
  font-size: 1.3rem;
  margin-top: 2rem;
  border-bottom: 2px solid var(--antique-gold);
  padding-bottom: 0.3rem;
}
.chapter-body h4 {
  color: var(--earth-brown);
  font-size: 1.05rem;
  font-style: italic;
  margin-top: 1.5rem;
}
.chapter-body hr {
  border: none;
  border-top: 1px dashed #c9b98f;
  margin: 1.5rem 0;
}
.chapter-body p { margin: 0 0 1.2rem; }

.inline-illustration {
  width: 340px;
  max-width: 48%;
  height: auto;
  border: 3px solid var(--antique-gold);
  background: white;
  padding: 5px;
  box-shadow: 2px 3px 8px rgba(0,0,0,0.15);
  cursor: zoom-in;
  transition: transform 0.15s;
}
.inline-illustration:hover {
  transform: scale(1.02);
}
.inline-illustration.float-start {
  float: right;
  margin: 0.3rem 0 1.2rem 1.5rem;
}
.inline-illustration.float-end {
  float: left;
  margin: 0.3rem 1.5rem 1.2rem 0;
}

.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 10, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 2rem;
}
.lightbox-overlay.open {
  display: flex;
}
.lightbox-img {
  max-width: 92vw;
  max-height: 92vh;
  border: 4px solid var(--antique-gold);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
/* מנקה את הציפה כדי שקופסת המקורות לא "תיתקע" לצד תמונה */
.chapter-body::after {
  content: "";
  display: table;
  clear: both;
}

.sources-box {
  background: #ece1c8;
  border-right: 3px solid var(--antique-gold);
  padding: 0.75rem 1rem;
  margin-top: 1.5rem;
  font-size: 0.9rem;
}
.sources-box h3 { margin: 0 0 0.4rem; font-size: 0.95rem; color: var(--deep-sea-blue); }
.sources-box ul { margin: 0; padding-inline-start: 1.2rem; }

.modern-map {
  margin: 0 0 1.5rem;
  border: 3px solid var(--antique-gold);
  background: white;
  padding: 6px;
}
.modern-map iframe {
  width: 100%;
  height: 280px;
  border: none;
  display: block;
}
.map-caption {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  color: #8a7a65;
  text-align: center;
  font-style: italic;
}

.historical-maps-box {
  background: #f4ecdc;
  border: 1px dashed var(--antique-gold);
  padding: 0.75rem 1rem;
  margin-top: 1.5rem;
  font-size: 0.9rem;
}
.historical-maps-box h3 { margin: 0 0 0.4rem; font-size: 0.95rem; color: var(--earth-brown); }
.historical-maps-box ul { margin: 0; padding-inline-start: 1.2rem; }
.historical-maps-box a { color: var(--deep-sea-blue); }

footer {
  max-width: 700px;
  margin: 3rem auto 2rem;
  padding: 0 1.5rem;
  font-size: 0.85rem;
  color: #8a7a65;
  text-align: center;
}
