/*
 * The site header on tablets and phones (30.11, 1.3).
 *
 * At 1024px and below Elementor swaps the 9 links for the menu button, but the site's header CSS (dn-chrome.css)
 * still gives the menu a row of its own there (order 4, flex-basis 100%), made for links that wrap. So the button sat
 * alone on a second row in the middle and the header grew to 159px, over the hero's heading.
 *
 * Here, at 1024px and below: one row, the logo on the right and "צרו קשר" with the menu button on the left; the
 * open menu drops below the header as a card instead of stretching it. The selectors carry one class more than
 * dn-chrome.css, so the order the two files load in does not matter.
 */
@media (max-width: 1024px) {
  #dn-header .dn-header-bar.e-con {
    flex-wrap: nowrap;
    border-radius: var(--r-pill);
    position: relative;
  }

  #dn-header .dn-header-bar .dn-nav {
    order: 4;
    flex: 0 0 auto;
    position: static;
  }

  #dn-header .dn-header-bar .dn-nav > .elementor-widget-container { position: static; }

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

  #dn-header .dn-header-bar .dn-nav .elementor-menu-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #EEF4FF;
    color: #0D1A2E;
    font-size: 22px;
  }

  #dn-header .dn-header-bar .dn-nav .elementor-nav-menu--dropdown {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline: 0;
    margin: 0;
    z-index: 20;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
  }

  #dn-header .dn-header-bar .dn-nav .elementor-nav-menu--dropdown .elementor-item {
    padding: 13px 22px;
    font-size: 16px;
    background: transparent;
    color: var(--page-fg);
  }

  #dn-header .dn-header-bar .dn-nav .elementor-nav-menu--dropdown .elementor-item:hover,
  #dn-header .dn-header-bar .dn-nav .elementor-nav-menu--dropdown .elementor-item:focus,
  #dn-header .dn-header-bar .dn-nav .elementor-nav-menu--dropdown .elementor-item.elementor-item-active {
    background: #EEF4FF;
    color: var(--brand-primary);
  }
}

/* The narrowest phones: a smaller logo so the row still fits. */
@media (max-width: 360px) {
  #dn-header .dn-header-bar .dn-logo img { width: 104px; }
  #dn-header .dn-header-bar.e-con { gap: 8px !important; }
}
