/* ═══════════════════════════════════════════════
   ליבא CMS — עיצוב זהה לאתר המקורי
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Frank+Ruhl+Libre:wght@400;700;900&family=Heebo:wght@300;400;500;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }

body {
  font-family: 'Heebo', sans-serif;
  background: #fff;
  color: #1a1a1a;
  direction: rtl;
  text-align: right;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ── ADMIN BAR ── */
.admin-bar {
  background: #2a2a2a;
  padding: 6px 18px;
  font-size: .74rem;
  display: flex;
  gap: 14px;
  align-items: center;
  color: #ccc;
}
.admin-bar a { color: #f0c060; }
.admin-bar a:hover { text-decoration: underline; }
.ab-right { margin-right: auto; color: #888; }

/* ══════════════════════════════════════════════
   HEADER
   לפי צילום המסך:
   • לוגו ממורכז — קובץ גרפי
   • קו דק מתחת ללוגו
   • ניווט: יהדות חברה תרבות מוזיקה ♡ וידיאו פעימות כתבות אודות
   ══════════════════════════════════════════════ */
.site-header {
  background: #fff;
  border-bottom: 1px solid #dedede;
  position: sticky;
  top: 0;
  z-index: 200;
}

/* שורת לוגו */
.header-logo-wrap {
  text-align: center;
  padding: 16px 0 12px;
  border-bottom: 1px solid #ebebeb;
}

.site-logo { display: inline-block; line-height: 0; }
.site-logo img { height: 56px; width: auto; display: inline-block; }

/* ניווט */
.header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
}

.header-nav a {
  color: #333;
  font-size: .82rem;
  font-weight: 400;
  padding: 10px 14px;
  display: block;
  transition: color .15s;
  white-space: nowrap;
}
.header-nav a:hover,
.header-nav a.active { color: #000; font-weight: 600; }

.nav-heart {
  color: #c0392b;
  font-size: 1.05rem;
  padding: 10px 8px;
  cursor: default;
  line-height: 1;
}

/* ══════════════════════════════════════════════
   HERO SLIDER
   לפי צילום:
   • ממורכז, רוחב ~480px, גובה ~240px
   • חצים < > מחוץ לתמונה משמאל וימין
   • קופסת טקסט עם מסגרת לבנה בתוך התמונה
   ══════════════════════════════════════════════ */
.slider-section {
  padding: 28px 0 0;
  background: #fff;
}

.slider-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 20px;
  max-width: 640px;
  margin: 0 auto;
}

.slider-arrow {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1px solid #bbb;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #555;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}
.slider-arrow:hover { background: #f5f5f5; }

.slider-viewport {
  width: 480px;
  height: 240px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .6s ease;
}
.slide.active { opacity: 1; pointer-events: auto; }

.slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

/* קופסת הטקסט עם מסגרת לבנה — ממורכזת על התמונה */
.slide-box {
  position: absolute;
  top: 50%;
  right: 50%;
  transform: translate(50%, -50%);
  width: 195px;
  border: 1px solid rgba(255,255,255,.8);
  background: rgba(0,0,0,.42);
  padding: 10px 12px 12px;
  text-align: center;
}

.slide-box-type {
  color: rgba(255,255,255,.65);
  font-size: .65rem;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.slide-box-type-icon {
  border: 1px solid rgba(255,255,255,.45);
  padding: 2px 5px;
  font-size: .6rem;
  line-height: 1;
}

.slide-box-title {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.22;
  margin-bottom: 6px;
}

.slide-box-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,.35);
  margin: 5px 0;
}

.slide-box-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.slide-box-author {
  color: rgba(255,255,255,.82);
  font-size: .65rem;
  font-weight: 600;
}

.slide-box-views {
  color: rgba(255,255,255,.5);
  font-size: .6rem;
  direction: ltr;
}

.slide-box-excerpt {
  color: rgba(255,255,255,.75);
  font-size: .62rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: right;
}

/* dots */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 0;
  padding-bottom: 24px;
}
.sdot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #ccc;
  border: none;
  cursor: pointer;
  transition: background .2s;
}
.sdot.active { background: #444; }

/* ══════════════════════════════════════════════
   SECTION DIVIDERS — - חדשים - / - פופולריים -
   ══════════════════════════════════════════════ */
.sec-divider {
  border: none;
  border-top: 1px solid #e8e8e8;
  margin: 0;
}

.sec-title {
  text-align: center;
  font-size: .8rem;
  font-weight: 400;
  color: #777;
  letter-spacing: 3px;
  padding: 20px 0 16px;
}

/* ══════════════════════════════════════════════
   CONTAINER
   ══════════════════════════════════════════════ */
.container {
  max-width: 990px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ══════════════════════════════════════════════
   NEW POSTS — 3 כרטיסים מרובעים
   overlay כהה למעלה עם שם כותב + כותרת + אייקון
   ══════════════════════════════════════════════ */
.new-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}

.new-card {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #ddd;
  cursor: pointer;
}

.new-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(.82);
  transition: transform .4s, filter .3s;
}
.new-card:hover img {
  transform: scale(1.04);
  filter: brightness(.7);
}

