/*
  header.css – עיצוב הדר ותפריטים
  החלק העליון והמרכזי (טאבים, לוגו, auth) תמיד ראשי.
  מבנה: משתנים | הדר עליון + מרכזי | תפריט צדדי (דסקטופ: בזרימה ב־.page-middle; מובייל: בר אופקי + row2).
  רוחב התפריט הצדדי: --header-sidebar-width ב־:root (style.css).
*/
/* ===== משתנים ומבנה ראשי ===== */
/* הדר עליון: sticky – נצמד למעלה בגלילה; מרכז + פוטר גוללים יחד. משתני גובה ב־:root (style.css) */
.header {
  position: sticky;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
}

.header .container {
  max-width: 1400px;
  margin: 0 auto;
  padding-left: var(--space-x);
  padding-right: var(--space-x);
}

/* ===== חלק עליון (ספורט, פוקר, קזינו + שירות לקוחות, עזרה) ===== */
.header-top {
  background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 50%, #080808 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-top .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row-reverse;
  height: var(--header-top-height);
}

.header-top-right,
.header-top-buttons {
  display: flex;
  align-items: center;
  gap: 0;
  height: var(--header-top-height);
}

/* מרווחים שווים – אותו padding לכל פריט */
.header-top-right a,
.header-top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  background: none;
  border: none;
  transition: color 0.2s ease, background 0.2s ease;
  height: var(--header-top-height);
  box-sizing: border-box;
  min-width: 0;
}

/* פס צהוב תחתון לספורט/פוקר/קזינו (כמו בתפריט הצדדי אבל בתחתית) */
.header-top-btn {
  position: relative;
}

.header-top-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--accent-sport);
  transition: transform 0.2s ease;
  transform: scaleX(0);
  transform-origin: center;
}

.header-top-btn[data-submenu="sport"]::after { background: var(--accent-sport); }
.header-top-btn[data-submenu="poker"]::after { background: var(--accent-poker); }
.header-top-btn[data-submenu="casino"]::after { background: var(--accent-casino); }

.header-top-btn:hover::after,
.header-top-btn.active::after {
  transform: scaleX(1);
}

.header-top-right a {
  color: rgba(255, 255, 255, 0.5);
  gap: 6px;
}

/* אייקון מקצועי – רק שירות לקוחות ועזרה */
.header-top-right .header-top-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.85;
  color: inherit;
}

.header-top-right .header-top-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* פס הפרדה אנכי – קו בין פריטים (לא לפני הראשון): לוגי ל־RTL/LTR */
.header-top-btn:not(:first-child),
.header-top-right a:not(:first-child) {
  border-inline-start: 1px solid rgba(255, 255, 255, 0.2);
}

/* Hover – רקע וצבע על כל השטח מהפרדה להפרדה */
.header-top-right a:hover,
.header-top-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

/* נבחר – רקע מלא בין הפסים, צבע ומודגש (ספורט/פוקר/קזינו לייב) */
.header-top-btn.active {
  color: #ffffff;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.12);
}

/* ===== חלק מרכזי (לוגו + התחברות/הרשמה) ===== */
.header-main {
  background: linear-gradient(135deg, #0d3320 0%, #1a4d32 50%, #0f3d26 100%);
  border-bottom: none;
  box-shadow: none;
}

.header-main .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row-reverse;
  height: var(--header-main-height);
  gap: 16px;
}

.header-logo a {
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -1px;
  font-family: 'Arial', sans-serif;
}

