@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700;800&display=swap');

/* ============================================================
   יוצרים תוכן — Header & Footer
   קובץ: header-footer.css
   ============================================================ */

/* ── משתנים ── */
:root {
  --cil-red:        #e8001c;
  --cil-red-dark:   #c0001a;
  --cil-black:      #1a1a1a;
  --cil-gray-dark:  #111111;
  --cil-gray-mid:   #888888;
  --cil-gray-light: #f5f5f5;
  --cil-border:     #e8e8e8;
  --cil-font:       'Heebo', -apple-system, Arial, sans-serif;
  --cil-header-h:   70px;
  --cil-top-h:      40px;
}

/* ── Reset בסיסי ── */
#cil-header *,
#cil-footer * {
  box-sizing: border-box;
}

/* ביטול highlight ורוד של דפדפן מובייל — חייב להיות על כל element בנפרד */
#cil-header *:not(input):not(textarea) {
  -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
  -webkit-touch-callout: none;
}

#cil-header button,
#cil-header a {
  outline: none;
}

/* מניעת סימון טקסט בלחיצה ארוכה */
.cil-nav-grid a,
.cil-mobile-cta,
.cil-hamburger {
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
}

/* ביטול :focus שמחשיך אלמנטים בלחיצה ארוכה */
.cil-nav-grid a:focus,
.cil-nav-grid a:focus-visible,
.cil-mobile-cta:focus,
.cil-mobile-cta:focus-visible,
.cil-hamburger:focus,
.cil-hamburger:focus-visible {
  outline: none;
  background: inherit;
  color: inherit;
}

/* ביטול :focus-visible שמחשיך רקע בלחיצה ארוכה */
.cil-nav-grid a:focus,
.cil-nav-grid a:focus-visible,
.cil-mobile-cta:focus,
.cil-mobile-cta:focus-visible,
.cil-hamburger:focus,
.cil-hamburger:focus-visible {
  outline: none;
  background: inherit;
  color: inherit;
}

/* ================================================================
   HEADER
   ================================================================ */

#cil-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, #0f2a47 0%, #315b89 50%, #0f2a47 100%);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-family: var(--cil-font);
  direction: rtl;
}

/* ── סרגל עליון ── */
.cil-header-top {
  background: rgba(0,0,0,0.25);
  height: var(--cil-top-h);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  overflow: hidden;
}

/* ── טיקר ── */
.cil-ticker-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  overflow: hidden;
  min-width: 0;
  max-width: calc(100% - 180px);
}

.cil-ticker {
  overflow: hidden;
  flex: 1;
  min-width: 0;
  direction: ltr;
}

.cil-ticker-inner {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: cil-ticker-scroll 120s linear infinite;
}

