/* Masoretes WP theme — design system from masoretes.online
   Navy #1E3A5F · Sky #0284C8 · Gold #D4AF37 · Rose #C4719A
   Lora + Noto Sans Hebrew · sticky sidebar · SQUARE post thumbs */

:root {
  --sidebar-width: 270px;
  --blue-primary: #1e3a5f;
  --blue-bright: #0284c8;
  --blue-soft: #38bdf8;
  --blue-border: #bae6fd;
  --blue-pale: #e0f2fe;
  --blue-mist: #f0f9ff;
  --blue-ghost: #f8fafc;
  --gold: #d4af37;
  --gold-dark: #b8860b;
  --gold-deep: #c5a028;
  --gold-light: #f9f1d8;
  --gold-pale: #fef3c7;
  --gold-wash: rgba(212, 175, 55, 0.08);
  --magenta: #c4719a;
  --magenta-soft: #e4a8c4;
  --magenta-pale: #fce7f3;
  --magenta-border: #f5d5e8;
  --magenta-wash: rgba(196, 113, 154, 0.06);
  --magenta-glow: rgba(196, 113, 154, 0.11);
  --ink: #1e293b;
  --muted: #475569;
  --subtle: #64748b;
  --bg-body: #ffffff;
  --bg-card: #ffffff;
  --bg-soft: var(--blue-mist);
  --bg-mute: var(--blue-ghost);
  --text-main: var(--ink);
  --text-head: var(--blue-primary);
  --text-muted: var(--subtle);
  --border-color: var(--blue-border);
  --shadow-color: rgba(30, 58, 95, 0.1);
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 0.45rem;
  --radius-md: 0.65rem;
  --radius-lg: 0.85rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --blue-primary: #93c5fd;
    --blue-bright: #38bdf8;
    --blue-border: #1e3a5f;
    --blue-pale: #172554;
    --blue-mist: #0f172a;
    --blue-ghost: #0b1220;
    --gold: #e8c76b;
    --gold-dark: #f0d78a;
    --gold-deep: #e8c76b;
    --gold-light: rgba(212, 175, 55, 0.15);
    --gold-pale: rgba(212, 175, 55, 0.12);
    --magenta: #e8a8c8;
    --magenta-border: rgba(196, 113, 154, 0.32);
    --magenta-wash: rgba(196, 113, 154, 0.07);
    --ink: #e2e8f0;
    --muted: #94a3b8;
    --subtle: #94a3b8;
    --bg-body: #0b1220;
    --bg-card: #0f172a;
    --bg-soft: #0f172a;
    --bg-mute: #0b1220;
    --text-main: #e2e8f0;
    --text-head: #93c5fd;
    --text-muted: #94a3b8;
    --border-color: #1e3a5f;
    --shadow-color: rgba(0, 0, 0, 0.35);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  margin: 0;
  font-family: "Lora", Georgia, "Times New Roman", serif;
  background: var(--bg-body);
  color: var(--text-main);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 85% 50% at 100% 0%, var(--magenta-wash), transparent 55%),
    radial-gradient(ellipse 65% 40% at 0% 100%, var(--magenta-wash), transparent 50%),
    linear-gradient(rgba(2, 132, 199, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(2, 132, 199, 0.025) 1px, transparent 1px);
  background-size: auto, auto, 20px 20px, 20px 20px;
}

.fas, .far, .fab, .fa-solid, .fa-regular, .fa-brands,
.fa-solid::before, .fa-regular::before, .fa-brands::before {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
}

.hebrew, .hebrew * {
  font-family: "Noto Sans Hebrew", "Times New Roman", serif !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Lora", Georgia, "Times New Roman", serif;
  color: var(--text-head);
  line-height: 1.3;
  margin: 0 0 0.75rem;
  font-weight: 700;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1rem; }
a { color: var(--text-head); transition: color var(--transition-fast); }
a:hover { color: var(--gold-deep); }
img { max-width: 100%; height: auto; }
::selection { background: var(--magenta-pale); color: var(--blue-primary); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.skip-link {
  position: absolute; top: -40px; left: 0; z-index: 100;
  background: var(--blue-primary); color: #fff;
  padding: 0.5rem 1rem; text-decoration: none; font-size: 0.875rem;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { top: 0; }

.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute; width: 1px; word-wrap: normal !important;
}

/* Layout — matches hub site-layout */
.site-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}
.site-sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  padding: 1.1rem 0.9rem 1.5rem; z-index: 40;
  scrollbar-width: thin;
}
.site-main { min-width: 0; display: flex; flex-direction: column; }

