/*
Theme Name: Campus Blog
Theme URI: https://www.campusprint.co.il
Author: Campus Print
Description: תבנית בלוג בעברית (RTL) בהשראת הבלוג של Intercom — כתבה ראשית, רשת כתבות, קטגוריות צבעוניות, ניוזלטר ופוטר כהה. מותאמת לקמפוס פרינט.
Version: 1.0.7
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: campus-blog
Tags: rtl-language-support, blog, custom-menu, featured-images
*/

/* ============================================
   הבלוג של קמפוס — עיצוב בהשראת בלוג Intercom
   ============================================ */

:root {
  --blue: #286efa;
  --blue-dark: #1a54cc;
  --ink: #061537;
  --ink-soft: #3d4a66;
  --ink-muted: #6b7690;
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --border: #e6e9f2;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 8px rgba(6, 21, 55, 0.06);
  --shadow-hover: 0 12px 32px rgba(6, 21, 55, 0.12);
  --maxw: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Heebo", "Segoe UI", -apple-system, sans-serif;
  direction: rtl;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- פס הכרזה עליון ---------- */
.announce {
  background: var(--ink);
  color: #fff;
  text-align: center;
  font-size: 14px;
  padding: 9px 16px;
}
.announce a {
  color: #9db9ff;
  font-weight: 600;
  margin-inline-start: 6px;
}
.announce a:hover { text-decoration: underline; }

/* ---------- כותרת עליונה ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 36px;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.logo .custom-logo { max-height: 40px; width: auto; }
/* לוגו ההדר מוסתר רק בעמוד הבית — שם מוצג לוגו ההירו הגדול */
.home .site-header .logo { display: none; }
.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--blue), #7a5cff);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  flex-shrink: 0;
}
.logo .tagline { font-weight: 400; color: var(--ink-muted); }
.main-nav ul {
  display: flex;
  gap: 26px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
}
.main-nav a:hover { color: var(--ink); }
.main-nav .current-menu-item > a,
.main-nav .current-cat > a { color: var(--ink); font-weight: 700; }
.header-cta {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.18s ease;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary {
  background: var(--ink);
  color: #fff;
}
.btn-primary:hover { background: var(--blue); color: #fff; }
.btn-ghost {
  color: var(--ink-soft);
  padding: 10px 6px;
}
.btn-ghost:hover { color: var(--ink); }

/* ---------- כותרת הבלוג + קטגוריות ---------- */
.blog-hero {
  padding: 56px 0 8px;
  text-align: center;
}
.blog-hero h1 {
  font-size: clamp(38px, 5.5vw, 58px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
}
.blog-hero h1.hero-logo {
  margin: 0;
  line-height: 0;
}
.blog-hero h1.hero-logo img {
  display: block;
  margin: 0 auto;
  width: min(440px, 85vw);
  height: auto;
}
.blog-hero p.sub {
  margin: 14px auto 0;
  font-size: 19px;
  color: var(--ink-muted);
  max-width: 640px;
}
.cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 28px 0 34px;
  border-bottom: 1px solid var(--border);
}
.cat-pill {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  background: #fff;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.cat-pill:hover { border-color: var(--ink); color: var(--ink); }
.cat-pill.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
/* פילים צבעוניים לפי קטגוריה — אותה פלטה של תגיות הכרטיסים */
.cat-pill.t-print   { background: #d9f2e5; color: #0a6b3c; border-color: transparent; }
.cat-pill.t-brand   { background: #fbdff0; color: #c02a6c; border-color: transparent; }
.cat-pill.t-market  { background: #ffe8cd; color: #9a4d00; border-color: transparent; }
.cat-pill.t-news    { background: #dbe7ff; color: var(--blue-dark); border-color: transparent; }
.cat-pill.t-podcast { background: #dcf4ef; color: #0c7a5e; border-color: transparent; }
.cat-pill.t-events  { background: #eae2fc; color: #5b21b6; border-color: transparent; }
.cat-pill.t-digital { background: #d6edfb; color: #0369a1; border-color: transparent; }
.cat-pill.t-print:hover, .cat-pill.t-brand:hover, .cat-pill.t-market:hover,
.cat-pill.t-news:hover, .cat-pill.t-podcast:hover, .cat-pill.t-events:hover,
.cat-pill.t-digital:hover { border-color: currentColor; }
/* פיל פעיל בקטגוריה — מילוי מלא בצבע הקטגוריה */
.cat-pill.t-print.active   { background: #0a6b3c; border-color: #0a6b3c; color: #fff; }
.cat-pill.t-brand.active   { background: #c02a6c; border-color: #c02a6c; color: #fff; }
.cat-pill.t-market.active  { background: #9a4d00; border-color: #9a4d00; color: #fff; }
.cat-pill.t-news.active    { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.cat-pill.t-podcast.active { background: #0c7a5e; border-color: #0c7a5e; color: #fff; }
.cat-pill.t-events.active  { background: #5b21b6; border-color: #5b21b6; color: #fff; }
.cat-pill.t-digital.active { background: #0369a1; border-color: #0369a1; color: #fff; }

/* ---------- כתבה ראשית ---------- */
.featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 44px;
  align-items: center;
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}
.featured-art {
  border-radius: var(--radius);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  display: block;
}
.featured-art img { width: 100%; height: 100%; object-fit: cover; }
.featured-body .meta { margin-bottom: 14px; }
.featured-body h2 {
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.6px;
}
.featured-body h2 a:hover { color: var(--blue); }
.featured-body .excerpt {
  margin-top: 14px;
  font-size: 17px;
  color: var(--ink-soft);
}
.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-weight: 700;
  color: var(--blue);
}
.read-more:hover { gap: 10px; }
.read-more .arr { transition: transform 0.15s; font-size: 18px; }

/* ---------- מטא־נתונים ---------- */
.meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-muted);
}
.tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  background: #eef3ff;
  color: var(--blue-dark);
}
.tag.t-print   { background: #d9f2e5; color: #0a6b3c; }
.tag.t-brand   { background: #fbdff0; color: #c02a6c; }
.tag.t-market  { background: #ffe8cd; color: #9a4d00; }
.tag.t-news    { background: #dbe7ff; color: var(--blue-dark); }
.tag.t-podcast { background: #dcf4ef; color: #0c7a5e; }
.tag.t-digital { background: #d6edfb; color: #0369a1; }
.dot::before { content: "·"; margin: 0 2px; }

/* ---------- אווטאר מחבר ---------- */
.author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.av-1 { background: linear-gradient(135deg, #286efa, #6a9bff); }
.av-2 { background: linear-gradient(135deg, #c02a6c, #f06aa7); }
.av-3 { background: linear-gradient(135deg, #0d7a45, #3dbd7d); }
.av-4 { background: linear-gradient(135deg, #b25e00, #f0a13d); }
.av-5 { background: linear-gradient(135deg, #6b3fd4, #a98cf0); }
.author .name { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.author .role { font-size: 13px; color: var(--ink-muted); }

/* ---------- איורי כרטיסים ---------- */
.card-art {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.card-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}
.card-art::before,
.card-art::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  opacity: 0.35;
}
.card-art::before {
  width: 62%;
  aspect-ratio: 1;
  background: #fff;
  top: -28%;
  right: -14%;
}
.card-art::after {
  width: 44%;
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.55);
  bottom: -20%;
  left: -8%;
}
.card-art .glyph {
  font-size: clamp(44px, 6vw, 72px);
  z-index: 1;
  filter: drop-shadow(0 6px 14px rgba(6, 21, 55, 0.18));
}
.featured-art .glyph { font-size: clamp(70px, 8vw, 110px); }

.g-1 { background: linear-gradient(135deg, #dbe7ff, #b7ceff); }
.g-2 { background: linear-gradient(135deg, #ffe3ef, #ffc2dd); }
.g-3 { background: linear-gradient(135deg, #d9f5e6, #aee8cd); }
.g-4 { background: linear-gradient(135deg, #ffefd8, #ffd9a3); }
.g-5 { background: linear-gradient(135deg, #e9e0ff, #cdbcfa); }
.g-6 { background: linear-gradient(135deg, #dff4fb, #b3e3f5); }
.g-7 { background: linear-gradient(135deg, #fff0d9, #fbd3b8); }
.g-8 { background: linear-gradient(135deg, #e4e9f7, #c5d0ef); }
.g-9 { background: linear-gradient(135deg, #fbe3e0, #f6c1ba); }

/* ---------- רשת כתבות ---------- */
.grid-section { padding: 48px 0 16px; }
.grid-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 26px;
}
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px 28px;
}
.post-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  transition: transform 0.18s ease;
}
.post-card:hover { transform: translateY(-4px); }
.post-card:hover .card-art { box-shadow: var(--shadow-hover); }
.post-card .card-art {
  transition: box-shadow 0.18s ease;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.post-card h3 {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
  margin: 10px 0 8px;
  letter-spacing: -0.2px;
}
.post-card h3 a:hover { color: var(--blue); }
.post-card .excerpt {
  font-size: 14.5px;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card .author { margin-top: 14px; }
.post-card .avatar { width: 32px; height: 32px; font-size: 12.5px; }

/* ---------- בלוק ניוזלטר ---------- */
.newsletter {
  margin: 56px 0;
  background: var(--ink);
  border-radius: 22px;
  padding: 52px 48px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.newsletter::before {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(40, 110, 250, 0.5), transparent 70%);
  top: -160px;
  left: -100px;
}
.newsletter h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  line-height: 1.3;
  position: relative;
}
.newsletter p {
  margin-top: 10px;
  color: #b9c3d9;
  font-size: 16px;
  position: relative;
}
.newsletter form {
  display: flex;
  gap: 10px;
  position: relative;
}
.newsletter input[type="email"] {
  flex: 1;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
.newsletter input[type="email"]::placeholder { color: #8e9ab4; }
.newsletter input[type="email"]:focus { border-color: var(--blue); }
.newsletter .btn { background: var(--blue); color: #fff; white-space: nowrap; }
.newsletter .btn:hover { background: #4d85ff; }

/* ---------- דפדוף עמודים (וורדפרס) ---------- */
.pagination-wrap { padding: 24px 0 72px; }
.pagination-wrap .nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.pagination-wrap .page-numbers {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  display: inline-grid;
  place-items: center;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-soft);
  transition: all 0.15s;
}
.pagination-wrap .page-numbers:hover { border-color: var(--ink); color: var(--ink); }
.pagination-wrap .page-numbers.current {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.pagination-wrap .page-numbers.dots { border: none; }

/* ---------- פוטר ---------- */
.site-footer {
  background: var(--ink);
  color: #b9c3d9;
  padding: 64px 0 32px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-grid .logo { color: #fff; margin-bottom: 14px; }
.footer-grid .about { font-size: 14.5px; max-width: 280px; }
.footer-col h4 {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
}
.footer-col li { margin-bottom: 10px; font-size: 14.5px; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 26px;
  font-size: 13.5px;
  color: #8e9ab4;
}

/* ============================================
   עמוד כתבה
   ============================================ */
.article-hero {
  max-width: 780px;
  margin: 0 auto;
  padding: 56px 24px 0;
  text-align: center;
}
.article-hero .meta { justify-content: center; }
.article-hero h1 {
  font-size: clamp(30px, 4.5vw, 46px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.8px;
  margin: 18px 0 14px;
}
.article-hero .lede {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0 auto;
}
.article-hero .author {
  justify-content: center;
  margin: 26px 0 0;
}
.article-hero .author > div { text-align: right; }
.article-cover {
  max-width: 980px;
  margin: 40px auto 0;
  padding: 0 24px;
}
.article-cover .card-art { aspect-ratio: 21 / 9; }
.article-cover .glyph { font-size: clamp(60px, 7vw, 96px); }

.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  font-size: 17.5px;
  color: #22304f;
}
.article-body h2 {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin: 42px 0 14px;
  color: var(--ink);
}
.article-body h3 {
  font-size: 21px;
  font-weight: 700;
  margin: 32px 0 10px;
  color: var(--ink);
}
.article-body p { margin-bottom: 18px; }
.article-body ul, .article-body ol {
  margin: 0 24px 18px 0;
  list-style: disc;
}
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 8px; }
.article-body blockquote {
  border-inline-start: 4px solid var(--blue);
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin: 28px 0;
  font-size: 19px;
  font-weight: 500;
  color: var(--ink);
}
.article-body img { border-radius: var(--radius-sm); margin: 10px auto 18px; }
.article-body a { color: var(--blue); }
.article-body a:hover { text-decoration: underline; }
.article-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 20px 0;
  font-size: 15.5px;
}
.article-body th, .article-body td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: right;
}
.article-body th { background: var(--bg-soft); font-weight: 700; }
.article-body .wp-caption { max-width: 100%; }
.article-body .wp-caption-text {
  font-size: 13.5px;
  color: var(--ink-muted);
  text-align: center;
  margin-top: 6px;
}
.article-body details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 12px;
}
.article-body summary { font-weight: 700; cursor: pointer; }

.article-share {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-muted);
  font-size: 14.5px;
}
.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 16px;
  cursor: pointer;
  background: #fff;
  transition: all 0.15s;
}
.share-btn:hover { border-color: var(--blue); background: #eef3ff; }

.related {
  background: var(--bg-soft);
  padding: 56px 0 64px;
}
.related h2 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 30px;
}

/* ---------- עמוד סטטי ---------- */
.page-hero {
  max-width: 780px;
  margin: 0 auto;
  padding: 56px 24px 0;
}
.page-hero h1 {
  font-size: clamp(30px, 4.5vw, 46px);
  font-weight: 800;
  letter-spacing: -0.8px;
}

/* ---------- רספונסיביות ---------- */
@media (max-width: 960px) {
  .main-nav { display: none; }
  .featured { grid-template-columns: 1fr; gap: 26px; }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .newsletter { grid-template-columns: 1fr; padding: 40px 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .posts-grid { grid-template-columns: 1fr; }
  .newsletter form { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .header-cta .btn-ghost { display: none; }
}

/* ============================================
   תוספות 1.0.1 — אייקונים שטוחים, קטגוריית אירועים, ניוזלטר
   ============================================ */

.tag.t-events { background: #eae2fc; color: #5b21b6; }

.share-btn svg { width: 18px; height: 18px; display: block; }
.card-art .glyph svg { width: 64px; height: 64px; }
.featured-art .glyph svg { width: clamp(70px, 8vw, 110px); height: auto; }
.article-cover .glyph svg { width: clamp(60px, 7vw, 96px); height: auto; }

.newsletter-reach { min-width: 280px; flex: 1; }
