/* ════════════════════════════════════════════════════
   MyOfaqim.co.il - Site-wide Styles
   ════════════════════════════════════════════════════ */

:root {
  /* === צבעים מהלוגו === */
  --navy: #1A2E5C;          /* "אופקים" — כחול כהה ראשי */
  --navy-700: #243B6E;
  --navy-600: #2E4A82;
  --navy-dark: #0F2657;

  --blue: #2563EB;          /* "שלי" + בניינים + לוגו טקסט */
  --blue-light: #3B82F6;
  --blue-soft: #EBF2FE;     /* רקע רך כחלחל */

  --orange: #F59E0B;        /* שמש + כרטיס + לבבון */
  --orange-dk: #D97706;
  --orange-light: #FBBF24;
  --orange-soft: #FEF3E8;   /* רקע רך כתום */

  --green: #65A30D;         /* עץ + גבעה */
  --green-light: #84CC16;

  --cream: #FBFAF7;
  --cream-warm: #FEF3E8;
  --paper: #FFFFFF;

  --ink: #1A1A1A;
  --ink-soft: #4A4A4A;
  --ink-mute: #8A8A8A;
  --line: #E5E7EB;
  --line-soft: #F1F2F4;

  --red: #DC2626;

  /* === תאימות לאחור (אליאסים) === */
  --gold: var(--orange);    /* קוד ישן עדיין משתמש ב-gold */
  --gold-dk: var(--orange-dk);

  --serif: 'Heebo', system-ui, -apple-system, sans-serif;
  --sans: 'Heebo', system-ui, -apple-system, sans-serif;
  --brand: 'Heebo', 'Rubik', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* רקע השורש בצבע הפוטר (נייבי) — כך אזור ה"גלילת יתר" (overscroll) בתחתית
   המסך ב-iOS לא מציג לבן/קרם אינסופי מתחת לפוטר אלא ממשיך את צבע הפוטר. */
html { scroll-behavior: smooth; background: var(--navy); }
/* מניעת גלישה אופקית במובייל (שגרמה למודאל/תצוגות צפות "לברוח" ימינה ב-iOS).
   overflow-x: clip לא יוצר scroll-container ולכן לא שובר position: sticky. */
html, body { overflow-x: clip; max-width: 100%; }
body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { text-decoration: none; color: inherit; }
button { font-family: var(--sans); cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }

/* ── Container ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .container { padding: 0 18px; } }

/* ═══════════════ HEADER ═══════════════ */
.site-header {
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(12px);
}

/* Reserve the header's height before it is injected by JS, so the page doesn't
   jump downward on load (cumulative layout shift). Matches topbar + header-main. */
#header-placeholder { min-height: 136px; display: block; }
@media (max-width: 560px) { #header-placeholder { min-height: 124px; } }

/* TopBar styles moved inline to site.js for cache-busting */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.header-main { padding: 12px 0; display: flex; align-items: center; justify-content: space-between; gap: 30px; }

.brand { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.brand-logo-img {
  height: 64px;
  width: auto;
  flex-shrink: 0;
}
.brand-mark {
  font-family: 'Heebo', sans-serif;
  font-weight: 900;
  font-size: 32px;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1;
}
.brand-mark .accent {
  color: var(--blue);
  font-style: normal;
  font-weight: 900;
}
.brand-sub {
  font-size: 11px;
  color: var(--blue);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  margin-top: 4px;
  direction: ltr;
}
@media (max-width: 560px) {
  .header-main { padding: 8px 0; }
  .brand-logo-img { height: 56px; }
  .brand-mark { font-size: 24px; }
  .brand-sub { font-size: 10px; letter-spacing: 1.5px; }
}

/* ── Navigation ── */
.main-nav { display: flex; gap: 32px; flex: 1; justify-content: center; }
.nav-item { position: relative; }
.nav-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 28px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: color .15s;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 18px;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width .25s ease;
}
.nav-item:hover .nav-link { color: var(--navy); }
.nav-item:hover .nav-link::after { width: 100%; }
.nav-link svg { width: 10px; height: 10px; opacity: 0.5; transition: transform .2s; }
.nav-item:hover .nav-link svg { transform: rotate(180deg); }

.nav-dropdown {
  position: absolute;
  top: 100%;
  right: -20px;
  min-width: 240px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 16px 48px rgba(13,27,62,0.12);
  padding: 14px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all .2s ease;
  pointer-events: none;
  z-index: 50;
}
.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
  transition: all .15s;
  border-right: 2px solid transparent;
}
.nav-dropdown a:hover {
  background: var(--cream-warm);
  color: var(--gold-dk);
  border-right-color: var(--gold);
}
.nav-dropdown a.featured { color: var(--navy); font-weight: 700; }
.nav-dropdown .nav-divider { height: 1px; background: var(--line-soft); margin: 8px 16px; }
.nav-dropdown .nav-label { padding: 6px 22px 2px; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-mute); font-weight: 700; }