.sidebar-brand {
  display: flex; align-items: center; gap: 0.55rem;
  padding-bottom: 0.9rem; margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--magenta-border);
  background: linear-gradient(180deg, var(--magenta-wash) 0%, transparent 88%);
  text-decoration: none; color: inherit;
}
.sidebar-brand img, .sidebar-brand .custom-logo {
  width: 1.85rem; height: 1.85rem; object-fit: contain; border-radius: 0.25rem;
}
.sidebar-brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.85rem; height: 1.85rem; border-radius: 0.35rem;
  background: var(--gold-pale); border: 1px solid var(--gold);
  color: var(--gold-dark); font-weight: 700; flex-shrink: 0;
}
.sidebar-brand-text { font-weight: 700; font-size: 1rem; color: var(--text-head); line-height: 1.2; }
.sidebar-badge {
  display: inline-block; font-size: 0.625rem; letter-spacing: 0.1em;
  padding: 4px 8px; border-radius: 4px; margin-top: 4px;
  background: var(--gold-pale); color: var(--gold-dark);
  border: 1px solid var(--gold); text-transform: uppercase;
}
.sidebar-section { margin-bottom: 1.1rem; }
.sidebar-label {
  font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 700; margin-bottom: 0.45rem;
}
.sidebar-nav, .sidebar-nav ul, .menu {
  display: flex; flex-direction: column; gap: 2px;
  list-style: none; margin: 0; padding: 0;
}
.sidebar-nav a, .sidebar-link {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 0.6rem; border-radius: var(--radius-sm);
  font-size: 0.875rem; color: var(--text-head); text-decoration: none;
  border: 1px solid transparent;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.sidebar-nav a:hover, .sidebar-link:hover { background: var(--gold-wash); color: var(--gold-deep); }
.sidebar-nav .current-menu-item > a,
.sidebar-nav .current_page_item > a,
.sidebar-link.active {
  background: var(--gold-light); color: var(--gold-dark);
  border-color: var(--gold); font-weight: 600;
}
.sidebar-nav a i, .sidebar-link i {
  width: 14px; text-align: center; font-size: 0.75rem; opacity: 0.75;
}
.sidebar-footer {
  margin-top: 1.1rem; padding-top: 0.9rem;
  border-top: 1px solid var(--blue-pale);
  font-size: 0.75rem; color: var(--text-muted);
  display: flex; flex-wrap: wrap; gap: 0.35rem 0.5rem; align-items: center;
}
.sidebar-footer a {
  color: var(--text-head); text-decoration: none;
  border-bottom: 1px dotted var(--border-color);
}
.sidebar-footer a:hover { color: var(--gold-deep); border-bottom-color: var(--gold); }
.sidebar-footer .journal-footer-link { color: var(--gold-deep); font-weight: 600; }
.sidebar-widget { margin-bottom: 1rem; font-size: 0.875rem; }
.sidebar-widget ul { list-style: none; margin: 0.35rem 0 0; padding: 0; }
.sidebar-widget a { text-decoration: none; color: var(--text-head); font-size: 0.8125rem; }

.sidebar-search .search-form { display: flex; gap: 0.35rem; }
.sidebar-search .search-field {
  flex: 1; min-width: 0; border: 1px solid var(--border-color);
  border-radius: var(--radius-sm); padding: 0.4rem 0.55rem;
  font-family: inherit; font-size: 0.8125rem;
  background: var(--bg-body); color: var(--text-main);
}
.sidebar-search .search-submit {
  border: 1px solid var(--blue-primary); background: var(--blue-primary);
  color: #fff; border-radius: var(--radius-sm); padding: 0.4rem 0.65rem;
  font-family: inherit; font-size: 0.75rem; font-weight: 600; cursor: pointer;
}
.sidebar-search .search-submit:hover { background: var(--gold-deep); border-color: var(--gold-deep); }

.sidebar-toggle {
  display: none; position: fixed; top: 0.85rem; left: 0.85rem; z-index: 50;
  width: 2.5rem; height: 2.5rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border-color); background: var(--bg-card);
  color: var(--text-head); box-shadow: 0 4px 14px var(--shadow-color); cursor: pointer;
  align-items: center; justify-content: center;
}
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.45); z-index: 35;
}
.sidebar-overlay.open { display: block; }