/* כפתורי התחבר / הרשמה */
.header-auth {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

.header-auth-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.header-auth-icon svg {
  width: 100%;
  height: 100%;
}

.header-auth-login {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.header-auth-login:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.header-auth-register {
  color: #000000;
  background: linear-gradient(135deg, #f5c518 0%, #e6b800 100%);
  border-color: rgba(245, 197, 24, 0.5);
  box-shadow: 0 2px 6px rgba(245, 197, 24, 0.2);
}

.header-auth-register:hover {
  background: linear-gradient(135deg, #fcd34d 0%, #f5c518 100%);
  box-shadow: 0 3px 10px rgba(245, 197, 24, 0.3);
  transform: translateY(-1px);
}

/* ===== חלק תחתון – דסקטופ: תת-תפריט צדדי (top מהמשתנים למעלה) ===== */
.header-bottom {
  background: rgba(10, 10, 10, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  position: fixed;
  top: var(--header-sidebar-top);
  right: 0;
  width: var(--header-sidebar-width);
  bottom: 0;
  z-index: 999;
  margin: 0;
  padding: 0;
}

.header-bottom .container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  padding: 16px;
  max-width: none;
  box-sizing: border-box;
  margin: 0;
}

.header-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

/* תת-תפריטים – דסקטופ: אנכי, רק האחד הפעיל מוצג */
.header-subnav {
  display: none;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-subnav.is-active {
  display: flex;
}

/* כותרת בתפריט הצדדי (דסקטופ בלבד) – ריווח סימטרי */
.header-subnav-heading {
  display: block;
  padding: 12px 16px;
  margin: 0 0 6px 0;
  font-size: 16px;
  font-weight: 800;
  font-family: 'Heebo', 'Segoe UI', Arial, sans-serif;
  color: #ffffff;
  text-align: right;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  list-style: none;
  background: rgba(255, 255, 255, 0.04);
  position: relative;
}

.header-subnav-heading::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 3px;
  background: var(--accent-sport);
  border-radius: 0 2px 2px 0;
}

.header-subnav[data-submenu="sport"] .header-subnav-heading::after { background: var(--accent-sport); }
.header-subnav[data-submenu="poker"] .header-subnav-heading::after { background: var(--accent-poker); }
.header-subnav[data-submenu="casino"] .header-subnav-heading::after { background: var(--accent-casino); }

.header-subnav li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: stretch;
}

.header-subnav li:last-child {
  border-bottom: none;
}

.header-subnav li a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease, background 0.2s ease;
  position: relative;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-direction: row;
  width: 100%;
  box-sizing: border-box;
  text-align: right;
}

.header-subnav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  color: inherit;
}

.header-subnav-icon svg,
.header-subnav-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.header-subnav li a::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 3px;
  background: var(--accent-sport);
  transition: transform 0.2s ease;
  transform: scaleY(0);
  transform-origin: center;
}

.header-subnav[data-submenu="sport"] li a::after { background: var(--accent-sport); }
.header-subnav[data-submenu="poker"] li a::after { background: var(--accent-poker); }
.header-subnav[data-submenu="casino"] li a::after { background: var(--accent-casino); }

.header-subnav li a:hover,
.header-subnav li a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.header-subnav li a:hover::after,
.header-subnav li a.active::after {
  transform: scaleY(1);
}

/* פריט עם הרחבה פתוחה (כדורגל וכו') – הקו הצהוב מסומן */
.header-subnav-item-has-sub.is-open .header-subnav-parent::after {
  transform: scaleY(1);
}