/* overlay שחור למעלה */
.new-card-top {
  position: absolute;
  top: 0; right: 0; left: 0;
  background: rgba(0,0,0,.62);
  padding: 10px 12px 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

.new-card-text { flex: 1; }

.new-card-author {
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  display: block;
  line-height: 1.2;
}

.new-card-subtitle {
  color: rgba(255,255,255,.65);
  font-size: .65rem;
  display: block;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.new-card-icon {
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.45);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.7);
  font-size: .65rem;
}

/* ══════════════════════════════════════════════
   POPULAR POSTS
   ══════════════════════════════════════════════ */
.popular-section { padding-bottom: 36px; }

.pop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.pop-card { display: block; cursor: pointer; }

.pop-card-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #e0e0e0;
  margin-bottom: 8px;
}
.pop-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s;
}
.pop-card:hover .pop-card-img img { transform: scale(1.05); }

.pop-card-title {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: .88rem;
  font-weight: 700;
  color: #111;
  line-height: 1.3;
  margin-bottom: 3px;
}
.pop-card-author {
  color: #888;
  font-size: .7rem;
  display: block;
  margin-bottom: 3px;
}
.pop-card-excerpt {
  color: #999;
  font-size: .68rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pop-card-read {
  color: #666;
  font-size: .65rem;
  display: inline-block;
  margin-top: 4px;
}

/* img placeholder */
.img-ph {
  width: 100%; height: 100%;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 2rem;
  font-weight: 900;
}

/* ══════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════ */
.site-footer {
  border-top: 1px solid #e0e0e0;
  background: #fff;
  padding: 28px 0 18px;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

/* לוגו בפוטר — קטן יותר */
.footer-logo img { height: 36px; width: auto; }

.footer-nav-cols { display: flex; gap: 30px; }

.footer-col h4 {
  font-size: .68rem;
  font-weight: 700;
  color: #bbb;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.footer-col a {
  display: block;
  color: #666;
  font-size: .78rem;
  margin-bottom: 6px;
  transition: color .15s;
}
.footer-col a:hover { color: #000; }

.footer-copy {
  width: 100%;
  border-top: 1px solid #eee;
  margin-top: 18px;
  padding-top: 14px;
  text-align: center;
  color: #bbb;
  font-size: .7rem;
}

/* ══════════════════════════════════════════════
   SINGLE POST
   ══════════════════════════════════════════════ */
.post-page { background: #fff; min-height: 60vh; }

.post-hero {
  position: relative;
  height: 380px;
  overflow: hidden;
  background: #111;
}
.post-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(.4);
}
.post-hero-grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.2) 55%, transparent 100%);
}
.post-hero-content {
  position: absolute;
  bottom: 0; right: 0; left: 0;
  padding: 30px 40px;
  max-width: 800px;
  margin: 0 auto;
}
.post-cat-badge {
  display: inline-block;
  border: 1px solid rgba(255,255,255,.45);
  color: rgba(255,255,255,.8);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 3px 9px;
  margin-bottom: 10px;
}
.post-title {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 2.1rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 10px;
}
.post-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.post-meta-author { color: rgba(255,255,255,.8); font-size: .8rem; font-weight: 600; }
.post-meta-date   { color: rgba(255,255,255,.5); font-size: .74rem; }
.post-meta-views  { color: rgba(255,255,255,.35); font-size: .7rem; margin-right: auto; }