.site-main-header {
  padding: 1.75rem 1.75rem 1.35rem;
  border-bottom: 1px solid var(--magenta-border);
  background: linear-gradient(180deg, var(--magenta-wash) 0%, transparent 72%);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 700; color: var(--text-head);
  border: 1px solid var(--gold); background: var(--gold-pale);
  padding: 0.3rem 0.7rem; border-radius: 999px; margin-bottom: 0.75rem;
}
.page-title, .entry-title { font-size: 2rem; margin: 0 0 0.5rem; color: var(--text-head); }
.lede, .archive-description {
  font-size: 1rem; color: var(--text-muted); max-width: 40rem; margin: 0; line-height: 1.6;
}
.site-main-body { padding: 1.5rem 1.75rem 2.5rem; flex: 1 1 auto; }
.site-main-footer {
  margin-top: auto; padding: 1rem 1.75rem 1.35rem;
  border-top: 1px solid var(--blue-pale);
  font-size: 0.75rem; color: var(--text-muted);
}
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 0.5rem 1rem;
}
.footer-nav .menu { flex-direction: row; flex-wrap: wrap; gap: 0.5rem 0.85rem; }
.footer-nav a {
  color: var(--text-head); text-decoration: none; font-weight: 600; margin-right: 0.75rem;
}
.footer-nav a:hover { color: var(--gold-deep); }

.section-heading {
  font-size: 1.15rem; color: var(--text-head); margin: 0 0 1rem;
  padding-left: 0.75rem; border-left: 3px solid var(--gold);
}

/* ===== SQUARE post thumbnail grid ===== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 1rem 1rem;
  align-items: start;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  height: 100%;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}
a.post-card { color: inherit; text-decoration: none; }
.post-card:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 22px -6px var(--shadow-color), 0 0 0 1px var(--magenta-glow);
  transform: translateY(-2px);
}

/* Fixed square frame — same size for every card */
.post-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
  background: var(--bg-mute);
  overflow: hidden;
}
.post-card-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  display: block;
}
.post-card-thumb-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, var(--gold-wash), transparent 50%),
    linear-gradient(225deg, var(--magenta-wash), var(--blue-mist));
  color: var(--gold-deep);
  font-size: 1.75rem;
}

.post-card-body {
  padding: 0.75rem 0.8rem 0.9rem;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 0.3rem;
  min-height: 0;
}
.post-card-meta {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.post-card-title {
  font-size: 0.95rem;
  line-height: 1.3;
  margin: 0;
  color: var(--text-head);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 2.5em;
}
.post-card-excerpt {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.post-card-more {
  margin-top: auto;
  padding-top: 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blue-bright);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

@media (min-width: 640px) {
  .posts-grid {
    grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
    gap: 1.1rem;
  }
}
@media (min-width: 1100px) {
  .posts-grid {
    grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
    gap: 1.15rem 1.2rem;
  }
}

/* Single / page entry */
.entry { max-width: 48rem; }
.entry-meta {
  display: flex; flex-wrap: wrap; gap: 0.35rem 0.85rem;
  font-size: 0.8rem; color: var(--text-muted); margin-top: 0.5rem;
}
.entry-meta a { color: var(--text-head); text-decoration: none; }
.entry-thumbnail {
  margin: 0 0 1.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 6px 20px var(--shadow-color);
  /* Featured image on single can stay wide; grid cards stay square */
  aspect-ratio: 16 / 9;
  position: relative;
  background: var(--bg-mute);
}
.entry-thumbnail img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.entry-content { font-size: 1.05rem; line-height: 1.8; color: var(--text-main); }
.entry-content p + p { margin-top: 1.1rem; }
.entry-content h2 {
  margin-top: 2rem; padding-bottom: 0.35rem; border-bottom: 1px solid var(--blue-pale);
}
.entry-content a {
  color: var(--text-head); text-decoration: none; border-bottom: 1px dotted var(--border-color);
}
.entry-content a:hover {
  color: var(--gold-deep); border-bottom-style: solid; border-bottom-color: var(--magenta-soft);
}
.entry-content blockquote {
  margin: 1.5rem 0; padding: 0.85rem 1.1rem;
  border-left: 3px solid var(--gold);
  background: linear-gradient(90deg, var(--gold-wash), transparent);
  color: var(--text-head); font-style: italic;
}
.entry-footer {
  margin-top: 2rem; padding-top: 1rem;
  border-top: 1px solid var(--magenta-border);
  font-size: 0.85rem; color: var(--text-muted);
}

.post-navigation {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem;
  margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--blue-pale);
}
.post-navigation a {
  display: block; padding: 0.75rem 0.9rem;
  border: 1px solid var(--border-color); border-radius: var(--radius-md);
  text-decoration: none; background: var(--bg-card);
}
.post-navigation a:hover { border-color: var(--gold); background: var(--gold-pale); }
.post-navigation .nav-subtitle {
  display: block; font-size: 0.65rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.25rem;
}
.post-navigation .nav-title { font-weight: 700; color: var(--text-head); font-size: 0.9rem; }
.post-navigation .nav-next { text-align: right; grid-column: 2; }

.btn-primary, .wp-block-button__link, button[type="submit"], input[type="submit"] {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.5rem 1rem; background: var(--blue-primary); color: #fff !important;
  border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 600;
  text-decoration: none !important; border: 1px solid var(--blue-primary);
  font-family: inherit; cursor: pointer;
}
.btn-primary:hover, .wp-block-button__link:hover, button[type="submit"]:hover, input[type="submit"]:hover {
  background: var(--gold-deep); border-color: var(--gold-deep);
}
.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.5rem 1rem; background: var(--bg-card); color: var(--text-head);
  border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 600;
  text-decoration: none; border: 1px solid var(--border-color);
}
.btn-secondary:hover { background: var(--gold-light); border-color: var(--gold); }