.header-actions { display: flex; gap: 12px; align-items: center; flex-shrink: 0; }
.header-search-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy);
  border: 1.5px solid var(--line);
  border-radius: 2px;
  transition: all .2s;
}
.header-search-btn:hover { border-color: var(--navy); background: var(--navy); color: var(--cream); }

/* ── Buttons ── */
.btn-outline { padding: 10px 20px; border: 1.5px solid var(--navy); color: var(--navy); font-size: 14px; font-weight: 700; border-radius: 2px; transition: all .2s; background: transparent; display: inline-block; }
.btn-outline:hover { background: var(--navy); color: var(--cream); }
.btn-filled { padding: 10px 20px; background: var(--navy); color: var(--cream); font-size: 14px; font-weight: 700; border-radius: 2px; transition: background .2s; display: inline-block; }
.btn-filled:hover { background: var(--navy-700); }
.btn-gold { padding: 10px 22px; background: var(--gold); color: var(--navy); font-size: 14px; font-weight: 800; border-radius: 2px; transition: background .2s; display: inline-block; cursor: pointer; border: none; font-family: var(--sans); }
.btn-gold:hover { background: var(--gold-dk); color: var(--paper); }
.btn-outline-light { padding: 10px 20px; border: 1.5px solid rgba(255,255,255,0.4); color: var(--cream); font-weight: 700; transition: all .2s; border-radius: 2px; background: transparent; }
.btn-outline-light:hover { border-color: var(--cream); background: rgba(255,255,255,0.06); }

/* ── Mobile menu ── */
.mobile-toggle {
  display: none;
  width: 36px; height: 36px;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 0;
}
.mobile-toggle span { display: block; height: 2px; background: var(--navy); transition: all .25s; }

@media (max-width: 1100px) {
  .main-nav { display: none; }
  .header-search-btn { display: none; }
  .mobile-toggle { display: flex; }
}
@media (max-width: 720px) {
  .header-actions .btn-filled,
  .header-actions .btn-outline { display: none; }
}

.mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(13,27,62,0.5); z-index: 999; }
.mobile-overlay.active { display: block; }
.mobile-drawer {
  display: none;
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 85%; max-width: 360px;
  background: var(--paper);
  box-shadow: -8px 0 32px rgba(0,0,0,0.18);
  z-index: 1000;
  padding: 24px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .3s ease;
}
.mobile-drawer.open { display: block; transform: translateX(0); }
.mobile-drawer-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 28px; padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.mobile-drawer-close { width: 32px; height: 32px; font-size: 24px; color: var(--ink-soft); line-height: 1; }
.mobile-drawer nav .mobile-main {
  display: block; padding: 14px 0;
  font-size: 16px; font-weight: 700; color: var(--navy);
  border-bottom: 1px solid var(--line-soft);
}
.mobile-section { border-bottom: 1px solid var(--line-soft); }
.mobile-section summary {
  padding: 14px 0;
  font-size: 16px; font-weight: 600; color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  user-select: none;
}
.mobile-section summary::-webkit-details-marker { display: none; }
.mobile-section summary .arrow { font-size: 18px; font-weight: 300; color: var(--ink-mute); transition: transform .2s; }
.mobile-section[open] summary { color: var(--gold-dk); }
.mobile-section[open] .arrow { transform: rotate(45deg); }
.mobile-sub { padding: 0 14px 14px; }
.mobile-sub a { display: block; padding: 9px 0; font-size: 14px; color: var(--ink-soft); font-weight: 500; }
.mobile-sub a:hover { color: var(--gold-dk); }
.mobile-drawer-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }

/* ═══════════════ PAGE HERO ═══════════════ */
.page-hero {
  background: var(--paper);
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  border: 1px solid var(--line);
  border-radius: 50%;
  opacity: 0.5;
  pointer-events: none;
}
.page-hero .breadcrumb {
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 1px;
  margin-bottom: 14px;
  text-transform: uppercase;
  font-weight: 700;
  position: relative;
}
.page-hero .breadcrumb a { color: var(--ink-mute); transition: color .15s; }
.page-hero .breadcrumb a:hover { color: var(--gold-dk); }
.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 14px;
  position: relative;
}
.page-hero h1 em { font-style: normal; color: var(--blue); font-weight: 900; }
.page-hero p { font-size: 17px; color: var(--ink-soft); max-width: 640px; line-height: 1.7; position: relative; }

/* ── Page main ── */
.page-main { padding: 48px 0 80px; }

/* ── Loader ── */
.loader { text-align: center; padding: 60px 20px; color: var(--ink-mute); font-size: 14px; }

/* ═══════════════ MODAL (משותף) ═══════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,27,62,0.7);
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  overflow-x: hidden;
  backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--paper);
  max-width: 620px;
  width: 100%;
  margin: 20px auto;
  border: 1px solid var(--line);
  box-shadow: 0 32px 80px rgba(0,0,0,0.25);
}
.modal-head {
  padding: 24px 32px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--cream-warm);
  position: sticky;
  top: 0;
  z-index: 2;
}
.modal-head h2 { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--navy); }
.modal-close { width: 32px; height: 32px; font-size: 24px; color: var(--ink-soft); line-height: 1; background: none; border: none; cursor: pointer; }
.modal-body { padding: 28px 32px 32px; }
.field-group { margin-bottom: 20px; }
.field-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.field-group input,
.field-group select,
.field-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  font-size: 15px;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  outline: none;
  transition: border-color .2s;
  border-radius: 2px;
}
.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus { border-color: var(--navy); }
.field-group textarea { min-height: 120px; resize: vertical; line-height: 1.65; }
.modal-err {
  background: rgba(192,57,43,0.06);
  border: 1px solid rgba(192,57,43,0.2);
  color: var(--red);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
  display: none;
  border-radius: 2px;
}
.modal-err.show { display: block; }
.modal-actions { display: flex; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line-soft); margin-top: 24px; }
.modal-cancel {
  flex: 1;
  padding: 13px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  font-weight: 600;
  color: var(--ink-soft);
  font-family: var(--sans);
  cursor: pointer;
  font-size: 14px;
  border-radius: 2px;
  transition: all .15s;
}
.modal-cancel:hover { border-color: var(--ink-soft); color: var(--ink); }
.modal-submit {
  flex: 2;
  padding: 13px;
  background: var(--navy);
  color: var(--cream);
  font-weight: 700;
  font-family: var(--sans);
  cursor: pointer;
  font-size: 14px;
  border: none;
  border-radius: 2px;
  letter-spacing: 0.5px;
  transition: background .2s;
}
.modal-submit:hover { background: var(--navy-700); }
.modal-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* ═══════════════ FOOTER ═══════════════ */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 0;
  border-top: 4px solid var(--orange);
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 3fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-menu {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px 40px;
}
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-menu { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .footer-menu { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  /* פוטר קומפקטי במובייל — 2 עמודות במקום ערימה ארוכה אחת, ופחות ריווח מיותר */
  .footer-menu { grid-template-columns: 1fr 1fr; gap: 22px 18px; }
  .site-footer { padding-top: 40px; margin-top: 48px; }
  .footer-grid { margin-bottom: 28px; gap: 28px; }
  .footer-col h5 { margin-bottom: 12px; padding-bottom: 8px; letter-spacing: 1px; }
  .footer-col li { margin-bottom: 8px; }
  .footer-bottom { padding: 18px 0; }
}

.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.footer-logo-img {
  height: 56px;
  width: auto;
  flex-shrink: 0;
  background: #fff;
  border-radius: 12px;
  padding: 4px;
}
.footer-brand .brand-mark {
  color: var(--cream);
  font-size: 26px;
  font-family: 'Heebo', sans-serif;
}
.footer-brand .brand-mark .accent {
  color: #60A5FA;
  font-style: normal;
  font-weight: 900;
}
.footer-brand p { margin-top: 16px; line-height: 1.8; font-size: 14px; max-width: 320px; }
.footer-social { display: flex; gap: 12px; margin-top: 22px; }
.footer-social a {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  transition: all .2s;
}
.footer-social a:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

.footer-col h5 {
  color: var(--cream);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 11px; }
.footer-col a { font-size: 14px; color: rgba(255,255,255,0.7); transition: color .15s; }
.footer-col a:hover { color: var(--gold); }
.footer-contact { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-contact a { display: inline-flex; align-items: center; gap: 8px; }
.footer-contact a svg { opacity: 0.6; flex-shrink: 0; }
.footer-contact a:hover svg { opacity: 1; color: var(--gold); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.5px;
}
.footer-bottom .legal { display: flex; gap: 20px; }

/* ═══════════════ SHABBAT MODE ═══════════════ */
.shabbat-mode {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, #0A1530 0%, #14254D 60%, #0D1B3E 100%);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  overflow: hidden;
}
.shabbat-mode.active { display: flex; }
.shabbat-stars { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.star {
  position: absolute;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0.6;
  animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 0.9; transform: scale(1.2); }
}
.shabbat-content { position: relative; max-width: 720px; width: 100%; text-align: center; color: var(--cream); padding: 40px 30px; }
.shabbat-frame {
  border: 1px solid rgba(200,169,94,0.3);
  padding: 50px 40px;
  position: relative;
  background: rgba(13,27,62,0.4);
  backdrop-filter: blur(6px);
}
.shabbat-frame::before, .shabbat-frame::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--gold);
}
.shabbat-frame::before { top: -2px; right: -2px; border-bottom: none; border-left: none; }
.shabbat-frame::after { bottom: -2px; left: -2px; border-top: none; border-right: none; }
.shabbat-greeting {
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 20px;
  font-weight: 700;
}
.shabbat-title {
  font-family: var(--serif);
  font-size: clamp(54px, 9vw, 96px);
  font-weight: 900;
  color: var(--cream);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  text-shadow: 0 4px 30px rgba(200,169,94,0.3);
}
.shabbat-title em {
  display: block;
  font-style: italic;
  font-weight: 500;
  color: var(--gold);
  font-size: 0.7em;
  margin-top: 8px;
}
.shabbat-divider {
  width: 80px;
  height: 1px;
  background: var(--gold);
  margin: 28px auto;
  position: relative;
}
.shabbat-divider::before {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
  top: -4px;
  right: 50%;
  margin-right: -4px;
}
.shabbat-verse {
  font-family: var(--serif);
  font-size: clamp(18px, 2.4vw, 24px);
  font-style: italic;
  color: rgba(255,255,255,0.85);
  max-width: 540px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.shabbat-verse-source {
  display: block;
  font-style: normal;
  font-size: 13px;
  color: var(--gold);
  margin-top: 12px;
  letter-spacing: 2px;
}
.shabbat-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(200,169,94,0.2);
  margin: 36px 0 30px;
  border: 1px solid rgba(200,169,94,0.2);
}
@media (max-width: 480px) { .shabbat-info { grid-template-columns: 1fr; } }
.shabbat-info-item { background: rgba(13,27,62,0.6); padding: 22px 18px; }
.shabbat-info-lbl { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: rgba(200,169,94,0.8); margin-bottom: 8px; font-weight: 700; }
.shabbat-info-val { font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--cream); direction: ltr; }
.shabbat-message { font-size: 14px; color: rgba(255,255,255,0.6); line-height: 1.8; max-width: 460px; margin: 0 auto; }
.shabbat-bottom { margin-top: 40px; font-family: var(--serif); font-size: 22px; font-style: italic; color: var(--gold); letter-spacing: 1px; }