@keyframes cil-ticker-scroll {
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.cil-ticker-item {
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 0 20px;
  white-space: nowrap;
  transition: color 0.15s;
  flex-shrink: 0;
  unicode-bidi: embed;
  direction: rtl;
}

.cil-ticker-item:hover { color: #ffffff; }

.cil-ticker-dot {
  color: var(--cil-red);
  font-size: 8px;
  flex-shrink: 0;
  opacity: 0.7;
}

.cil-ticker-new {
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ── סוציאל עליון ── */
.cil-social-top {
  display: flex;
  gap: 16px;
  align-items: center;
}

.cil-social-top a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.15s;
  display: flex;
  align-items: center;
}

.cil-social-top a:hover { color: #ffffff; }

/* ── שורת header ראשית ── */
.cil-header-main {
  height: var(--cil-header-h);
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* ── לוגו ── */
.cil-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.cil-logo img {
  width: auto !important;
  height: 48px !important;
  border-radius: 0 !important;
  object-fit: contain !important;
  display: block !important;
  max-width: unset !important;
}

/* ── ניווט ראשי (דסקטופ) ── */
.cil-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
  direction: rtl;
}

.cil-nav > a,
#cil-header .cil-nav > a,
#cil-header .cil-nav a {
  font-size: 16px;
  font-weight: 700;
  color: rgba(255,255,255,0.85) !important;
  text-decoration: none !important;
  padding: 8px 14px;
  border-radius: 7px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#cil-header .cil-nav > a:hover,
#cil-header .cil-nav-grid a:hover,
.cil-nav > a:hover {
  background: rgba(255,255,255,0.12) !important;
  color: #ffffff !important;
}

#cil-header .cil-nav > a.active,
.cil-nav > a.active {
  color: #ffffff !important;
  font-weight: 600;
  background: rgba(255,255,255,0.15);
}

/* ── אזור פעולות ── */
.cil-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cil-search-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 8px;
  transition: background 0.15s;
}

.cil-search-btn:hover {
  background: rgba(255,255,255,0.15);
}

.cil-search-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.cil-cta {
  background: var(--cil-red);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cil-cta:hover {
  background: var(--cil-red-dark);
  color: #ffffff;
}

/* ── המבורגר — מוסתר בדסקטופ ── */
.cil-hamburger {
  display: none;
}

/* ── מוסתר בדסקטופ ── */
#cil-header .cil-mobile-only {
  display: none;
}

.cil-mobile-cta-wrap {
  display: none;
}

#cil-header .cil-nav-advertise {
  display: none !important;
}

/* ── שורת חיפוש ── */
.cil-search-bar {
  padding: 10px 24px;
  border-top: 1px solid var(--cil-border);
  background: var(--cil-gray-light);
}

.cil-search-bar[hidden] { display: none; }

.cil-search-bar .search-form {
  display: flex;
  gap: 8px;
  max-width: 600px;
  margin: 0 auto;
}

.cil-search-bar input[type="search"] {
  flex: 1;
  padding: 8px 14px;
  border: 1px solid var(--cil-border);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--cil-font);
  direction: rtl;
  outline: none;
}

.cil-search-bar input[type="search"]:focus {
  border-color: var(--cil-red);
}

.cil-search-bar button[type="submit"] {
  padding: 8px 16px;
  background: var(--cil-red);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

/* ================================================================
   FOOTER
   ================================================================ */

#cil-footer {
  background: #080f1a;
  color: #cccccc;
  font-family: var(--cil-font);
  direction: rtl;
}

/* ── שורת מותג עליונה ── */
.cil-footer-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 28px 40px 24px;
  max-width: 1196px;
  margin-left: auto;
  margin-right: auto;
}

.cil-footer-brand-line {
  border-top: 1px solid #111d2a;
  margin: 0;
}

.cil-footer-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.cil-footer-logo img {
  width: 180px;
  height: 45px;
  border-radius: 0;
  object-fit: contain;
  display: block;
}

.cil-footer-brand-sep {
  width: 1px;
  height: 28px;
  background: #1a2a3a;
  flex-shrink: 0;
}

.cil-footer-tagline {
  font-size: 20px;
  font-weight: 600;
  color: #8a9aaa;
  margin: 0;
  letter-spacing: 0.01em;
}

/* ── עמודות קישורים ── */
.cil-footer-top {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  padding: 32px 40px 28px;
  max-width: 1196px;
  margin-left: auto;
  margin-right: auto;
}

.cil-footer-top-wrapper {
  border-bottom: 1px solid #111d2a;
}

.cil-footer-top-sep {
  border-top: 1px solid #111d2a;
  margin: 0;
}

.cil-footer-col h3 {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0.7;
  white-space: nowrap;
}

.cil-footer-col nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cil-footer-col a {
  font-size: 12.5px;
  color: #6a7a8a;
  text-decoration: none;
  padding: 3px 0;
  transition: color 0.15s;
  white-space: nowrap;
}

.cil-footer-col a:hover { color: #ffffff; }

/* ── שורת סושיאל ── */
.cil-footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 40px;
  border-bottom: 1px solid #111d2a;
}

