/* ============================================================
   HotNews.co.il — Global Stylesheet
   כולל: reset, variables, layout, header, nav, footer, drawer
   ============================================================ */

/* ───────────────────────────────────────────────────────────
   Heebo Font - נטען מהשרת המקומי (מהיר יותר מ-Google Fonts)
   ─────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Heebo';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/heebo/heebo-hebrew-400.woff2') format('woff2'),
       url('/assets/fonts/heebo/heebo-latin-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Heebo';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/heebo/heebo-hebrew-600.woff2') format('woff2'),
       url('/assets/fonts/heebo/heebo-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Heebo';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/heebo/heebo-hebrew-700.woff2') format('woff2'),
       url('/assets/fonts/heebo/heebo-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Heebo';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/assets/fonts/heebo/heebo-hebrew-800.woff2') format('woff2'),
       url('/assets/fonts/heebo/heebo-latin-800.woff2') format('woff2');
}
@font-face {
  font-family: 'Heebo';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('/assets/fonts/heebo/heebo-hebrew-900.woff2') format('woff2'),
       url('/assets/fonts/heebo/heebo-latin-900.woff2') format('woff2');
}

    :root {
      /* === Brand Colors === */
      --brand-primary: #c41212;
      --brand-primary-dark: #970d0d;
      --brand-primary-soft: #fef2f2;       /* רקע אדום בהיר (hover, badges) */
      --brand-primary-border: #fecaca;     /* גבול אדום בהיר */
      --brand-secondary: #0f172a;
      --brand-secondary-soft: #1e293b;
      --brand-accent: #eab308;

      /* === Background Colors === */
      --bg-page: #eceef1;
      --bg-surface: #ffffff;
      --bg-muted: #f8fafc;

      /* === Text Colors === */
      --text-main: #0f172a;
      --text-soft: #5b6472;

      /* === Borders & Shadows === */
      --border-color: #d8dee8;
      --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);

      /* === Border Radius === */
      --radius-xl: 22px;
      --radius-lg: 18px;
      --radius-md: 14px;
      --radius-sm: 10px;

      /* === Layout === */
      --container-width: 1360px;
      --header-height: 74px;
      --content-width: 820px;

      /* === Typography === */
      --font-main: 'Heebo', Arial, "Noto Sans Hebrew", sans-serif;
    }

    * { box-sizing: border-box; }
    html { width: 100%; overflow-x: hidden; scroll-behavior: smooth; }
    body {
      margin: 0;
      width: 100%;
      overflow-x: hidden;
      font-family: var(--font-main);
      background: var(--bg-page);
      color: var(--text-main);
      line-height: 1.6;
      display: flex;
      flex-direction: column;
      min-height: 100vh;
    }
    main {
      flex: 1;
    }
    a { color: inherit; text-decoration: none; }
    img { display: block; max-width: 100%; }
    button, input { font: inherit; }

    .container {
      width: min(100% - 24px, var(--container-width));
      margin-inline: auto;
    }

    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0,0,0,0);
      border: 0;
    }

    .topbar {
      background: #f8fafc;
      border-bottom: 1px solid var(--border-color);
      font-size: 13px;
    }
    .topbar-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      min-height: 40px;
      padding: 7px 0;
      flex-wrap: wrap;
    }
    .topbar-links,
    .topbar-actions {
      display: flex;
      gap: 16px;
      flex-wrap: wrap;
      color: var(--text-soft);
    }
    .topbar a:hover { color: var(--brand-primary); }

    /* קישורים מיוחדים בtopbar */
    .topbar-link-accent {
      color: var(--brand-primary);
      font-weight: 700;
    }
    .topbar-link-user {
      color: var(--brand-primary);
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }
    .topbar-link-login {
      font-weight: 600;
    }
    .topbar-link-register {
      background: var(--brand-primary);
      color: #fff;
      padding: 3px 10px;
      border-radius: 6px;
      font-weight: 600;
    }
    .topbar a.topbar-link-register:hover {
      background: var(--brand-primary-dark);
      color: #fff;
    }

    /* Mobile search */
    .mobile-search-toggle-btn {
      font-size: 20px;
    }
    .mobile-search-bar {
      display: none;
      background: var(--bg-surface);
      border-bottom: 2px solid var(--brand-primary);
      padding: 10px 16px;
      position: relative;
      z-index: 998;
    }
    .mobile-search-form {
      display: flex;
      gap: 0;
      align-items: stretch;
    }
    .mobile-search-input {
      flex: 1;
      padding: 10px 14px;
      border: 1.5px solid var(--border-color);
      border-left: none;
      border-radius: var(--radius-md) 0 0 var(--radius-md);
      font-size: 15px;
      font-family: inherit;
      color: var(--text-main);
      background: var(--bg-surface);
      outline: none;
    }
    .mobile-search-submit {
      padding: 10px 18px;
      background: var(--brand-primary);
      color: #fff;
      border: none;
      border-radius: 0 var(--radius-md) var(--radius-md) 0;
      font-size: 15px;
      font-weight: 700;
      cursor: pointer;
      font-family: inherit;
      white-space: nowrap;
    }
    .mobile-search-submit:hover {
      background: var(--brand-primary-dark);
    }

    .site-header {
      background: rgba(255,255,255,0.96);
      border-bottom: 1px solid var(--border-color);
    }
    .site-header-inner {
      min-height: var(--header-height);
      display: grid;
      grid-template-columns: auto 1fr auto;
      align-items: center;
      gap: 16px;
      padding: 12px 0;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }
    .brand-mark {
      width: 52px;
      height: 52px;
      border-radius: 16px;
      display: grid;
      place-items: center;
      font-size: 24px;
      font-weight: 800;
      color: #fff;
      background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
      box-shadow: var(--shadow-soft);
      flex-shrink: 0;
    }
    .brand-title {
      font-size: 32px;
      font-weight: 900;
      line-height: 1;
      letter-spacing: -0.6px;
    }
    .brand-subtitle {
      margin-top: 4px;
      font-size: 12px;
      color: var(--text-soft);
    }

    .desktop-search {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }
    .search-shell {
      width: 100%;
      display: flex;
      align-items: center;
      gap: 10px;
      background: var(--bg-muted);
      border: 1px solid var(--border-color);
      border-radius: 999px;
      padding: 8px 10px 8px 14px;
    }
    .search-shell input {
      width: 100%;
      min-width: 0;
      border: 0;
      outline: 0;
      background: transparent;
      font-size: 15px;
    }
    .search-submit {
      height: 42px;
      min-width: 52px;
      border: 0;
      border-radius: 999px;
      cursor: pointer;
      background: var(--brand-primary);
      color: #fff;
      font-weight: 800;
      padding: 0 16px;
    }

    .header-tools {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
    .tool-btn,
    .chat-btn,
    .chip {
      border: 1px solid var(--border-color);
      background: #fff;
      border-radius: 999px;
      padding: 10px 14px;
      font-size: 14px;
      cursor: pointer;
      color: #243244;
    }
    .chat-btn { font-weight: 800; }
    .tool-btn:hover,
    .chat-btn:hover,
    .chip:hover {
      color: var(--brand-primary);
      border-color: var(--brand-primary);
    }
    .mobile-search-toggle,
    .burger-btn {
      display: none;
      width: 44px;
      height: 44px;
      padding: 0;
      border-radius: 12px;
      justify-content: center;
      align-items: center;
    }
    .burger-lines,
    .burger-lines::before,
    .burger-lines::after {
      content: "";
      display: block;
      width: 18px;
      height: 2px;
      border-radius: 999px;
      background: var(--text-main);
      position: relative;
    }
    .burger-lines::before { position: absolute; top: -6px; }
    .burger-lines::after { position: absolute; top: 6px; }

    .primary-nav-wrap {
      background: var(--bg-surface);
      border-bottom: 1px solid var(--border-color);
    }
    .primary-nav-wrap.nav-fixed {
      position: fixed;
      top: 0;
      right: 0;
      left: 0;
      z-index: 900;
      box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    }
    .primary-nav {
      display: flex;
      align-items: center;
      gap: 4px;
      flex-wrap: wrap;
      padding: 10px 0;
    }
    .primary-nav a {
      padding: 9px 11px;
      border-radius: 12px;
      font-weight: 700;
      font-size: 15px;
      color: #233042;
      transition: 0.2s ease;
      white-space: nowrap;
    }
    .primary-nav a:hover,
    .primary-nav a.active {
      background: var(--brand-primary);
      color: #fff;
    }

    .hot-strip-wrap {
      background: var(--brand-secondary);
      color: #fff;
      border-bottom: 3px solid var(--brand-accent);
    }
    .hot-strip {
      display: grid;
      grid-template-columns: 145px 1fr;
      gap: 14px;
      align-items: center;
      padding: 10px 0;
    }
    .hot-label {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 38px;
      border-radius: 12px;
      background: var(--brand-primary);
      font-weight: 900;
    }
    .hot-links {
      display: flex;
      gap: 10px;
      overflow-x: auto;
      scrollbar-width: none;
      white-space: nowrap;
      padding-bottom: 2px;
    }
    .hot-links::-webkit-scrollbar { display: none; }
    .hot-links a {
      display: inline-flex;
      align-items: center;
      padding: 8px 12px;
      border-radius: 999px;
      background: rgba(255,255,255,0.08);
      font-size: 14px;
      color: #fff;
    }

    .article-shell {
      margin-top: 18px;
      margin-bottom: 36px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) 320px;
      gap: 18px;
      align-items: start;
    }

    .article-main,
    .article-sidebar {
      min-width: 0;
      display: grid;
      gap: 18px;
    }

    .panel,
    .widget {
      background: var(--bg-surface);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-xl);
      box-shadow: var(--shadow-soft);
      overflow: hidden;
    }

    .article-header {
      padding: 20px 22px 18px;
    }