/* ═══════════════ COMMON PATTERNS ═══════════════ */

/* Empty state */
.empty {
  text-align: center;
  padding: 80px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.empty h3 { font-family: var(--serif); font-size: 24px; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.empty p { color: var(--ink-mute); font-size: 14px; }

/* Section heads */
.section-head { text-align: center; margin-bottom: 48px; }
.section-head .eyebrow {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-dk);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 14px;
}
.section-head h2 em { font-style: normal; color: var(--blue); font-weight: 900; }
.section-head p { max-width: 600px; margin: 0 auto; color: var(--ink-soft); font-size: 16px; line-height: 1.7; }

/* ════════════════════════════════════════════════════
   🎨 דפי תוכן - עיצוב אחיד גלובלי (v2)
   ════════════════════════════════════════════════════ */

/* ─── page-main wrapper ─── */
.page-main {
  padding: 50px 0 80px;
  background: var(--cream);
  min-height: 60vh;
}
@media (max-width: 720px) {
  .page-main { padding: 30px 0 60px; }
}

/* ─── Search box (אחיד) ─── */
.search-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: end;
  box-shadow: 0 4px 14px rgba(13,27,62,0.04);
}
.search-input {
  width: 100%;
  padding: 13px 18px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 14px;
  background: var(--cream);
  transition: all .15s;
}
.search-input:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--paper);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.search-btn {
  padding: 13px 28px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: var(--paper);
  font-size: 14px;
  font-weight: 800;
  border-radius: 10px;
  cursor: pointer;
  transition: all .15s;
  font-family: var(--sans);
  border: none;
  white-space: nowrap;
}
.search-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(26,46,92,0.25); }
@media (max-width: 600px) {
  .search-box { grid-template-columns: 1fr; padding: 16px 18px; }
  .search-btn { width: 100%; padding: 12px; }
}

