/* Hamakom Blog Design v1.4.2 — robust mobile menu + compact icon */
.hbd-site-header {
  --hbd-header-accent: #76ddcb;
  --hbd-header-height-local: 88px;
  --hbd-logo-h: 64px;
  --hbd-logo-scroll-h: 58px;
  --hbd-logo-mobile-h: 54px;
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 99990;
  width: 100%;
  color: #fff;
  font-family: "Heebo", "Heebo Fallback", Arial, sans-serif !important;
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  box-shadow: none;
  overflow: visible !important;
  transition: background-color .26s ease, border-color .26s ease, color .26s ease, backdrop-filter .26s ease, -webkit-backdrop-filter .26s ease;
}
.admin-bar .hbd-site-header { top: 32px; }

.hbd-site-header.is-scrolled,
body.hbd-legal-page .hbd-site-header {
  color: #17383a;
  background: rgba(239, 246, 244, .72);
  border-bottom-color: rgba(24, 58, 59, .075);
  box-shadow: none;
  -webkit-backdrop-filter: blur(22px) saturate(135%);
  backdrop-filter: blur(22px) saturate(135%);
}

.hbd-site-header *,
.hbd-site-header *::before,
.hbd-site-header *::after { box-sizing: border-box; font-family: "Heebo", "Heebo Fallback", Arial, sans-serif !important; }
.hbd-site-header a { text-decoration: none; }

.hbd-site-header__inner {
  position: relative;
  width: min(1180px, calc(100% - 52px));
  min-height: var(--hbd-header-height-local);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 30px;
}

.hbd-site-header__brand {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  min-width: 176px;
  line-height: 0;
}
.hbd-site-header__brand .hbd-logo {
  grid-area: 1 / 1;
  display: block;
  width: auto;
  height: var(--hbd-logo-h);
  max-width: 205px;
  object-fit: contain;
  filter: none !important;
  transform: none !important;
  box-shadow: none !important;
  transition: opacity .18s ease, height .22s ease;
}
.hbd-site-header__brand .hbd-logo--scroll { opacity: 0; pointer-events: none; }
.hbd-site-header.is-scrolled .hbd-site-header__brand .hbd-logo,
body.hbd-legal-page .hbd-site-header__brand .hbd-logo { height: var(--hbd-logo-scroll-h); }
.hbd-site-header.has-scroll-logo.is-scrolled .hbd-logo--default,
body.hbd-legal-page .hbd-site-header.has-scroll-logo .hbd-logo--default { opacity: 0; }
.hbd-site-header.has-scroll-logo.is-scrolled .hbd-logo--scroll,
body.hbd-legal-page .hbd-site-header.has-scroll-logo .hbd-logo--scroll { opacity: 1; }