.post-body-wrap { max-width: 720px; margin: 0 auto; padding: 42px 20px 64px; }
.post-content { font-size: 1.04rem; line-height: 1.92; color: #333; }
.post-content p { margin-bottom: 1.4em; }
.post-content h2 {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.4rem; font-weight: 700; color: #111;
  margin: 1.8em 0 .5em;
  border-bottom: 1px solid #eee; padding-bottom: 6px;
}
.post-content h3 {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.18rem; font-weight: 700; color: #111;
  margin: 1.5em 0 .4em;
}
.post-content blockquote {
  border-right: 3px solid #bbb;
  padding: 10px 18px; margin: 1.8em 0;
  background: #f8f8f8;
  font-style: italic;
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.1rem; color: #444;
}
.post-content a { color: #555; border-bottom: 1px solid #ddd; }
.post-content img { max-width: 100%; margin: 1.4em auto; }

.post-share {
  margin-top: 30px; padding-top: 16px;
  border-top: 1px solid #eee;
  display: flex; align-items: center; gap: 10px;
}
.post-share span { color: #999; font-size: .78rem; }
.share-btn { padding: 6px 14px; font-size: .75rem; font-weight: 700; color: #fff; border: none; cursor: pointer; display: inline-block; }
.share-fb { background: #1877f2; }
.share-wa { background: #25d366; }

/* ══════════════════════════════════════════════
   ARCHIVE / SEARCH
   ══════════════════════════════════════════════ */
.archive-header {
  background: #f9f9f9;
  border-bottom: 1px solid #e8e8e8;
  padding: 26px 0 18px;
}
.archive-title {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.6rem; font-weight: 700; color: #111;
}
.archive-count { color: #aaa; font-size: .78rem; margin-top: 4px; }

.search-wrap { max-width: 440px; margin: 0 auto 26px; }
.search-form { display: flex; }
.search-form input {
  flex: 1; padding: 9px 13px;
  border: 1px solid #ddd;
  font-family: 'Heebo', sans-serif; font-size: .88rem;
  direction: rtl; outline: none; background: #fff;
  transition: border-color .2s;
}
.search-form input:focus { border-color: #888; }
.search-form button {
  padding: 9px 18px;
  background: #1a1a1a; color: #fff;
  border: none; font-family: 'Heebo', sans-serif;
  font-size: .88rem; font-weight: 700; cursor: pointer;
}

.archive-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }

.arc-card { display: block; cursor: pointer; }
.arc-card-img { aspect-ratio: 1/1; overflow: hidden; background: #e0e0e0; margin-bottom: 8px; }
.arc-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; display: block; }
.arc-card:hover .arc-card-img img { transform: scale(1.04); }
.arc-card-author { color: #888; font-size: .7rem; display: block; margin-bottom: 3px; }
.arc-card-title {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: .95rem; font-weight: 700; color: #111; line-height: 1.3; margin-bottom: 4px;
}
.arc-card-excerpt { color: #aaa; font-size: .7rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.pagination { display: flex; justify-content: center; gap: 5px; margin-top: 34px; flex-wrap: wrap; }
.pagination a {
  padding: 6px 12px; background: #fff;
  border: 1px solid #ddd; color: #333;
  font-size: .8rem; transition: all .15s;
}
.pagination a:hover, .pagination a.cur {
  background: #1a1a1a; border-color: #1a1a1a; color: #fff; font-weight: 700;
}

/* related */
.related-section { background: #f9f9f9; border-top: 1px solid #eee; padding: 30px 0; }

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 860px) {
  .slider-viewport { width: 100%; max-width: 440px; }
  .new-grid { grid-template-columns: repeat(2,1fr); }
  .pop-grid { grid-template-columns: repeat(2,1fr); }
  .archive-grid { grid-template-columns: repeat(2,1fr); }
  .post-hero { height: 280px; }
  .post-title { font-size: 1.7rem; }
}
@media (max-width: 560px) {
  .site-logo img { height: 42px; }
  .header-nav a { padding: 8px 9px; font-size: .76rem; }
  .slider-viewport { height: 180px; }
  .slide-box { width: 160px; }
  .new-grid { grid-template-columns: 1fr; }
  .pop-grid { grid-template-columns: repeat(2,1fr); }
  .archive-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 14px; }
  .post-title { font-size: 1.45rem; }
  .post-body-wrap { padding: 26px 14px 44px; }
}
