/*
 ASEMANEEHA PHASE 308
 Unified mobile public header.
 Home and internal pages.
 Desktop and admin panel excluded.
*/

@media screen and (max-width: 767px) {

  /* The actual public navigation root */
  body div.relative.flex.flex-row.w-full.bg-darkblue-100:has(> div.grid):has(> button) {
    direction: rtl !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    column-gap: 7px !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 5px 8px !important;
    box-sizing: border-box !important;
  }

  /* Hamburger at the right */
  body div.relative.flex.flex-row.w-full.bg-darkblue-100:has(> div.grid):has(> button) > button {
    display: inline-flex !important;
    order: 0 !important;
    flex: 0 0 36px !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 5px !important;
    position: relative !important;
    z-index: 60 !important;
  }

  /*
   Text starts immediately beside hamburger.
   Same rules on home and internal pages.
  */
  body div.relative.flex.flex-row.w-full.bg-darkblue-100:has(> div.grid):has(> button)
  > div.flex.flex-1.flex-col.items-end.justify-end.text-white {
    direction: rtl !important;
    order: 1 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: right !important;
    gap: 4px !important;
    flex: 1 1 0 !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Consistent text size and flow */
  body div.relative.flex.flex-row.w-full.bg-darkblue-100:has(> div.grid):has(> button)
  > div.flex.flex-1.flex-col.items-end.justify-end.text-white
  > span.font-benazanin {
    direction: rtl !important;
    display: inline-block !important;
    flex: 0 1 auto !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    font-size: clamp(8px, 2.15vw, 11px) !important;
    font-weight: 800 !important;
    line-height: 1.4 !important;
    letter-spacing: -0.2px !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    text-align: right !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Existing expandable navigation stays functional */
  body div.relative.flex.flex-row.w-full.bg-darkblue-100:has(> div.grid):has(> button) > div.grid {
    order: 2 !important;
  }
}