/* ═══ image placeholders + general fixes ═══ */
.card-thumb { background: #e8ecf0; overflow: hidden; position: relative; }
.card-thumb img { transition: transform 0.3s ease; }
.card:hover .card-thumb img { transform: scale(1.03); }
.mini-card-thumb { background: #e8ecf0; }
.lead-card-media { background: #e8ecf0; }

/* ensure footer stays at bottom */
html { height: 100%; }

/* chat-btn global */
.chat-btn {
  background: var(--brand-primary);
  color: #fff;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
  display: inline-block;
  transition: background 0.15s;
}
.chat-btn:hover { background: var(--brand-primary-dark); color: #fff; }

/* pagination */
.pagination { display:flex; gap:6px; flex-wrap:wrap; margin-top:20px; }
.pagination a { padding:6px 12px; border:1px solid var(--border-color); border-radius:var(--radius-sm); font-size:13px; background:var(--bg-surface); }
.pagination a.active, .pagination a:hover { background:var(--brand-primary); color:#fff; border-color:var(--brand-primary); }

/* empty state */
.empty-state { text-align:center; padding:40px; color:var(--text-soft); }

/* ═══ portal template additions (global) ═══ */
.card-thumb { background: var(--bg-muted); overflow:hidden; position:relative; }
.card-thumb img { width:100%; height:100%; object-fit:cover; display:block; transition:transform 0.3s; }
.card:hover .card-thumb img { transform:scale(1.03); }
.mini-card-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.cat-label { font-size:13px; font-weight:700; color:var(--brand-primary); text-transform:uppercase; letter-spacing:0.5px; display:inline-block; margin-bottom:4px; }
.cat-label:hover { text-decoration:underline; }
.badge-breaking { display:inline-block; background:var(--brand-primary); color:#fff; font-size:11px; font-weight:700; padding:2px 8px; border-radius:4px; margin-bottom:6px; }
a { color:inherit; text-decoration:none; }
a:hover { text-decoration:none; }

/* ─── card-link-wrap: כרטיס כולו קליקבל ─────────────────── */
.card-link-wrap {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.card-link-wrap:hover h3 { color: var(--brand-primary); }
.card { cursor: pointer; }
/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.footer {
  background: var(--brand-secondary);
  color: #94a3b8;
  margin-top: 48px;
}
.footer-inner { padding: 40px 0 0; }

/* ───── Newsletter ───── */
.footer-newsletter {
  background: linear-gradient(135deg, rgba(196,18,18,0.12), rgba(15,23,42,0.4));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
.footer-newsletter-text h3 {
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  margin: 0 0 6px;
}
.footer-newsletter-text p {
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}
.footer-newsletter-form {
  display: flex;
  gap: 0;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  padding: 4px;
  min-width: 320px;
}
.footer-newsletter-form input[type="email"],
.footer-newsletter-form input[type="text"] {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 10px 16px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  min-width: 0;
}
.footer-newsletter-form input[type="email"]::placeholder,
.footer-newsletter-form input[type="text"]::placeholder { color: rgba(255,255,255,0.86); font-weight: 400; }
.footer-newsletter-form button {
  background: var(--brand-primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: 0.15s ease;
  flex-shrink: 0;
}
.footer-newsletter-form button:hover {
  background: var(--brand-primary-dark);
  transform: scale(1.02);
}
.footer-newsletter-msg {
  grid-column: 1 / -1;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}
.footer-newsletter-msg-ok {
  background: rgba(34,197,94,0.15);
  color: #86efac;
  border: 1px solid rgba(34,197,94,0.3);
}
.footer-newsletter-msg-err {
  background: rgba(239,68,68,0.15);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.3);
}

/* ───── Footer top (sections) ───── */
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-top section h4 {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--brand-primary);
  display: inline-block;
}
.footer-top section p {
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
}
.footer-top section ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-top section ul li a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
  display: block;
  padding: 2px 0;
}
.footer-top section ul li a:hover { color: #fff; }
.footer-top .footer-link-accent {
  color: #f87171;
  font-weight: 700;
}

/* ───── Social Networks ───── */
.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-wrap: wrap;
}
.footer-social-label {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin-left: 6px;
}
.footer-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #cbd5e1;
  text-decoration: none;
  transition: 0.2s ease;
}
.footer-social-icon:hover {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
  transform: translateY(-2px) scale(1.05);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 0;
  font-size: 12px;
  color: #94a3b8;
}
.footer-bottom a { color: #94a3b8; text-decoration: none; }
.footer-bottom a:hover { color: #cbd5e1; }

/* ═══════════════════════════════════════════════════════════
   MOBILE DRAWER
   ═══════════════════════════════════════════════════════════ */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  visibility: hidden;
}
.mobile-drawer[aria-hidden="false"] {
  pointer-events: auto;
  visibility: visible;
}
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.3s;
}
.mobile-drawer[aria-hidden="false"] .drawer-backdrop { opacity: 1; }
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  max-width: 92vw;
  height: 100%;
  background: var(--bg-surface);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.2);
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--brand-secondary);
  border-bottom: 3px solid var(--brand-primary);
  flex-shrink: 0;
}
.drawer-title { color: #fff; font-size: 16px; font-weight: 800; }
.drawer-close {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.drawer-close:hover { background: rgba(255,255,255,0.2); }
.drawer-search {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}
.drawer-search .search-shell {
  display: flex;
  align-items: center;
  background: var(--bg-muted);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
}
.drawer-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-main);
}
.drawer-search input:focus { outline: none; }

/* ───── אזור משתמש ב-drawer ───── */
.drawer-user {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-muted);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.drawer-auth-buttons {
  display: flex;
  gap: 8px;
}
.drawer-btn-primary,
.drawer-btn-secondary,
.drawer-btn-advertise {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: 0.15s ease;
  text-align: center;
}
.drawer-btn-primary {
  background: var(--brand-primary);
  color: #fff;
  border: 1.5px solid var(--brand-primary);
}
.drawer-btn-primary:hover {
  background: var(--brand-primary-dark);
  border-color: var(--brand-primary-dark);
}
.drawer-btn-secondary {
  background: var(--bg-surface);
  color: var(--brand-primary);
  border: 1.5px solid var(--brand-primary);
}
.drawer-btn-secondary:hover {
  background: var(--brand-primary);
  color: #fff;
}
.drawer-btn-advertise {
  background: var(--brand-secondary);
  color: #fff;
  border: 1.5px solid var(--brand-secondary);
  width: 100%;
}
.drawer-btn-advertise:hover {
  background: #1e293b;
  border-color: #1e293b;
}

/* פרופיל משתמש מחובר */
.drawer-user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  transition: 0.15s ease;
}
.drawer-user-profile:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}
.drawer-user-name {
  font-size: 14px;
}
.drawer-user-logout {
  text-align: center;
  padding: 8px;
  font-size: 13px;
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: 0.15s ease;
}
.drawer-user-logout:hover {
  color: var(--brand-primary);
  background: var(--bg-surface);
}
.drawer-search .search-submit {
  background: var(--brand-primary);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}