/* תת-תפריט שלישי (מדינות וכו') – דסקטופ צדדי */
.header-subnav-item-has-sub {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-subnav-item-has-sub .header-subnav-parent {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  text-align: right;
}

.header-subnav-item-has-sub .header-subnav-parent:hover,
.header-subnav-item-has-sub.is-open .header-subnav-parent {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

/* מספר משחקים LIVE – הערה קטנה בצד שמאל של השורה (דסקטופ) */
.header-subnav-live-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  padding: 2px 5px;
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  flex-shrink: 0;
  margin-inline-start: auto;
}
.header-subnav-item-has-sub .header-subnav-parent:hover .header-subnav-live-count,
.header-subnav-item-has-sub.is-open .header-subnav-parent .header-subnav-live-count {
  color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.header-subsubnav {
  list-style: none;
  margin: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.header-subsubnav li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: block;
}

.header-subsubnav li:last-child {
  border-bottom: none;
}

.header-subsubnav li a {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-direction: row;
  padding: 10px 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.2s ease, background 0.2s ease;
  position: relative;
  text-align: right;
}

.header-subsubnav-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  overflow: hidden;
  border-radius: 2px;
}

.header-subsubnav-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.header-subsubnav li a::after {
  top: 0;
  bottom: 0;
  right: 0;
  width: 3px;
  height: auto;
}

.header-subsubnav li a:hover,
.header-subsubnav li a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.header-subsubnav li a:hover::after,
.header-subsubnav li a.active::after {
  transform: scaleY(1);
}

/* דסקטופ בלבד – תפריט צד, כפתור צמצום, גלילה ברשימת מדינות (פס גלילה מוסתר) */
@media (min-width: 769px) {
  .header-subnav-row2.header-subsubnav-mobile {
    display: none !important;
  }

  /* אפקט מעבר (fade) בין ספורט / פוקר / קזינו */
  .header-nav {
    position: relative;
  }
  .header-subnav[data-submenu] {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    transition: opacity 0.25s ease;
  }
  .header-subnav[data-submenu]:not(.is-active) {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow: hidden;
    max-height: 100%;
  }
  .header-subnav[data-submenu].is-active {
    position: relative;
    opacity: 1;
    visibility: visible;
  }

  .header-subnav-item-has-sub.is-open .header-subsubnav {
    max-height: min(280px, 40vh);
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }
  .header-subnav-item-has-sub.is-open .header-subsubnav::-webkit-scrollbar {
    display: none;
  }

  /* כשהתפריט בזרימה (.page-middle): הרחבה מלאה – התפריט גדל ודוחף את הפוטר, גלילה בדף */
  .page-middle .header-subnav-item-has-sub.is-open .header-subsubnav {
    max-height: 500px;
    overflow-y: visible;
  }

  /* תפריט צדדי שנותר בהדר (לפני העברה ב־JS) – fixed ומוגבל */
  .header .header-bottom {
    top: var(--header-sidebar-top);
    bottom: var(--footer-height);
    height: auto;
    max-height: none;
    overflow: hidden;
  }

  .header .header-bottom .container {
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .header .header-bottom .container::-webkit-scrollbar {
    display: none;
  }

  /*
   * תפריט צדדי בזרימה (דסקטופ – מועבר ל־.page-middle ב־JS):
   * רוחב קבוע, נמתח עד תחילת הפוטר, גלילה בדף.
   */
  /* פס הפרדה בין התפריט לתוכן – צבע לפי טאב נבחר (ספורט/פוקר/קזינו) */
  .page-middle .header-bottom {
    position: sticky;
    top: var(--header-sidebar-top);
    right: auto;
    left: auto;
    bottom: auto;
    width: var(--header-sidebar-width);
    min-width: var(--header-sidebar-width);
    align-self: stretch;
    min-height: calc(100vh - var(--header-sidebar-top) - var(--footer-height));
    max-height: none;
    flex-shrink: 0;
    z-index: 998;
    overflow: visible;
    transition: width 0.35s ease-out, min-width 0.35s ease-out, border-inline-end-color 0.25s ease;
    border-inline-end: 2px solid var(--accent-sport);
    border-top-left-radius: 14px;
    border-bottom-left-radius: 14px;
  }
  .page-middle .header-bottom[data-active-submenu="poker"] {
    border-inline-end-color: var(--accent-poker);
  }
  .page-middle .header-bottom[data-active-submenu="casino"] {
    border-inline-end-color: var(--accent-casino);
  }
  .page-middle .header-bottom[data-active-submenu="sport"] {
    border-inline-end-color: var(--accent-sport);
  }

  .page-middle .header-bottom .container {
    height: auto;
    min-height: 0;
    overflow: hidden;
    border-top-left-radius: 14px;
    border-bottom-left-radius: 14px;
    transition: padding 0.35s ease-out;
  }

  /* כפתור צמצום על פס ההפרדה – עיגול */
  .header-sidebar-toggle {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translate(-50%, -50%) rotate(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    z-index: 10;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.3);
  }
  .header-sidebar-toggle:hover {
    background: rgba(35, 35, 35, 0.98);
    color: #fff;
  }
  .header-bottom[data-active-submenu="sport"] .header-sidebar-toggle { color: var(--accent-sport); }
  .header-bottom[data-active-submenu="poker"] .header-sidebar-toggle { color: var(--accent-poker); }
  .header-bottom[data-active-submenu="casino"] .header-sidebar-toggle { color: var(--accent-casino); }
  .header-sidebar-toggle-icon {
    display: block;
    transition: transform 0.25s ease;
    /* תפריט פתוח = חץ שמאלה (צמצם), תפריט צמצום = חץ ימינה (הרחב) */
    transform: rotate(180deg);
  }
  .header-sidebar-toggle-icon svg {
    display: block;
    width: 12px;
    height: 12px;
  }

  /* מצב צמצום – רק אייקונים */
  .header-bottom.is-collapsed,
  .page-middle .header-bottom.is-collapsed {
    width: var(--header-sidebar-width-collapsed);
    min-width: var(--header-sidebar-width-collapsed);
  }
  .header-bottom.is-collapsed .container {
    padding: 8px;
  }
  .header-bottom.is-collapsed .header-sidebar-toggle-icon {
    transform: rotate(0deg);
  }
  .header-bottom.is-collapsed .header-subnav-heading {
    display: none;
  }
  .header-bottom.is-collapsed .header-subnav li a,
  .header-bottom.is-collapsed .header-subnav-item-has-sub .header-subnav-parent {
    justify-content: center;
    padding: 10px;
  }
  .header-bottom.is-collapsed .header-subnav li a span:not(.header-subnav-icon),
  .header-bottom.is-collapsed .header-subnav-item-has-sub .header-subnav-parent span:not(.header-subnav-icon) {
    display: none;
  }
  .header-bottom.is-collapsed .header-subnav-item-has-sub .header-subsubnav {
    display: none;
  }
  .header-bottom.is-collapsed .header-subnav-icon {
    margin: 0;
  }
}

/* ===== מובייל ===== */
@media (max-width: 768px) {
  .header-sidebar-toggle {
    display: none;
  }

  .header .container {
    padding-left: var(--space-x-sm);
    padding-right: var(--space-x-sm);
  }

  .header-top .container {
    height: 34px;
    direction: rtl;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-left: 0;
    padding-right: 0;
  }

  .header-top-buttons,
  .header-top-right {
    height: 34px;
  }

  .header-top-buttons {
    order: 1;
  }

  .header-top-right {
    order: 2;
  }

  .header-top-btn,
  .header-top-right a {
    padding: 0 12px;
    font-size: 12px;
    height: 34px;
  }

  .header-top-right .header-top-icon {
    width: 15px;
    height: 15px;
  }

  .header-main {
    margin-bottom: 0;
  }

  .header-main .container {
    height: 56px;
  }

  .header-logo a {
    font-size: 24px;
  }

  .header-auth {
    gap: 6px;
  }

  .header-auth-btn {
    padding: 5px 10px;
    font-size: 12px;
  }

  .header-auth-text {
    display: none;
  }

  .header-auth-icon {
    width: 18px;
    height: 18px;
  }

  /* מובייל: תת-תפריט צמוד לפס הירוק; רקע גרדיאנט */
  .header-bottom {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    height: auto;
    min-height: 62px;
    margin: 0;
    padding: 0;
    overflow: visible;
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 50%, #080808 100%);
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .header-bottom .container {
    flex-direction: row;
    justify-content: stretch;
    align-items: stretch;
    height: auto;
    min-height: 62px;
    padding: 0;
    margin: 0;
    min-width: 0;
    overflow: visible;
  }

  .header-nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    min-width: 0;
    height: auto;
    min-height: 62px;
    overflow: visible;
  }

  .header-subnav {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0;
    align-items: stretch;
    justify-content: space-evenly;
    flex: 1;
    width: 100%;
    height: 62px;
    min-height: 62px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    direction: rtl;
  }

  .header-subnav:not(.is-active) {
    display: none;
  }

  .header-subnav.is-active {
    display: flex;
  }

  .header-subnav-heading {
    display: none !important;
  }

  .header-subnav li {
    border-bottom: none;
    height: 62px;
    min-height: 62px;
    flex: 1 1 0;
    min-width: 56px;
    max-width: 100%;
    display: flex;
    align-items: stretch;
  }

  /* הפרדה – פס אנכי מלא גובה בין פריטים (לא בקצה), לוגי ל־RTL */
  .header-subnav li:not(.header-subnav-heading) + li:not(.header-subnav-heading) {
    border-inline-start: 1px solid rgba(255, 255, 255, 0.2);
  }

  /* מובייל: אייקון למעלה, טקסט + מספר LIVE באותה שורה מתחת */
  .header-subnav li a,
  .header-subnav-item-has-sub .header-subnav-parent {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 2px 4px;
    width: 100%;
    height: 100%;
    min-height: 62px;
    padding: 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.1;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    box-sizing: border-box;
    white-space: nowrap;
  }
  .header-subnav-item-has-sub .header-subnav-parent .header-subnav-live-count {
    margin-inline-start: 0;
    flex-basis: auto;
    font-size: 9px;
    min-width: 14px;
    padding: 1px 4px;
    border-radius: 2px;
  }

  .header-subnav li a:hover,
  .header-subnav li a.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
  }

  /* מובייל: קו תחתון צהוב (כמו בתפריט העליון), לא פס צדדי */
  .header-subnav li a::after {
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 3px;
    transform: scaleX(0);
    transform-origin: center;
  }

  .header-subnav li a:hover::after,
  .header-subnav li a.active::after {
    transform: scaleX(1);
  }

  .header-subnav-item-has-sub.is-open .header-subnav-parent::after {
    transform: scaleX(1);
  }

  /* אייקון אחיד – מובייל: שורה ראשונה מלאה (אייקון), שורה שנייה טקסט + מספר */
  .header-subnav li a .header-subnav-icon,
  .header-subnav-item-has-sub .header-subnav-parent .header-subnav-icon {
    width: 100%;
    min-width: 100%;
    flex-basis: 100%;
    height: 24px;
    min-height: 24px;
    max-height: 24px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .header-subnav li a .header-subnav-icon svg,
  .header-subnav li a .header-subnav-icon img,
  .header-subnav-item-has-sub .header-subnav-parent .header-subnav-icon svg,
  .header-subnav-item-has-sub .header-subnav-parent .header-subnav-icon img {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    flex-shrink: 0;
  }

  .header-subnav-icon svg,
  .header-subnav-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
  }

  /* טקסט מתחת לאייקון – גובה שורה קבוע לסימטריה, יישור לאמצע */
  .header-subnav li a span:not(.header-subnav-icon) {
    line-height: 1.1;
    min-height: 1.1em;
  }
  .header-subnav-item-has-sub .header-subnav-parent {
    align-content: center;
    gap: 2px 4px;
  }

  /* מובייל: תת-תפריט מדינות בתוך כדורגל – מוסתר, משתמשים ב־row2 (שורה נפרדת בזרימה) */
  .header-subnav-item-has-sub .header-subsubnav {
    display: none !important;
  }

  .header-subnav-item-has-sub {
    flex: 1 1 0;
    min-width: 56px;
    height: 62px;
  }

  /* שורת מדינות למובייל – מוסתרת כשטאב ספורט לא פעיל */
  .header-subnav-row2.header-subsubnav-mobile {
    display: none;
  }

  /* כשטאב ספורט פעיל – שורה שנייה מקופלת (0 גובה) כדי לא ליצור פס שחור כפול */
  .header-subnav[data-submenu="sport"].is-active + .header-subnav-row2.header-subsubnav-mobile {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-evenly;
    align-items: stretch;
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
    min-height: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    background: linear-gradient(135deg, #fcd34d 0%, #f5c518 35%, #e6b800 100%);
    border-bottom: none;
    transform-origin: top;
    transition: max-height 0.4s cubic-bezier(0.32, 0.72, 0, 1),
                opacity 0.25s ease-out;
  }

  .header-nav:has(.header-subnav-item-has-sub.is-open) .header-subnav-row2.header-subsubnav-mobile {
    max-height: 48px;
    min-height: 32px;
    opacity: 1;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  }

  .header-subnav-row2.header-subsubnav-mobile {
    direction: rtl;
  }

  .header-subnav-row2.header-subsubnav-mobile li {
    flex: 1 1 0;
    min-width: 60px;
    display: flex;
    align-items: stretch;
    border-inline-start: 1px solid rgba(0, 0, 0, 0.15);
  }

  .header-subnav-row2.header-subsubnav-mobile li:first-child {
    border-inline-start: none;
  }

  .header-subnav-row2.header-subsubnav-mobile li a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    min-height: 32px;
    box-sizing: border-box;
  }

  .header-subnav-row2.header-subsubnav-mobile li a:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #000;
  }

  .header-subnav-row2.header-subsubnav-mobile .header-subsubnav-flag {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  .header-subnav-row2.header-subsubnav-mobile .header-subsubnav-flag img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}

/* ===== מובייל קטן – פונטים וריווח מוקטנים ===== */
@media (max-width: 480px) {
  .header-top .container {
    height: 32px;
  }

  .header-top-btn,
  .header-top-right a {
    padding: 0 6px;
    font-size: 10px;
    height: 32px;
  }

  .header-top-right .header-top-icon {
    width: 14px;
    height: 14px;
  }

  .header-main .container {
    height: 48px;
  }

  .header-logo a {
    font-size: 18px;
  }

  .header-auth-btn {
    padding: 4px 8px;
    font-size: 10px;
  }

  .header-auth-icon {
    width: 15px;
    height: 15px;
  }

  .header-bottom {
    height: auto;
    min-height: 54px;
  }

  .header-bottom .container {
    height: auto;
    min-height: 54px;
  }

  .header-nav {
    height: auto;
    min-height: 54px;
  }

  .header-subnav {
    height: 54px;
    min-height: 54px;
  }

  .header-subnav li {
    height: 54px;
    min-height: 54px;
  }

  .header-subnav-item-has-sub {
    height: 54px;
  }

  .header-subnav li a,
  .header-subnav-item-has-sub .header-subnav-parent {
    padding: 5px;
    font-size: 11px;
    min-height: 54px;
  }

  .header-subnav li a .header-subnav-icon,
  .header-subnav-item-has-sub .header-subnav-parent .header-subnav-icon {
    height: 22px;
    min-height: 22px;
    max-height: 22px;
  }
  .header-subnav li a .header-subnav-icon svg,
  .header-subnav li a .header-subnav-icon img,
  .header-subnav-item-has-sub .header-subnav-parent .header-subnav-icon svg,
  .header-subnav-item-has-sub .header-subnav-parent .header-subnav-icon img {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
  }
  .header-subnav-item-has-sub .header-subnav-parent .header-subnav-live-count {
    font-size: 8px;
    min-width: 12px;
    padding: 1px 3px;
  }

  .header-subnav-icon {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    max-width: 22px;
    max-height: 22px;
  }
}

/* ===== מובייל קטן מאוד – פונטים צרים (כולל iPhone SE) ===== */
@media (max-width: 360px) {
  .header-top .container {
    height: 30px;
  }

  .header-top-btn,
  .header-top-right a {
    padding: 0 5px;
    font-size: 9px;
    height: 30px;
  }

  .header-top-right .header-top-icon {
    width: 12px;
    height: 12px;
  }

  .header-main .container {
    height: 44px;
  }

  .header-logo a {
    font-size: 16px;
  }

  .header-auth-btn {
    padding: 3px 6px;
    font-size: 9px;
  }

  .header-auth-icon {
    width: 14px;
    height: 14px;
  }

  .header-bottom {
    height: auto;
    min-height: 48px;
  }

  .header-bottom .container {
    height: auto;
    min-height: 48px;
  }

  .header-nav {
    height: auto;
    min-height: 48px;
  }

  .header-subnav {
    height: 48px;
    min-height: 48px;
  }

  .header-subnav li {
    height: 48px;
    min-height: 48px;
  }

  .header-subnav-item-has-sub {
    height: 48px;
  }

  .header-subnav li a,
  .header-subnav-item-has-sub .header-subnav-parent {
    padding: 4px;
    font-size: 10px;
    min-height: 48px;
  }

  .header-subnav li a .header-subnav-icon,
  .header-subnav-item-has-sub .header-subnav-parent .header-subnav-icon {
    height: 20px;
    min-height: 20px;
    max-height: 20px;
  }
  .header-subnav li a .header-subnav-icon svg,
  .header-subnav li a .header-subnav-icon img,
  .header-subnav-item-has-sub .header-subnav-parent .header-subnav-icon svg,
  .header-subnav-item-has-sub .header-subnav-parent .header-subnav-icon img {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
  }
  .header-subnav-item-has-sub .header-subnav-parent .header-subnav-live-count {
    font-size: 8px;
    min-width: 12px;
    padding: 1px 3px;
  }

  .header-subnav-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    max-width: 20px;
    max-height: 20px;
  }
}