.hbd-site-header__nav { flex: 1 1 auto; min-width: 0; }
.hbd-site-header__menu {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(22px, 2.5vw, 39px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.hbd-site-header__menu > li { position: relative; margin: 0; padding: 0; }
.hbd-site-header__menu > li > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: rgba(255,255,255,.98) !important;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 1px 6px rgba(0,0,0,.12);
  transition: color .18s ease, opacity .18s ease;
}
.hbd-site-header.is-scrolled .hbd-site-header__menu > li > a,
body.hbd-legal-page .hbd-site-header__menu > li > a {
  color: #17383a !important;
  text-shadow: none;
}
.hbd-site-header__menu > li > a::after {
  content: "";
  position: absolute;
  right: 50%;
  bottom: 4px;
  width: 0;
  height: 2px;
  border-radius: 99px;
  background: var(--hbd-header-accent);
  transform: translateX(50%);
  transition: width .18s ease;
}
.hbd-site-header__menu > li:hover > a,
.hbd-site-header__menu > li.current-menu-item > a,
.hbd-site-header__menu > li.current-menu-ancestor > a { color: #a5f4e8 !important; }
.hbd-site-header.is-scrolled .hbd-site-header__menu > li:hover > a,
.hbd-site-header.is-scrolled .hbd-site-header__menu > li.current-menu-item > a,
.hbd-site-header.is-scrolled .hbd-site-header__menu > li.current-menu-ancestor > a,
body.hbd-legal-page .hbd-site-header__menu > li:hover > a,
body.hbd-legal-page .hbd-site-header__menu > li.current-menu-item > a,
body.hbd-legal-page .hbd-site-header__menu > li.current-menu-ancestor > a { color: #0b756d !important; }
.hbd-site-header__menu > li:hover > a::after,
.hbd-site-header__menu > li.current-menu-item > a::after,
.hbd-site-header__menu > li.current-menu-ancestor > a::after { width: 24px; }

.hbd-site-header__menu .sub-menu {
  position: absolute;
  top: calc(100% - 2px);
  right: -18px;
  min-width: 210px;
  margin: 0;
  padding: 9px;
  list-style: none;
  border: 1px solid rgba(255,255,255,.50);
  border-radius: 14px;
  background: rgba(239,246,244,.88);
  box-shadow: 0 16px 40px rgba(21,61,62,.09);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .16s ease, visibility .16s ease, transform .16s ease;
  -webkit-backdrop-filter: blur(20px) saturate(135%);
  backdrop-filter: blur(20px) saturate(135%);
}
.hbd-site-header__menu li:hover > .sub-menu,
.hbd-site-header__menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.hbd-site-header__menu .sub-menu li { margin: 0; }
.hbd-site-header__menu .sub-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 9px;
  color: #24484a !important;
  font-size: 14px;
  font-weight: 500;
  text-shadow: none;
}
.hbd-site-header__menu .sub-menu a:hover { background: rgba(255,255,255,.62); color: #096b66 !important; }

.hbd-site-header__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
}
.hbd-site-header__instagram,
.hbd-site-header__toggle {
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.42) !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.12) !important;
  color: #fff !important;
  box-shadow: none !important;
  outline: 0 !important;
  text-shadow: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.hbd-site-header__instagram { display: inline-grid; }
.hbd-site-header.is-scrolled .hbd-site-header__instagram,
body.hbd-legal-page .hbd-site-header__instagram {
  color: #285f5c !important;
  border-color: rgba(25,75,74,.14) !important;
  background: rgba(255,255,255,.40) !important;
}
.hbd-site-header__instagram:hover,
.hbd-site-header__instagram:focus-visible {
  background: rgba(123,220,203,.20) !important;
  border-color: rgba(123,220,203,.52) !important;
  box-shadow: 0 0 0 3px rgba(118,221,203,.12) !important;
}
.hbd-site-header__instagram svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.hbd-site-header__instagram .hbd-ig-dot { fill: currentColor; stroke: none; }

/* Hard desktop rule: Elementor/theme button styles cannot reveal the hamburger. */
.hbd-site-header__toggle {
  display: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  cursor: pointer;
}

.hbd-site-header__toggle .hbd-menu-icon {
  display: block;
  width: 21px;
  height: 21px;
  overflow: visible;
  pointer-events: none;
}
.hbd-site-header__toggle .hbd-menu-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.hbd-site-header.is-menu-open .hbd-site-header__toggle .hbd-menu-icon path {
  stroke-width: 1.9;
}

@media (max-width: 1080px) {
  .hbd-site-header__inner { width: min(100% - 34px, 1180px); gap: 18px; }
  .hbd-site-header__menu { gap: 20px; }
  .hbd-site-header__menu > li > a { font-size: 14px; }
}

/* Dedicated mobile header. Hamburger exists visually ONLY here. */
@media (max-width: 767px) {
  .hbd-site-header { --hbd-header-height-local: 74px; }
  .hbd-site-header__inner {
    width: calc(100% - 24px);
    min-height: 74px;
    gap: 12px;
    justify-content: space-between;
  }
  .hbd-site-header__brand { min-width: 0; margin: 0; }
  .hbd-site-header__brand .hbd-logo,
  .hbd-site-header.is-scrolled .hbd-site-header__brand .hbd-logo,
  body.hbd-legal-page .hbd-site-header__brand .hbd-logo {
    height: var(--hbd-logo-mobile-h);
    max-width: 165px;
  }
  .hbd-site-header__actions { margin: 0; gap: 8px; }
  .hbd-site-header__toggle {
    display: inline-grid !important;
    width: 40px !important;
    height: 40px !important;
    color: #fff !important;
    border-color: rgba(255,255,255,.46) !important;
    background: rgba(255,255,255,.11) !important;
  }
  .hbd-site-header.is-scrolled .hbd-site-header__toggle,
  body.hbd-legal-page .hbd-site-header__toggle {
    color: #285f5c !important;
    border-color: rgba(25,75,74,.14) !important;
    background: rgba(255,255,255,.42) !important;
  }
  .hbd-site-header__toggle:hover,
  .hbd-site-header__toggle:focus,
  .hbd-site-header__toggle:focus-visible,
  .hbd-site-header__toggle:active {
    color: inherit !important;
    border-color: rgba(118,221,203,.55) !important;
    background: rgba(118,221,203,.15) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(118,221,203,.12) !important;
  }

  .hbd-site-header__nav {
    position: fixed !important;
    z-index: 100001 !important;
    top: calc(var(--hbd-header-height, 74px) + 10px) !important;
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    max-height: calc(100dvh - var(--hbd-header-height, 74px) - 28px);
    overflow-y: auto !important;
    overscroll-behavior: contain;
    padding: 8px !important;
    border: 1px solid rgba(255,255,255,.62) !important;
    border-radius: 16px !important;
    background: rgba(242,247,246,.93) !important;
    box-shadow: 0 22px 60px rgba(16,54,55,.16) !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px) scale(.985);
    transform-origin: top center;
    -webkit-backdrop-filter: blur(22px) saturate(135%);
    backdrop-filter: blur(22px) saturate(135%);
    transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
  }
  .admin-bar .hbd-site-header__nav {
    top: calc(46px + var(--hbd-header-height, 74px) + 10px) !important;
  }
  .hbd-site-header.is-menu-open .hbd-site-header__nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }
  .hbd-site-header__menu {
    display: grid !important;
    gap: 3px !important;
    width: 100% !important;
  }
  .hbd-site-header__menu > li { width: 100%; }
  .hbd-site-header__menu > li > a {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border-radius: 11px;
    color: #17383a !important;
    background: transparent !important;
    font-size: 15px;
    font-weight: 650;
    text-shadow: none;
  }
  .hbd-site-header__menu > li > a::after { display: none; }
  .hbd-site-header__menu > li > a:hover,
  .hbd-site-header__menu > li > a:focus-visible,
  .hbd-site-header__menu > li.current-menu-item > a,
  .hbd-site-header__menu > li.current-menu-ancestor > a {
    color: #0a6f69 !important;
    background: rgba(118,221,203,.11) !important;
  }
  .hbd-site-header__menu .sub-menu {
    position: static !important;
    min-width: 0;
    margin: 0 12px 5px 0;
    padding: 0 10px 0 0;
    border: 0 !important;
    border-right: 1px solid rgba(26,88,84,.16) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .hbd-site-header__menu .sub-menu a {
    padding: 8px 10px;
    font-size: 14px;
    color: #365658 !important;
  }
}

@media (min-width: 768px) {
  .hbd-site-header__toggle { display: none !important; visibility: hidden !important; pointer-events: none !important; }
}

@media (max-width: 782px) { .admin-bar .hbd-site-header { top: 46px; } }
@media (max-width: 480px) {
  .hbd-site-header__inner { width: calc(100% - 20px); }
  .hbd-site-header__instagram { width: 37px; height: 37px; }
}