.drawer-nav {
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* רמה 1 - קטגוריה ראשית */
.drawer-nav-l1 {
  padding: 14px 18px;
  background: var(--bg-muted);
  color: var(--text-main);
  text-decoration: none;
  font-size: 16px;
  font-weight: 800;
  display: block;
  border-bottom: 2px solid var(--brand-primary);
  border-top: 1px solid var(--border-color);
  transition: background 0.15s;
}
.drawer-nav-l1:hover { background: #eef0f5; color: var(--brand-primary); }
.drawer-nav-l1.active {
  background: var(--brand-primary);
  color: #fff;
  border-bottom-color: var(--brand-primary-dark);
}

/* רמה 2 - תת-קטגוריה */
.drawer-nav-l2 {
  padding: 11px 18px 11px 14px;
  padding-right: 32px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  display: block;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.15s;
}
.drawer-nav-l2:hover { background: var(--bg-muted); color: var(--brand-primary); }
.drawer-nav-l2.active {
  background: var(--brand-primary);
  color: #fff;
  font-weight: 700;
}

/* רמה 3 - תת-תת-קטגוריה */
.drawer-nav-l3 {
  padding: 9px 18px 9px 14px;
  padding-right: 52px;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  display: block;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  transition: background 0.15s;
}
.drawer-nav-l3::before {
  content: "•";
  position: absolute;
  right: 36px;
  color: var(--brand-primary);
  font-weight: 700;
}
.drawer-nav-l3:hover { background: var(--bg-muted); color: var(--brand-primary); }
.drawer-nav-l3.active {
  background: var(--brand-primary);
  color: #fff;
  font-weight: 700;
}
.drawer-nav-l3.active::before { color: #fff; }

/* קישורים קבועים בסוף */
.drawer-nav-static {
  padding: 12px 18px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  display: block;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.15s;
}
.drawer-nav-static:hover { background: var(--bg-muted); color: var(--brand-primary); }
.drawer-nav-static.active {
  background: var(--brand-primary);
  color: #fff;
  font-weight: 700;
}
body.drawer-open { overflow: hidden; }

/* ═══════════════════════════════════════════════════════════
   SIDEBAR WIDGETS
   ═══════════════════════════════════════════════════════════ */
.sidebar-stack { display: flex; flex-direction: column; gap: 16px; }
.widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.widget h3 {
  margin: 0;
  padding: 13px 16px;
  font-size: 17px;
  font-weight: 800;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-muted);
  color: var(--text-main);
}
.widget .widget-body { padding: 14px 16px; }
.widget .quick-links { display: flex; flex-direction: column; gap: 4px; }
.widget .quick-links a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}
.widget .quick-links a:hover { background: var(--bg-muted); color: var(--text-main); }
.widget .topics-mini { display: flex; flex-wrap: wrap; gap: 8px; }
.widget .topics-mini a {
  display: inline-block;
  background: var(--bg-muted);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.15s;
}
.widget .topics-mini a:hover {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}
.ranking-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ranking-list li { display: flex; align-items: flex-start; gap: 10px; }
.ranking-list .num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-width: 24px;
  background: var(--brand-primary);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}