/* ─── Category chips (אחיד) ─── */
.cat-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 18px;
  margin-bottom: 8px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.cat-bar::-webkit-scrollbar { height: 6px; }
.cat-bar::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.cat-chip {
  padding: 10px 18px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: var(--sans);
  white-space: nowrap;
  transition: all .15s;
}
.cat-chip:hover { border-color: var(--blue); color: var(--blue); }
.cat-chip.active {
  background: var(--navy);
  color: var(--paper);
  border-color: var(--navy);
  box-shadow: 0 4px 12px rgba(26,46,92,0.2);
}

/* ─── Content grid (אחיד לכל הדפים) ─── */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 10px;
}
@media (max-width: 480px) {
  .content-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* ─── Universal Content Card ─── */
.content-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all .25s;
  position: relative;
  overflow: hidden;
}
.content-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--blue) 100%);
  opacity: 0;
  transition: opacity .2s;
}
.content-card:hover {
  border-color: var(--blue);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(13,27,62,0.08);
}
.content-card:hover::before { opacity: 1; }

.content-card.featured {
  border: 2px solid var(--orange);
  background: linear-gradient(180deg, var(--paper) 0%, #FFFDF5 100%);
}
.content-card.featured::before {
  background: linear-gradient(90deg, var(--orange) 0%, var(--orange-light) 100%);
  opacity: 1;
}

/* Card header */
.content-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.content-card-tag {
  display: inline-block;
  background: var(--orange-soft);
  color: var(--orange-dk);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.content-card-tag.blue { background: var(--blue-soft); color: var(--blue); }
.content-card-tag.green { background: rgba(101,163,13,0.12); color: var(--green); }
.content-card-tag.gray { background: var(--line-soft); color: var(--ink-soft); }

.content-card h3 {
  font-family: var(--sans);
  font-size: 19px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 0;
}
.content-card p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.65;
  margin: 0;
}

/* Card info rows */
.card-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.card-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-info-row strong {
  color: var(--navy);
  font-weight: 700;
  min-width: 70px;
}
.card-info-row svg {
  flex-shrink: 0;
  color: var(--blue);
  width: 16px;
  height: 16px;
}

/* Card meta (sub info) */
.card-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ink-mute);
  margin: 4px 0;
}
.card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Card actions */
.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.card-btn {
  flex: 1;
  min-width: 90px;
  padding: 10px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--navy);
  transition: all .15s;
  font-family: var(--sans);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.card-btn:hover { border-color: var(--navy); background: var(--navy); color: var(--paper); }
