/* Hami Keivan — clean mobile header + hamburger drawer */
@media (max-width: 1024px) {
  .elementor-location-header .elementor-element-36c32fe {
    position: sticky;
    top: 0;
    z-index: 10050;
    background: #fff !important;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  }

  body.admin-bar .elementor-location-header .elementor-element-36c32fe {
    top: 46px;
  }

  @media (min-width: 783px) {
    body.admin-bar .elementor-location-header .elementor-element-36c32fe {
      top: 32px;
    }
  }

  .elementor-location-header .elementor-element-36c32fe > .elementor-container {
    max-width: none !important;
    width: 100% !important;
    min-height: 64px;
    align-items: center !important;
  }

  .elementor-location-header .elementor-element-307b7fe {
    display: none !important;
  }

  /* Brand may start in this column on EN; JS moves it into the main bar */
  .elementor-location-header .elementor-element-89a4420 {
    display: none !important;
  }

  .elementor-location-header .elementor-element-4dc1d5d {
    width: 100% !important;
  }

  .elementor-location-header .elementor-element-4dc1d5d > .elementor-widget-wrap {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.75rem;
    width: 100% !important;
    min-height: 64px;
    padding: 0.55rem 1rem !important;
    box-sizing: border-box;
  }

  /* Keep DOM order: in RTL, brand stays on the right and burger on the left */
  .elementor-location-header .elementor-element-6c74f50 {
    flex: 1 1 auto;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    min-width: 0;
  }

  .elementor-location-header .elementor-element-6c74f50 .elementor-widget-container,
  .elementor-location-header .elementor-element-6c74f50 .elementor-heading-title {
    margin: 0 !important;
    line-height: 1.15 !important;
  }

  .elementor-location-header .elementor-element-6c74f50 .elementor-heading-title,
  .elementor-location-header .elementor-element-6c74f50 .elementor-heading-title a {
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    letter-spacing: 0;
    color: #b40000 !important;
    text-decoration: none !important;
    white-space: nowrap;
  }

  .elementor-location-header .elementor-element-3d6cc9a {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    flex: 0 0 auto;
  }

  .elementor-location-header .elementor-element-3d6cc9a > .elementor-widget-container {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  .elementor-location-header .elementor-menu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 2.65rem !important;
    height: 2.65rem !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: #1f2328 !important;
    box-shadow: none !important;
    padding: 0 !important;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  }

  .elementor-location-header .elementor-menu-toggle i {
    font-size: 1.15rem !important;
    margin: 0 !important;
  }

  .elementor-location-header .elementor-menu-toggle[aria-expanded="true"],
  .elementor-location-header .elementor-menu-toggle.elementor-active {
    background: #111 !important;
    border-color: #111 !important;
    color: #fff !important;
  }

  /* Hide language from the top bar; JS moves it into the drawer */
  .elementor-location-header .elementor-element-1c71400,
  .elementor-location-header .elementor-element-2139b2f {
    display: none !important;
  }

  .elementor-location-header .hami-mobile-lang {
    display: none;
  }

  body.hami-mobile-nav-open .elementor-location-header .hami-mobile-lang {
    display: block !important;
    margin-top: 1.15rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
  }

  body.hami-mobile-nav-open .elementor-location-header .hami-mobile-lang .elementor-element-1c71400,
  body.hami-mobile-nav-open .elementor-location-header .hami-mobile-lang .elementor-element-2139b2f {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .elementor-location-header .hami-mobile-lang .cpel-switcher__nav,
  .elementor-location-header .hami-mobile-lang .cpel-switcher__list {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .elementor-location-header .hami-mobile-lang .cpel-switcher__lang {
    margin: 0 !important;
  }

  .elementor-location-header .hami-mobile-lang .cpel-switcher__lang a {
    display: inline-flex !important;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #f7f7f7;
    color: #1f2328 !important;
    text-decoration: none !important;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
  }

  .elementor-location-header .hami-mobile-lang .cpel-switcher__lang--active a,
  .elementor-location-header .hami-mobile-lang .cpel-switcher__lang a[aria-current="true"] {
    background: #111;
    border-color: #111;
    color: #fff !important;
  }

  .elementor-location-header .hami-mobile-lang .cpel-switcher__flag img {
    display: block;
    width: 18px;
    height: auto;
    border-radius: 2px;
  }

  /* Closed: keep Elementor dropdown invisible */
  .elementor-location-header .elementor-nav-menu--dropdown.elementor-nav-menu__container {
    display: none !important;
  }

  /* Open: full drawer under the sticky bar */
  body.hami-mobile-nav-open .elementor-location-header .elementor-nav-menu--dropdown.elementor-nav-menu__container {
    display: block !important;
    position: fixed !important;
    top: 64px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: calc(100dvh - 64px) !important;
    max-height: calc(100dvh - 64px) !important;
    margin: 0 !important;
    padding: 0.85rem 1.15rem 1.75rem !important;
    background: #fff !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    z-index: 10040 !important;
    box-sizing: border-box;
    --menu-height: calc(100dvh - 64px) !important;
    transform: none !important;
  }

  body.admin-bar.hami-mobile-nav-open .elementor-location-header .elementor-nav-menu--dropdown.elementor-nav-menu__container {
    top: calc(64px + 46px) !important;
    height: calc(100dvh - 64px - 46px) !important;
    max-height: calc(100dvh - 64px - 46px) !important;
  }

  @media (min-width: 783px) {
    body.admin-bar.hami-mobile-nav-open .elementor-location-header .elementor-nav-menu--dropdown.elementor-nav-menu__container {
      top: calc(64px + 32px) !important;
      height: calc(100dvh - 64px - 32px) !important;
      max-height: calc(100dvh - 64px - 32px) !important;
    }
  }

  .elementor-location-header .elementor-nav-menu--dropdown .elementor-nav-menu {
    display: flex !important;
    flex-direction: column;
    gap: 0.15rem;
    margin: 0;
    padding: 0;
    width: 100%;
  }

  .elementor-location-header .elementor-nav-menu--dropdown .menu-item {
    margin: 0 !important;
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .elementor-location-header .elementor-nav-menu--dropdown .menu-item:last-child {
    border-bottom: 0;
  }

  .elementor-location-header .elementor-nav-menu--dropdown .elementor-item {
    display: flex !important;
    align-items: center;
    width: 100% !important;
    padding: 0.95rem 0.2rem !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: #1f2328 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    text-align: start !important;
    justify-content: flex-start;
    transition: color 0.18s ease;
  }

  .elementor-location-header .elementor-nav-menu--dropdown .elementor-item:hover,
  .elementor-location-header .elementor-nav-menu--dropdown .elementor-item:focus,
  .elementor-location-header .elementor-nav-menu--dropdown .elementor-item.elementor-item-active {
    color: #b40000 !important;
    background: transparent !important;
  }

  body.hami-mobile-nav-open {
    overflow: hidden !important;
  }
}