.hub-journal-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.85rem 1.5rem; margin: 0 0 1.5rem; padding: 1rem 1.2rem;
  border-radius: var(--radius-md); border: 1px solid var(--gold);
  background:
    linear-gradient(135deg, var(--gold-wash) 0%, transparent 45%),
    linear-gradient(225deg, var(--magenta-wash) 0%, var(--blue-mist) 70%);
  box-shadow: 0 2px 10px var(--shadow-color);
}
.hub-journal-banner-kicker {
  font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 700; color: var(--gold-deep);
}
.hub-journal-banner-title {
  display: block; font-size: 1.05rem; font-weight: 700;
  color: var(--text-head); margin-top: 0.15rem;
}
.hub-journal-banner-desc {
  display: block; font-size: 0.85rem; color: var(--text-muted);
  margin-top: 0.2rem; max-width: 36rem; line-height: 1.45;
}
.hub-journal-banner-cta {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.55rem 1.05rem; border-radius: 999px;
  background: var(--blue-primary); color: #fff !important;
  font-weight: 700; font-size: 0.875rem; text-decoration: none !important;
  border: 1px solid var(--blue-primary); white-space: nowrap;
}
.hub-journal-banner-cta:hover { background: var(--gold-deep); border-color: var(--gold-deep); }
.hub-journal-banner-cta i { color: var(--gold-pale); }

.empty-state {
  text-align: center; padding: 2.5rem 1rem;
  border: 1px dashed var(--border-color); border-radius: var(--radius-lg);
  background: var(--bg-soft);
}
.empty-state p { color: var(--text-muted); max-width: 28rem; margin: 0 auto 1.25rem; }

.pagination, .nav-links {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.75rem; justify-content: center;
}
.pagination .page-numbers, .nav-links a, .nav-links span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.25rem; height: 2.25rem; padding: 0 0.55rem;
  border-radius: var(--radius-sm); border: 1px solid var(--border-color);
  background: var(--bg-card); color: var(--text-head); text-decoration: none;
  font-size: 0.85rem; font-weight: 600;
}
.pagination .page-numbers.current, .nav-links .current {
  background: var(--gold-light); border-color: var(--gold); color: var(--gold-dark);
}

/* Comments fully suppressed */
.comments-area, #comments, .comment-respond, .wp-block-comments,
.wp-block-post-comments-form, .wp-block-comments-query-loop {
  display: none !important;
}

.admin-bar .site-sidebar { top: 32px; height: calc(100vh - 32px); }
@media screen and (max-width: 782px) {
  .admin-bar .site-sidebar { top: 46px; height: calc(100vh - 46px); }
}

@media (max-width: 1024px) {
  .site-layout { grid-template-columns: 1fr; }
  .site-sidebar {
    position: fixed; left: 0; top: 0; transform: translateX(-100%);
    transition: transform var(--transition-smooth);
    box-shadow: 4px 0 24px rgba(30, 58, 95, 0.14);
    width: var(--sidebar-width);
  }
  .site-sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: inline-flex; }
  body.sidebar-open { overflow: hidden; }
  .site-main-header, .site-main-body, .site-main-footer {
    padding-left: 1.15rem; padding-right: 1.15rem;
  }
  .page-title, .entry-title { font-size: 1.65rem; }
  .post-navigation { grid-template-columns: 1fr; }
  .post-navigation .nav-next { grid-column: 1; text-align: left; }
}

.has-navy-color { color: #1e3a5f; }
.has-sky-color { color: #0284c8; }
.has-gold-color { color: #d4af37; }
.has-rose-color { color: #c4719a; }
.has-mist-background-color { background-color: #f0f9ff; }
.has-navy-background-color { background-color: #1e3a5f; }
.has-gold-background-color { background-color: #d4af37; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