.card-btn.primary {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: var(--paper);
  border: none;
}
.card-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(26,46,92,0.25); }
.card-btn.whatsapp {
  background: #25D366;
  color: #fff;
  border-color: #25D366;
}
.card-btn.whatsapp:hover { background: #1FAB52; border-color: #1FAB52; color: #fff; }
.card-btn.orange {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dk) 100%);
  color: var(--navy);
  border: none;
  font-weight: 800;
}

/* Time display in cards (for synagogues / prayer) */
.times-grid {
  background: var(--cream-warm);
  border-radius: 10px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}
.time-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.time-label {
  font-size: 11px;
  color: var(--ink-mute);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.time-value {
  font-size: 14px;
  color: var(--navy);
  font-weight: 800;
}

/* ─── Loading + Empty states (אחיד) ─── */
.state-loading {
  grid-column: 1 / -1;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 60px 20px;
  text-align: center;
  color: var(--ink-soft);
}
.state-loading::before {
  content: '';
  display: block;
  width: 40px;
  height: 40px;
  border: 3px solid var(--line);
  border-top-color: var(--blue);
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.state-empty {
  grid-column: 1 / -1;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 70px 20px;
  text-align: center;
}
.state-empty h3 {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 10px;
}
.state-empty p {
  color: var(--ink-soft);
  font-size: 14px;
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ─── CTA Submit Box (אחיד - "יש לכם X? צרו קשר") ─── */
.submit-cta {
  background: linear-gradient(135deg, var(--cream-warm) 0%, var(--paper) 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 32px;
  text-align: center;
  margin-top: 40px;
  box-shadow: 0 4px 14px rgba(13,27,62,0.04);
}
.submit-cta h3 {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.submit-cta p {
  color: var(--ink-soft);
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.6;
}
.submit-cta .cta-row {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.submit-cta .cta-row a {
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 13.5px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.submit-cta .btn-gold {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dk) 100%);
  color: var(--navy);
  box-shadow: 0 4px 12px rgba(245,158,11,0.25);
}
.submit-cta .btn-gold:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(245,158,11,0.35); }
.submit-cta .btn-filled {
  background: var(--navy);
  color: var(--paper);
}
.submit-cta .btn-filled:hover { background: var(--navy-700); transform: translateY(-1px); }

/* ─── Tools bar (חיפוש + מסננים בשורה אחת) ─── */
.tools-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  align-items: stretch;
}
.tools-bar .search-input { flex: 1; min-width: 220px; padding: 12px 18px; border-radius: 100px; }
.tools-bar .filter-select {
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: 100px;
  font-family: var(--sans);
  font-size: 13px;
  background: var(--paper);
  cursor: pointer;
  color: var(--navy);
  font-weight: 700;
  min-width: 140px;
}
.tools-bar .filter-select:focus { outline: none; border-color: var(--blue); }

@media (max-width: 480px) {
  .tools-bar { gap: 8px; }
  .tools-bar .search-input { min-width: 100%; }
  .tools-bar .filter-select { width: 100%; }
}

/* ─── Page result count badge ─── */
.result-count {
  font-size: 13px;
  color: var(--ink-mute);
  margin-bottom: 16px;
  font-weight: 600;
}
.result-count strong { color: var(--navy); font-weight: 800; }


/* ── Featured employers strip (jobs page) ── */
.section-eyebrow {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--navy);
  text-transform: none;
}
.employer-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  margin-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
.employer-strip::-webkit-scrollbar { height: 6px; }
.employer-strip::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.employer-chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
  max-width: 260px;
  padding: 10px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: border-color .15s, box-shadow .15s;
}
.employer-chip:hover { border-color: var(--navy); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.employer-chip.featured { border-color: var(--orange); background: linear-gradient(180deg, var(--paper) 0%, #FFFDF5 100%); }
.employer-chip .emp-logo {
  width: 44px; height: 44px; flex: 0 0 auto;
  border-radius: 6px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.employer-chip .emp-logo img { width: 100%; height: 100%; object-fit: cover; }
.employer-chip .emp-logo-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy); color: var(--cream);
  font-size: 20px; font-weight: 800;
}
.employer-chip .emp-meta { display: flex; flex-direction: column; min-width: 0; }
.employer-chip .emp-meta strong { font-size: 15px; color: var(--navy); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.employer-chip .emp-meta small { font-size: 12px; color: var(--ink-soft); }
