/* ============================================
   מוזסון בלוג – main.css
   ============================================ */

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* VARIABLES */
:root {
  --bg: #FAFAF8;
  --text: #1C1C1A;
  --muted: #888884;
  --accent: #2D5FA6;
  --border: #E4E4E0;
  --max: 700px;
}

/* BASE */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Assistant', sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

/* HEADER */
header {
  border-bottom: 2px solid var(--text);
  padding: 2rem 1.5rem 1.25rem;
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.site-name {
  font-family: 'David Libre', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.site-desc {
  font-size: 0.82rem;
  color: var(--muted);
}

/* NAV */
nav {
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 1.5rem;
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  gap: 1.5rem;
}
nav a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
nav a:hover, nav a.active { color: var(--text); }

/* MAIN WRAPPER */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* SECTION LABEL */
.section-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

/* FEATURED POST */
.featured {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.featured-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.featured-title {
  font-family: 'David Libre', serif;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  text-decoration: none;
  display: block;
  margin-bottom: 0.75rem;
}
.featured-title:hover { color: var(--accent); }
.featured-excerpt {
  font-size: 1rem;
  color: #444440;
  line-height: 1.65;
  max-width: 58ch;
  margin-bottom: 1rem;
}
.featured-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

/* POST LIST */
.post-list { display: flex; flex-direction: column; }
.post-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 0 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}
.post-item:first-child { border-top: 1px solid var(--border); }
.post-item:hover .post-title { color: var(--accent); }
.post-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-top: 2px;
  gap: 6px;
}
.post-date { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.post-cat {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  background: #EBF1FB;
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
}
.post-title {
  font-family: 'David Libre', serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.3rem;
  transition: color 0.15s;
}
.post-excerpt {
  font-size: 0.85rem;
  color: #666662;
  line-height: 1.55;
  max-width: 52ch;
}

/* SINGLE POST */
.post-header { margin-bottom: 2rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.post-header h1 {
  font-family: 'David Libre', serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0.5rem 0 0.75rem;
}
.post-meta { font-size: 0.78rem; color: var(--muted); }
.post-content { font-size: 1rem; line-height: 1.75; max-width: 62ch; }
.post-content h2 { font-family: 'David Libre', serif; font-size: 1.35rem; margin: 2rem 0 0.75rem; }
.post-content h3 { font-size: 1.05rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }
.post-content p  { margin-bottom: 1.1rem; }
.post-content ul, .post-content ol { padding-right: 1.5rem; margin-bottom: 1.1rem; }
.post-content li { margin-bottom: 0.4rem; }
.post-content code {
  background: #F0EFE9;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.875em;
  font-family: monospace;
}
.post-content pre {
  background: #1C1C1A;
  color: #E8E8E4;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.6;
}
.post-content pre code { background: none; padding: 0; color: inherit; }
.post-content a { color: var(--accent); }

/* CATEGORY PAGE */
.category-title {
  font-family: 'David Libre', serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--text);
}

/* ABOUT PAGE */
.about-page h1 {
  font-family: 'David Libre', serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.about-page p { font-size: 1rem; line-height: 1.75; max-width: 58ch; margin-bottom: 1rem; color: #444440; }

/* SUBSCRIBE STRIP */
.subscribe-strip {
  margin-top: 3rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-right: 3px solid var(--accent);
  background: #F5F7FB;
  border-radius: 0 4px 4px 0;
}
.subscribe-strip h3 {
  font-family: 'David Libre', serif;
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}
.subscribe-strip p { font-size: 0.83rem; color: var(--muted); margin-bottom: 1rem; }
.sub-row { display: flex; gap: 8px; flex-wrap: wrap; }
.sub-row input {
  flex: 1;
  min-width: 180px;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.875rem;
  font-family: 'Assistant', sans-serif;
  background: #fff;
  color: var(--text);
  outline: none;
  text-align: right;
}
.sub-row input:focus { border-color: var(--accent); }
.sub-row button {
  padding: 0.55rem 1.2rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: 'Assistant', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.sub-row button:hover { background: #1e4a8a; }
.sub-row button:disabled { opacity: 0.5; cursor: not-allowed; }
.sub-msg { font-size: 0.78rem; margin-top: 0.5rem; min-height: 1rem; }
.sub-msg.ok  { color: #2a7a4e; }
.sub-msg.err { color: #b03030; }

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}
footer a { color: inherit; }

/* RESPONSIVE */
@media (max-width: 520px) {
  .post-item { grid-template-columns: 1fr; }
  .post-side { flex-direction: row; align-items: center; margin-bottom: 4px; }
  .header-inner { flex-direction: column; gap: 0.25rem; }
}