.ranking-list a { font-size: 13px; color: var(--text-main); text-decoration: none; line-height: 1.5; }
.ranking-list a:hover { color: var(--brand-primary); }
.sidebar-article-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
}
.sidebar-article-item:last-child { border-bottom: none; }
.sidebar-article-item:hover .sidebar-article-title { color: var(--brand-primary); }
.sidebar-article-title { font-size: 13px; font-weight: 600; color: var(--text-main); line-height: 1.4; }
.sidebar-article-item time { font-size: 12px; color: var(--text-soft); }

/* ═══ Footer responsive ═══════════════════════════════════ */
@media (max-width: 860px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .footer-inner { padding: 32px 0 0; }
  /* Newsletter - stacked במובייל */
  .footer-newsletter {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 22px 18px;
    margin: 0 16px 28px;
  }
  .footer-newsletter-form {
    min-width: 0;
    width: 100%;
  }
  .footer-social { padding: 18px 16px; }
  .footer-social-label { width: 100%; text-align: center; margin-bottom: 4px; }
}
@media (max-width: 540px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 24px 16px;
    padding-bottom: 24px;
  }
  /* ה-section הראשון (HotNews + טקסט) - רוחב מלא ממורכז */
  .footer-top section:first-child {
    grid-column: 1 / -1;
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .footer-top section:first-child h4 {
    display: inline-block;
  }
  /* ה-section השני (מדורים) - רוחב מלא ממורכז */
  .footer-top section:nth-child(2) {
    grid-column: 1 / -1;
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  /* ה-sections השלישי והרביעי (עמודי עומק + מערכת) - זוג שווה ממורכז */
  .footer-top section:nth-child(3),
  .footer-top section:nth-child(4) {
    text-align: center;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .footer-newsletter-text h3 { font-size: 17px; }
  .footer-newsletter-text p { font-size: 12px; }
  .footer-social-icon { width: 36px; height: 36px; }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    padding: 16px;
  }
}

/* ═══ Main layout ═══════════════════════════════════════════ */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
  padding: 12px 0 48px;
}
.content-stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.section { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-soft); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-bottom: 2px solid var(--brand-primary);
}
.section-head h2 {
  margin: 0;
  font-size: clamp(20px, 1.6vw, 26px);
  line-height: 1.15;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.4px;
}
.section-links { display: flex; gap: 12px; flex-wrap: wrap; }
.section-links a { font-size: 13px; color: var(--text-soft); text-decoration: none; }
.section-links a:hover { color: var(--brand-primary); }
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding: 16px;
}
.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
}
.panel-head h2, .panel-head h3 { font-size: 15px; font-weight: 700; margin: 0; }
.empty-state { text-align: center; padding: 40px; color: var(--text-soft); }
.pagination { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 0; }
.pagination a {
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--bg-surface);
  color: var(--text-main);
  text-decoration: none;
}
.pagination a.active,
.pagination a:hover {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}
@media (max-width: 900px) {
  .main-layout { grid-template-columns: 1fr; }
  .sidebar-stack { display: none; }
}
/* ═══ BREADCRUMB — WCAG AA compliant ══════════════════════ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: hidden;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 12px;
  min-width: 0;
}
.breadcrumb a,
.breadcrumb > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
}
.breadcrumb a {
  flex-shrink: 0;
}
.breadcrumb > span:last-child {
  flex-shrink: 1;
}
.breadcrumb a {
  color: var(--text-main);        /* #0f172a — contrast 17:1 ✅ */
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.breadcrumb a:hover,
.breadcrumb a:focus {
  color: var(--brand-primary);
  text-decoration: underline;
}
.breadcrumb a:focus {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
  border-radius: 2px;
}
.breadcrumb span[aria-hidden="true"],
.breadcrumb > span:not([aria-current]) {
  color: var(--text-soft);        /* #5b6472 — contrast 4.7:1 ✅ */
  user-select: none;
}
.breadcrumb span[aria-current="page"] {
  color: var(--text-main);        /* current page = dark */
  font-weight: 600;
}