.cil-footer-social a {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #1a2535;
  background: #0d1825;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6a7a8a;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.cil-footer-social a[aria-label="YouTube"]:hover    { background: #FF0000; border-color: #FF0000; color: #fff; }
.cil-footer-social a[aria-label="Instagram"]:hover  { background: #E4405F; border-color: #E4405F; color: #fff; }
.cil-footer-social a[aria-label="Facebook"]:hover   { background: #1877F2; border-color: #1877F2; color: #fff; }
.cil-footer-social a[aria-label="TikTok"]:hover     { background: #010101; border-color: #69C9D0; color: #fff; }
.cil-footer-social a[aria-label="LinkedIn"]:hover   { background: #0A66C2; border-color: #0A66C2; color: #fff; }
.cil-footer-social a[aria-label="WhatsApp"]:hover   { background: #25D366; border-color: #25D366; color: #fff; }
.cil-footer-social a[aria-label="Telegram"]:hover   { background: #26A5E4; border-color: #26A5E4; color: #fff; }
.cil-footer-social a[aria-label="X (Twitter)"]:hover { background: #000000; border-color: #555; color: #fff; }

/* ── תחתית ── */
.cil-footer-bottom {
  padding: 14px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cil-copyright {
  font-size: 11.5px;
  color: #3a4a5a;
}

.cil-footer-legal {
  display: flex;
  gap: 12px;
  align-items: center;
}

.cil-footer-legal-sep {
  color: #3a4a5a;
  font-size: 11px;
}

.cil-footer-legal a {
  font-size: 11.5px;
  color: #3a4a5a;
  text-decoration: none;
  transition: color 0.15s;
}

.cil-footer-legal a:hover { color: #667788; }

/* ================================================================
   RESPONSIVE — מובייל
   ================================================================ */

@media (max-width: 768px) {

  /* ── סרגל עליון ── */
  .cil-header-top {
    height: 32px;
    padding: 0 12px;
  }

  .cil-social-top { display: none; }

  .cil-ticker-wrap { max-width: 100%; }

  /* ── שורה ראשית ── */
  .cil-header-main {
    padding: 0 12px;
    height: 58px;
    position: relative;
  }

  /* המבורגר — ימין */
  .cil-hamburger {
    display: flex;
    order: 1;
    width: 40px;
    height: 40px;
    background: transparent !important;
    border: none;
    color: #ffffff !important;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
    outline: none !important;
    transition: none;
  }

  .cil-hamburger:hover,
  .cil-hamburger:active,
  .cil-hamburger:focus,
  .cil-hamburger:focus-visible {
    background: transparent !important;
    color: #ffffff !important;
    outline: none !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
  }

  /* לוגו — מרכז */
  .cil-logo {
    order: 2;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .cil-logo img { height: 34px !important; }

  /* חיפוש — שמאל */
  .cil-header-actions {
    order: 3;
    margin-right: auto;
  }

  .cil-cta { display: none; }

  /* ── תפריט מובייל ── */
  .cil-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: #0f2a47;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 16px 14px;
    flex-direction: column;
    gap: 12px;
    z-index: 999;
  }

  .cil-nav.is-open { display: flex; }

  /* גריד 2 עמודות */
  .cil-nav-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
  }

  .cil-nav-grid a {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 18px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: rgba(255,255,255,0.95);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    min-height: 90px;
    transition: background 0.1s, transform 0.1s;
  }

  .cil-nav-grid a:hover {
    background: rgba(255,255,255,0.12);
  }

  .cil-nav-grid a:active,
  .cil-nav-grid a.is-pressed {
    transform: scale(0.97);
    background: rgba(255,255,255,0.18) !important;
    color: rgba(255,255,255,0.95) !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
  }

  /* ביטול כל אפקט focus על כפתורי הגריד */
  .cil-nav-grid a:focus,
  .cil-nav-grid a:focus-visible,
  .cil-nav-grid a:focus-within {
    outline: none !important;
    box-shadow: none !important;
    color: rgba(255,255,255,0.95) !important;
    background: rgba(255,255,255,0.06) !important;
  }

  .cil-nav-grid a:focus svg,
  .cil-nav-grid a:focus-visible svg,
  .cil-nav-grid a:active svg {
    outline: none !important;
    box-shadow: none !important;
    color: rgba(255,255,255,0.95) !important;
    stroke: rgba(255,255,255,0.95) !important;
  }

  .cil-nav-grid a:focus *,
  .cil-nav-grid a:focus-visible *,
  .cil-nav-grid a:active * {
    color: rgba(255,255,255,0.95) !important;
    outline: none !important;
  }

  /* ביטול focus על צור קשר ופרסמו אצלנו */
  .cil-mobile-cta:focus,
  .cil-mobile-cta:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    color: rgba(255,255,255,0.9) !important;
  }

  .cil-mobile-cta--red:focus,
  .cil-mobile-cta--red:focus-visible {
    color: #ffffff !important;
    background: var(--cil-red) !important;
  }

  .cil-nav-grid a svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
  }

  /* ── כפתורי CTA ── */
  .cil-mobile-cta-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  #cil-header .cil-mobile-only { display: flex; }

  /* פרסמו אצלנו — כפתור גריד אדום */
  .cil-nav-advertise {
    background: var(--cil-red) !important;
    border: 1px solid var(--cil-red) !important;
    border-radius: 12px;
    padding: 18px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    min-height: 90px;
    user-select: none;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    transition: background 0.1s, transform 0.1s;
  }

  .cil-nav-advertise:active,
  .cil-nav-advertise.is-pressed {
    background: #c8001a !important;
    transform: scale(0.97);
    color: #ffffff !important;
  }

  .cil-nav-advertise svg {
    width: 28px;
    height: 28px;
  }

  /* Override grid default for advertise */
  .cil-nav-grid a.cil-nav-advertise,
  #cil-header .cil-nav-grid a.cil-nav-advertise {
    background: var(--cil-red) !important;
    border-color: var(--cil-red) !important;
    color: #ffffff !important;
    display: flex !important;
  }

  .cil-nav-grid a.cil-nav-advertise:active,
  .cil-nav-grid a.cil-nav-advertise.is-pressed,
  #cil-header .cil-nav-grid a.cil-nav-advertise:active,
  #cil-header .cil-nav-grid a.cil-nav-advertise.is-pressed {
    background: #c8001a !important;
    border-color: #c8001a !important;
    color: #ffffff !important;
    transform: scale(0.97);
  }

  .cil-mobile-cta {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.9) !important;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
    transition: transform 0.1s;
  }

  .cil-mobile-cta:active,
  .cil-mobile-cta.is-pressed {
    transform: scale(0.97);
    background: rgba(255,255,255,0.18) !important;
    color: rgba(255,255,255,0.9) !important;
  }

  /* "פרסמו אצלנו" — אדום */
  .cil-mobile-cta--red {
    background: var(--cil-red);
    border-color: var(--cil-red);
    color: #ffffff;
  }

  .cil-mobile-cta--red:hover {
    background: var(--cil-red-dark);
    border-color: var(--cil-red-dark);
    color: #ffffff;
  }

  .cil-mobile-cta--red:active,
  .cil-mobile-cta--red.is-pressed {
    background: #c8001a !important;
    border-color: #c8001a !important;
    color: #ffffff !important;
    transform: scale(0.97);
  }

  /* ── Footer מובייל ── */
  .cil-footer-brand-row {
    flex-direction: column;
    gap: 12px;
    padding: 24px 20px;
    text-align: center;
  }

  .cil-footer-brand-sep { display: none; }

  .cil-footer-logo img {
    width: 150px;
    height: 38px;
  }

  .cil-footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 24px 16px;
    padding: 24px 20px;
  }

  .cil-footer-social {
    padding: 16px 20px;
    gap: 7px;
    flex-wrap: wrap;
  }

  .cil-footer-bottom {
    padding: 14px 20px;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
  }

  .cil-footer-legal {
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
  }

  .cil-footer-legal-sep { display: none; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .cil-nav > a {
    font-size: 12.5px;
    padding: 6px 8px;
  }

  .cil-footer-top {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}