/* ─── כותרת אתר — סגנון VS Code ───────────────────────── */
:root {
  --site-header-pad-y: 0.65rem;
  --site-header-inner: 2.875rem;
  --site-header-offset: calc(var(--site-header-pad-y) * 2 + var(--site-header-inner) + 0.5rem);
}

.site-header,
.landing-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(0, auto) 1fr minmax(0, auto);
  align-items: center;
  gap: clamp(0.85rem, 2.2vw, 2.25rem);
  min-height: 4rem;
  padding: 0.65rem var(--section-px, clamp(1rem, 3vw, 2.5rem));
  background: var(--topbar-bg);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.site-header.scrolled,
.landing-header.scrolled {
  box-shadow: 0 1px 0 var(--border), var(--shadow-soft);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  min-width: 0;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-link:hover {
  text-decoration: none;
  color: var(--text);
}

.logo-img {
  display: block;
  object-fit: contain;
  background: transparent;
  flex-shrink: 0;
  border: none;
  outline: none;
  box-shadow: none;
}

img.logo-brand {
  border: none !important;
  outline: none;
  box-shadow: none;
}

.logo-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  min-width: 0;
  line-height: 1.2;
}

.logo-name {
  font-family: "Suez One", "Heebo", "Segoe UI", Tahoma, Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(1.05rem, 2.4vw, 1.22rem);
  letter-spacing: 0;
  white-space: nowrap;
  line-height: 1.15;
}

.logo-phone {
  font-weight: 500;
  font-size: clamp(0.78rem, 1.65vw, 0.88rem);
  color: var(--muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.65rem, 2.2vw, 2rem);
  min-width: 0;
}

.header-nav a {
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 400;
  transition: var(--theme-transition, color 0.3s ease);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.4rem 0.2rem;
}

.header-nav a:hover,
.header-nav a.is-active {
  color: var(--text);
  text-decoration: none;
}

.header-nav a.is-active {
  font-weight: 500;
}

.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0.4rem 0.2rem;
  border: none;
  background: none;
  color: var(--text-soft);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--theme-transition, color 0.3s ease);
}

.nav-dropdown-trigger:hover,
.nav-dropdown.is-open .nav-dropdown-trigger,
.nav-dropdown:hover .nav-dropdown-trigger {
  color: var(--text);
}

.nav-dropdown-chevron {
  flex-shrink: 0;
  opacity: 0.75;
  transition: transform 0.2s ease;
}

.nav-dropdown.is-open .nav-dropdown-chevron,
.nav-dropdown:hover .nav-dropdown-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  inset-inline-end: 0;
  z-index: 120;
  min-width: 11.5rem;
  padding: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.35rem);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  color: var(--text-soft);
  font-size: 0.92rem;
  white-space: nowrap;
  text-align: right;
}

.nav-dropdown-menu a:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.site-header--compact {
  display: flex;
  justify-content: space-between;
  gap: clamp(0.85rem, 2.2vw, 2.25rem);
}

.site-header--compact .header-cta {
  margin-inline-start: auto;
}

.header-cta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.45rem, 1.2vw, 0.85rem);
  flex-shrink: 0;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  min-width: 2.25rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: var(--radius-sm, 8px);
  padding: 0.4rem 0.7rem;
  font-size: 0.88rem;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  flex-shrink: 0;
  transition: var(--theme-transition, border-color 0.3s ease, color 0.3s ease, background 0.3s ease);
}

.theme-toggle-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface-hover);
}

.header-link-manage {
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 400;
  transition: var(--theme-transition, color 0.3s ease);
  text-decoration: none;
  white-space: nowrap;
}

.header-link-manage:hover {
  color: var(--text);
  text-decoration: none;
}

.header-user-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  background: var(--surface-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-soft);
}

.btn-call {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.15rem;
  background: var(--brand);
  color: var(--accent-text, #0a0a0a);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm, 8px);
  transition: background 0.3s ease, transform 0.2s, color 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn-call:hover {
  background: var(--brand-hover);
  transform: none;
  color: var(--accent-text, #0a0a0a);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.site-header-offset {
  padding-top: var(--site-header-offset);
}

@media (max-width: 1100px) {
  .header-nav a,
  .nav-dropdown-trigger {
    font-size: 0.88rem;
    padding: 0.35rem 0.15rem;
  }
}

@media (max-width: 900px) {
  .site-header,
  .landing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .header-cta {
    margin-inline-start: auto;
  }

  .menu-toggle { display: flex; margin-inline-start: 0.35rem; }

  .header-nav {
    position: fixed;
    top: 4rem;
    right: 0;
    left: 0;
    z-index: 99;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0.75rem 1rem 1rem;
    background: var(--topbar-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

  .header-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .header-nav > a,
  .header-nav > .nav-dropdown {
    padding: 0.7rem 0.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
  }

  .header-nav > a:last-child {
    border-bottom: none;
  }

  .nav-dropdown {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-dropdown-trigger {
    justify-content: center;
    width: 100%;
    padding: 0;
  }

  .nav-dropdown-menu {
    position: static;
    min-width: 0;
    margin-top: 0.45rem;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    display: none;
    box-shadow: none;
  }

  .nav-dropdown.is-open .nav-dropdown-menu {
    display: block;
  }

  .nav-dropdown-menu a {
    text-align: center;
  }

  .menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .menu-toggle.open span:nth-child(2) { opacity: 0; }
  .menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
}

@media (max-width: 640px) {
  :root {
    --site-header-inner: 2.25rem;
    --site-header-offset: calc(var(--site-header-pad-y) * 2 + var(--site-header-inner) + 0.375rem);
  }

  .site-header,
  .landing-header {
    gap: 0.65rem;
    padding-inline: 0.85rem;
  }

  .logo-img {
    width: 36px;
    height: 36px;
  }

  .logo-name { font-size: 0.92rem; }
  .logo-phone { font-size: 0.72rem; }

  .btn-call {
    font-size: 0.85rem;
    padding: 0.48rem 0.85rem;
  }

  .header-user-chip { display: none; }
}