@media (max-width: 980px) {
      .primary-nav-wrap { display: none; }
      .desktop-search { display: none; }
      .site-header-inner {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
      }
      .mobile-search-toggle,
      .burger-btn {
        display: inline-flex;
        flex: 0 0 44px;
      }
      .header-tools .chip,
      .header-tools .theme-btn { display: none; }
      .header-tools {
        gap: 8px;
        flex-wrap: nowrap;
        justify-content: flex-start;
      }
      .header-tools .chat-btn {
        padding: 10px 12px;
        font-size: 13px;
        white-space: nowrap;
      }
      .brand-title { font-size: 28px; }
      .hero-grid,
      .feature-split,
      .cards-3,
      .cards-4,
      .guide-grid,
      .profile-grid,
      .topic-grid,
      .tag-grid,
      .topic-card,
      .feature-big,
      
      .hero-main { min-height: 360px; }
      .feature-big-thumb,
      .topic-thumb { min-height: 220px; }
      .hot-strip-wrap {
        background: var(--brand-secondary);
        border-bottom: 3px solid var(--brand-accent);
      }
      .hot-strip {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px 0;
      }
      .hot-label {
        min-height: 40px;
        padding: 10px 12px;
        border-radius: 14px;
        justify-content: center;
        background: var(--brand-primary);
        color: #fff;
        font-size: 15px;
      }
      .hot-links {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        overflow: visible;
        white-space: normal;
        padding-bottom: 0;
      }
      .hot-links a {
        flex: 0 0 calc(50% - 5px);
        max-width: calc(50% - 5px);
        min-width: 0;
        min-height: 42px;
        justify-content: center;
        text-align: center;
        padding: 10px 8px;
        border-radius: 999px;
        border: 0;
        background: rgba(255,255,255,0.08);
        color: #fff;
      }
      .breaking-strip-inner {
        grid-template-columns: 1fr;
        align-items: stretch;
        padding: 10px 0 12px;
      }
      .breaking-items {
        overflow: visible;
        white-space: normal;
        flex-direction: column;
        gap: 8px;
        padding-block: 0;
      }
      .breaking-items a {
        display: block;
        padding: 10px 12px;
        border: 1px solid var(--border-color);
        border-radius: 12px;
        background: var(--bg-muted);
      }
    }

/* ── Dropdown Navigation ──────────────────────────────────── */
.nav-item {
  position: relative;
}
.nav-item .nav-arrow {
  font-size: 10px;
  margin-right: 2px;
  opacity: 0.7;
}
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 180px;
  z-index: 1000;
  padding: 6px 0;
}
.nav-dropdown a {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  color: #1e293b;
  white-space: nowrap;
  transition: background 0.15s;
}
.nav-dropdown a:hover {
  background: #f8fafc;
  color: var(--brand-primary, #c41212);
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  display: block;
}
/* מובייל */
@media (max-width: 768px) {
  .nav-dropdown {
    position: static;
    box-shadow: none;
    border: none;
    background: rgba(0,0,0,0.05);
    border-radius: 0;
  }
  .nav-item:hover .nav-dropdown {
    display: none;
  }
  .nav-item.open .nav-dropdown {
    display: block;
  }
}

/* ── Nested Dropdown (רמה 3) ──────────────────────────────── */
.nav-subitem {
  position: relative;
}
/* קישור ברמה 2 בתוך ה-dropdown */
.nav-subitem > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  transition: background 0.15s, color 0.15s;
}
/* חץ — ברור וגלוי, בצבע המותג */
.nav-subitem .nav-arrow {
  font-size: 16px;
  font-weight: 700;
  opacity: 1;
  color: var(--brand-primary, #c41212);
  transition: transform 0.15s ease, color 0.15s;
  display: inline-block;
}
/* hover: רקע על הפריט, חץ זז שמאלה, צבע מתעצם */
.nav-subitem.has-subdropdown:hover > a {
  background: #f8fafc;
  color: var(--brand-primary, #c41212);
}
.nav-subitem.has-subdropdown:hover > a .nav-arrow {
  transform: translateX(-3px);
}
/* תת-dropdown (רמה 3) — מופיע מהצד */
.nav-subdropdown {
  display: none;
  position: absolute;
  top: -6px;
  /* RTL: יוצא לשמאל של הפריט */
  right: 100%;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 180px;
  z-index: 1001;
  padding: 6px 0;
  /* רווח קטן בין ה-dropdowns */
  margin-right: 2px;
}
.nav-subdropdown a {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  color: #1e293b;
  white-space: nowrap;
  transition: background 0.15s;
}
.nav-subdropdown a:hover {
  background: #f8fafc;
  color: var(--brand-primary, #c41212);
}
.nav-subitem:hover > .nav-subdropdown,
.nav-subitem:focus-within > .nav-subdropdown {
  display: block;
}

/* מובייל — רמה 3 שטוחה עם הזחה (לא dropdown מקונן) */
@media (max-width: 768px) {
  .nav-subdropdown {
    position: static;
    box-shadow: none;
    border: none;
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0;
    display: block; /* תמיד גלוי במובייל */
  }
  .nav-subdropdown a {
    padding-right: 32px; /* הזחה כדי להבדיל מרמה 2 */
    font-size: 12px;
    opacity: 0.85;
  }
  .nav-subitem .nav-arrow {
    display: none; /* אין משמעות לחץ במובייל */
  }
}

/* ════════════════════════════════════════════════════════════
   Mobile Phone (≤720px) — התאמות מסך טלפון
   הותאם מהטמפלט המקורי
   ════════════════════════════════════════════════════════════ */
@media (max-width: 720px) {
  .container { width: min(100% - 14px, var(--container-width)); }
  .topbar { display: none; }
  .site-header-inner {
    min-height: 64px;
    padding: 10px 0;
    gap: 8px;
  }
  .brand-mark { width: 44px; height: 44px; border-radius: 14px; }
  .brand-title { font-size: 24px; }
  .brand-subtitle { display: none; }
  .header-tools .chat-btn {
    padding: 9px 10px;
    font-size: 12px;
  }
  .drawer-panel {
    width: 100%;
    border-radius: 0;
  }
  .hot-links {
    gap: 10px;
  }
  .hot-links a {
    flex-basis: calc(50% - 5px);
    max-width: calc(50% - 5px);
  }
  /* hero-main h1 ו-.section-head h2 מוגדרים ב-home.css עם media queries תקינים */
  .section-head { padding: 14px; }
  .hero-content,
  .widget-body,
  .cards-3,
  .cards-4,
  .guide-grid,
  .profile-grid,
  .topic-grid,
  .tag-grid,
  .feature-split,
  .hero-grid { padding: 14px; }
  .list-item { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════
   Tablet/Mobile (≤980px) — selectors שחסרו ביחס לטמפלט
   ════════════════════════════════════════════════════════════ */
@media (max-width: 980px) {
  .hero-grid,
  .feature-split,
  .cards-3,
  .cards-4,
  .guide-grid,
  .profile-grid,
  .topic-grid,
  .tag-grid,
  .topic-card,
  .feature-big {
    grid-template-columns: 1fr;
  }
  .hero-main { min-height: 360px; }
}

/* במובייל - שם הכתבה בפירורי לחם בקיצור (6-8 אותיות + ...) */
@media (max-width: 720px) {
  .breadcrumb {
    font-size: 12px;
  }
  .breadcrumb > span:last-child {
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
  }
}

/* ─── Skip Link - נגישות ─── */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
  z-index: 99999;
  text-decoration: none;
}
.skip-link:focus {
  position: fixed;
  top: 8px;
  right: 50%;
  transform: translateX(50%);
  width: auto;
  height: auto;
  padding: 10px 18px;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: var(--brand-primary);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  border-radius: 8px;
  outline: 3px solid #fff;
  outline-offset: 2px;
}
:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
  border-radius: 3px;
}
