/* White Rose header-v7 clean RTL/LTR mixed layout fix
   Goal:
   - Logo on the right
   - Contact info on the left (phone/email remain LTR)
   - Menu items right-aligned
   - Language/theme/menu button + CTA on the left
   - Avoid forcing whole header direction, which breaks layout
*/

/* Keep phone numbers and emails readable */
#header a[href^="tel:"],
#header a[href^="mailto:"],
#header .contact_info,
#header .contact_info a,
#header .contact_info span {
  direction: ltr !important;
  unicode-bidi: isolate !important;
}

/* ===== Header V7 desktop ===== */
@media (min-width: 992px) {
  /* Top row: contact left, logo right */
  #header .mo-header-v7 .mo-header-top > .container.main-container > .row,
  #header .mo-header-v7 .mo-header-top > .container > .row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    direction: ltr !important;
  }

  #header .mo-header-v7 .mo-header-top-l {
    order: 2 !important;
    float: none !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    text-align: right !important;
    margin-left: auto !important;
  }

  #header .mo-header-v7 .mo-header-top-r {
    order: 1 !important;
    float: none !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    text-align: left !important;
    margin-right: auto !important;
  }

  #header .mo-header-v7 .mo-col-logo,
  #header .mo-header-v7 .mo-logo {
    float: none !important;
    display: flex !important;
    justify-content: flex-end !important;
    text-align: right !important;
    width: auto !important;
  }

  #header .mo-header-v7 .mo-logo img {
    display: block;
    margin-left: auto !important;
    margin-right: 0 !important;
  }

  #header .mo-header-v7 .mo-header-top .contact_info {
    float: none !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 0 !important;
    text-align: left !important;
    width: auto !important;
    margin: 0 !important;
  }

  #header .mo-header-v7 .mo-header-top .contact_info > span {
    display: inline-flex !important;
    align-items: center !important;
    text-align: left !important;
    white-space: nowrap;
    max-width: none !important;
    padding: 0 24px 0 0 !important;
    margin: 0 !important;
  }

  #header .mo-header-v7 .mo-header-top .contact_info i {
    float: none !important;
    display: inline-block !important;
    padding: 0 10px 0 0 !important;
    margin: 0 !important;
    height: auto !important;
  }

  #header .mo-header-v7 .mo-header-top .contact_info i.fa-phone {
    padding-top: 0 !important;
  }

  /* Second row: left controls, right-aligned menu */
  #header .mo-header-v7 > .mo-header-menu > .container.main-container,
  #header .mo-header-v7 .mo-header-menu > .container.main-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    direction: ltr !important;
  }

  #header .mo-header-v7 .menu_other_v7 {
    order: 1 !important;
    float: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    text-align: left !important;
    height: 60px !important;
    line-height: normal !important;
    margin: 0 !important;
    position: relative !important;
    right: auto !important;
    left: 0 !important;
    flex: 0 0 auto !important;
  }

  #header .mo-header-v7 .menu_other_v7 > * {
    float: none !important;
    margin: 0 !important;
    top: 0 !important;
    line-height: normal !important;
  }

  #header .mo-header-v7 .menu_other_v7 .button {
    margin-left: 12px !important;
    margin-top: 0 !important;
  }

  #header .mo-header-v7 .menu_other_v7 .select-languages,
  #header .mo-header-v7 .menu_other_v7 .color-switcher,
  #header .mo-header-v7 .menu_other_v7 .menu-toggle,
  #header .mo-header-v7 .menu_other_v7 .mo-search-header,
  #header .mo-header-v7 .menu_other_v7 .mo_mini_cart {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
  }

  #header .mo-header-v7 .mo-col-menu {
    order: 2 !important;
    float: none !important;
    flex: 1 1 auto !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    text-align: right !important;
    height: 60px !important;
    line-height: 60px !important;
  }

  #header .mo-header-v7 .mo-menu-list {
    width: auto !important;
  }

  #header .mo-header-v7 .mo-menu-list > ul {
    float: none !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    align-items: center !important;
    text-align: right !important;
    direction: rtl !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #header .mo-header-v7 .mo-menu-list > ul > li {
    float: none !important;
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 0 0 22px !important;
  }

  #header .mo-header-v7 .mo-menu-list > ul > li:last-child {
    margin-left: 0 !important;
  }

  #header .mo-header-v7 .mo-menu-list > ul > li > a {
    text-align: right !important;
    margin: 0 !important;
    padding-right: 0 !important;
    padding-left: 10px !important;
  }

  #header .mo-header-v7 .mo-menu-list > ul > li .l-dropdown-icon {
    right: auto !important;
    left: 0 !important;
  }

  #header .mo-header-v7 .mo-menu-list > ul > li .mo-dropdown-menu-item > ul {
    left: auto !important;
    right: 0 !important;
    text-align: right !important;
  }

  #header .mo-header-v7 .mo-menu-list > ul > li .mo-dropdown-menu-item > ul > li > ul {
    left: auto !important;
    right: 100% !important;
    text-align: right !important;
  }
}

/* ===== Mobile / tablet ===== */
@media (max-width: 991px) {
  #header .mo-header-v7 .mo-header-top-l,
  #header .mo-header-v7 .mo-col-logo,
  #header .mo-header-v7 .mo-logo {
    width: 100% !important;
    float: none !important;
    text-align: right !important;
    display: flex !important;
    justify-content: flex-end !important;
  }

  #header .mo-header-v7 .mo-logo img {
    margin-left: auto !important;
    margin-right: 0 !important;
  }

  #header .mo-header-v7 .mo-header-top-r {
    display: none !important;
  }

  #header .mo-header-v7 #mo-header-icon {
    right: auto !important;
    left: 20px !important;
  }

  #header .mo-menu-list > ul,
  #header .mo-menu-list > ul > li,
  #header .mo-menu-list li ul {
    text-align: right !important;
    direction: rtl !important;
  }

  #header .mo-menu-list .mb-dropdown-icon {
    right: auto !important;
    left: 0 !important;
  }
}

/* Site-wide alignment refinement, October 2026.
   Specificity intentionally limited to the common header on every page. */
#header .mo-header-v7 .mo-header-menu > .container.main-container,
#header .mo-header-v7 .mo-header-top > .container.main-container {
  box-sizing: border-box;
  width: min(100% - 48px, 1720px);
  max-width: 1720px;
  margin-inline: auto !important;
}
#header .mo-header-v7 .mo-header-top-l,
#header .mo-header-v7 .mo-header-top-r,
#header .mo-header-v7 .mo-col-menu,
#header .mo-header-v7 .menu_other_v7 { min-width: 0; }
#header .mo-header-v7 .mo-logo img { max-width: min(260px, 23vw) !important; height: auto !important; object-fit: contain; }
@media (min-width: 1200px) {
  #header .mo-header-v7 .mo-header-top > .container.main-container > .row {
    margin: 0 !important;
    width: 100%;
  }
  #header .mo-header-v7 .mo-header-top-l {
    flex: 0 0 38% !important;
    max-width: 38% !important;
    padding: 0 !important;
  }
  #header .mo-header-v7 .mo-header-top-r {
    flex: 0 0 62% !important;
    max-width: 62% !important;
    padding: 0 !important;
  }
  #header .mo-header-v7 .mo-header-menu > .container.main-container {
    gap: clamp(18px, 2vw, 44px) !important;
  }
  #header .mo-header-v7 .menu_other_v7 {
    gap: 10px !important;
    flex: 0 0 auto !important;
    white-space: nowrap;
  }
  #header .mo-header-v7 .menu_other_v7 .button {
    margin: 0 10px 0 0 !important;
    white-space: nowrap !important;
  }
  #header .mo-header-v7 .mo-col-menu { padding-inline-start: 15px !important; }
  #header .mo-header-v7 .mo-menu-list > ul {
    gap: clamp(8px, 1.15vw, 22px) !important;
    flex-wrap: nowrap !important;
    white-space: nowrap;
  }
  #header .mo-header-v7 .mo-menu-list > ul > li {
    margin: 0 !important;
    flex: 0 0 auto !important;
  }
  #header .mo-header-v7 .mo-menu-list > ul > li > a {
    padding: 0 !important;
    margin: 0 !important;
    font-size: clamp(12px, .87vw, 15px) !important;
  }
}
@media (min-width: 992px) and (max-width: 1199px) {
  #header .mo-header-v7 .mo-header-menu > .container.main-container {
    gap: 10px !important;
  }
  #header .mo-header-v7 .mo-menu-list > ul { gap: 8px !important; }
  #header .mo-header-v7 .mo-menu-list > ul > li { margin: 0 !important; }
  #header .mo-header-v7 .mo-menu-list > ul > li > a { font-size: 12px !important; padding: 0 3px !important; }
  #header .mo-header-v7 .menu_other_v7 { gap: 6px !important; }
  #header .mo-header-v7 .menu_other_v7 .button { margin: 0 6px 0 0 !important; }
}
@media (max-width: 991px) {
  #header .mo-header-v7 .mo-logo img { max-width: min(240px, 62vw) !important; }
  #header .mo-header-v7 .mo-header-menu > .container.main-container,
  #header .mo-header-v7 .mo-header-top > .container.main-container {
    width: calc(100% - 32px) !important;
    margin-inline: auto !important;
  }
}
/* Prevent the common bidi rendering bug visible in telephone numbers. */
#header .mo-header-v7 .contact_info strong,
#header .mo-header-v7 .contact_info a {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  white-space: nowrap;
}


/* White Rose 2026: Header V3 layout. V7 corrections above remain active. */
@media (min-width: 992px) {
 #header .mo-header-v3 .mo-header-menu > .container.main-container {
  display:flex !important; flex-direction:row-reverse !important;
  justify-content:space-between !important; align-items:center !important;
  gap:clamp(8px,1.15vw,24px) !important; direction:ltr !important;
  max-width:1720px !important; width:calc(100% - 48px) !important;
  margin-inline:auto !important; padding:0 !important;
 }
 #header .mo-header-v3 .mo-col-logo { order:0 !important;float:none !important; flex:0 0 auto !important;width:auto !important; margin:0 !important; text-align:right !important; }
 #header .mo-header-v3 .mo-col-logo .mo-logo {float:none !important; margin:0 !important; text-align:right !important;}
 #header .mo-header-v3 .mo-logo img {max-width:clamp(175px,15vw,265px) !important; width:auto !important; height:auto !important;}
 #header .mo-header-v3 .mo-col-menu {order:1 !important;float:none !important;min-width:0 !important;flex:1 1 auto !important;display:flex !important;align-items:center !important;justify-content:flex-start !important;text-align:right !important;}
 #header .mo-header-v3 .mo-menu-list {float:none !important;width:auto !important;max-width:100% !important;}
 #header .mo-header-v3 .mo-menu-list > ul {float:none !important; display:flex !important;flex-direction:row !important; flex-wrap:nowrap !important; align-items:center !important;justify-content:flex-start !important;gap:clamp(6px,.8vw,15px) !important;direction:rtl !important;text-align:right !important;white-space:nowrap !important;padding:0 !important;margin:0 !important;}
 #header .mo-header-v3 .mo-menu-list > ul > li {float:none !important;flex:0 0 auto !important;margin:0 !important;padding:0 !important;}
 #header .mo-header-v3 .mo-menu-list > ul > li > a {font-size:clamp(11px,.8vw,15px) !important;margin:0 !important;padding:0 !important;}
 #header .mo-header-v3 .menu_other_v3 {order:2 !important;float:none !important;position:relative !important;left:auto !important;right:auto !important;top:auto !important;flex:0 0 auto !important;display:flex !important;align-items:center !important;justify-content:flex-end !important;gap:clamp(5px,.55vw,11px) !important;direction:ltr !important;text-align:left !important;margin:0 !important;white-space:nowrap !important;}
 #header .mo-header-v3 .menu_other_v3 > * {float:none !important; flex-shrink:0 !important;margin:0 !important;}
 #header .mo-header-v3 .menu_other_v3 .btn-nav {margin:0 !important;white-space:nowrap !important;}
 #header .mo-header-v3 .mo-menu-list > ul > li .mo-dropdown-menu-item > ul {left:auto !important;right:0 !important;direction:rtl !important;text-align:right !important;}
 #header .mo-header-v3 .mo-menu-list > ul > li .mo-dropdown-menu-item > ul > li > ul {left:auto !important;right:100% !important;text-align:right !important;}
}
@media (min-width:992px) and (max-width:1250px) {
 #header .mo-header-v3 .mo-header-menu > .container.main-container {gap:7px !important;width:calc(100% - 24px) !important;}
 #header .mo-header-v3 .mo-logo img {max-width:175px !important;}
 #header .mo-header-v3 .mo-menu-list > ul {gap:5px !important;}
 #header .mo-header-v3 .mo-menu-list > ul > li > a {font-size:11px !important;}
 #header .mo-header-v3 .menu_other_v3 {gap:5px !important;}
}
@media (max-width:991px) {
 #header .mo-header-v3 .mo-header-menu > .container.main-container {direction:rtl !important;width:calc(100% - 32px) !important;margin-inline:auto !important;}
 #header .mo-header-v3 .mo-col-logo {float:right !important;text-align:right !important;}
 #header .mo-header-v3 .mo-logo img {max-width:min(230px,60vw) !important;height:auto !important;}
 #header .mo-header-v3 #mo-header-icon {right:auto !important;left:16px !important;}
}

/* 2026-10-13 V3: correct vertically displaced dark/light switcher and
   keep all header controls on a single centre-aligned line. */
@media (min-width: 992px) {
  #header .mo-header-v3 .mo-header-menu > .container.main-container {
    flex-wrap: nowrap !important;
  }
  #header .mo-header-v3 .menu_other_v3 {
    min-height: 80px !important;
    height: auto !important;
    flex-wrap: nowrap !important;
    align-self: center !important;
    align-items: center !important;
  }
  #header .mo-header-v3 .menu_other_v3 > .color-switcher,
  #header .mo-header-v3 .menu_other_v3 > .menu-toggle,
  #header .mo-header-v3 .menu_other_v3 > .select-languages,
  #header .mo-header-v3 .menu_other_v3 > .mo-search-header,
  #header .mo-header-v3 .menu_other_v3 > .mo_mini_cart,
  #header .mo-header-v3 .menu_other_v3 > .btn-nav {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    flex-shrink: 0 !important;
    align-self: center !important;
  }
  #header .mo-header-v3 .menu_other_v3 > .color-switcher {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
  }
  #header .mo-header-v3 .menu_other_v3 > .color-switcher > ul {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }
  #header .mo-header-v3 .menu_other_v3 > .color-switcher > ul > li {
    float: none !important;
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: normal !important;
  }
  #header .mo-header-v3 .menu_other_v3 > .menu-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 40px !important;
    height: 40px !important;
  }
  #header .mo-header-v3 .menu_other_v3 > .select-languages {
    display: flex !important;
    align-items: center !important;
    height: 40px !important;
  }
  #header .mo-header-v3 .menu_other_v3 > .btn-nav {display: inline-flex !important; align-items:center !important; justify-content:center !important;}
}

/* Wider language labels (Dari/Pashto), for header V3/V7 */
#header .mo-header-v3 .select-languages,
#header .mo-header-v7 .select-languages { width: auto !important; min-width: 95px; max-width: none !important; }
#header .select-languages > a { white-space: nowrap; letter-spacing: 0 !important; }
#header .select-languages ul { min-width: 145px; text-align: right; }
#header .select-languages ul a { white-space: nowrap; direction: auto; }


/* ==========================================================
   White Rose - Header V2 responsive RTL arrangement
   Only targets v2. Existing V3/V7 layout remains unchanged.
   ========================================================== */
@media (min-width: 992px) {
  #header .mo-header-v2 .mo-header-menu > .container-menu {
    display: flex !important;
    flex-direction: row-reverse !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: clamp(6px, 0.8vw, 16px) !important;
    direction: ltr !important;
    width: 100% !important;
    padding-inline: clamp(12px, 2vw, 40px) !important;
    box-sizing: border-box !important;
  }
  #header .mo-header-v2 .mo-col-logo {
    order: 0 !important;
    float: none !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 22% !important;
    padding: 0 !important;
    margin: 0 !important;
    justify-content: center !important;
    align-items: flex-end !important;
    text-align: right !important;
    height: 90px !important;
  }
  #header .mo-header-v2 .mo-col-logo .mo-logo {
    width: auto !important;
    max-width: 100% !important;
    text-align: right !important;
  }
  #header .mo-header-v2 .mo-col-logo img {
    max-width: min(245px, 100%) !important;
    width: auto !important;
    height: auto !important;
  }
  #header .mo-header-v2 .mo-col-menu {
    order: 1 !important;
    float: none !important;
    display: flex !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    height: 90px !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: right !important;
    direction: rtl !important;
    margin: 0 !important;
  }
  #header .mo-header-v2 .mo-col-menu .mo-menu-list {
    width: auto !important;
    max-width: 100% !important;
  }
  #header .mo-header-v2 .mo-col-menu .mo-menu-list > ul {
    float: none !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    direction: rtl !important;
    text-align: right !important;
    gap: clamp(5px, 0.8vw, 15px) !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  #header .mo-header-v2 .mo-col-menu .mo-menu-list > ul > li {
    float: none !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  #header .mo-header-v2 .mo-col-menu .mo-menu-list > ul > li > a {
    white-space: nowrap !important;
    font-size: clamp(11px, 0.85vw, 15px) !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  #header .mo-header-v2 .menu_other_v2 {
    order: 2 !important;
    float: none !important;
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    height: 90px !important;
    padding: 0 !important;
    margin: 0 !important;
    direction: ltr !important;
    white-space: nowrap !important;
  }
  #header .mo-header-v2 .menu_other_v2 > * {
    float: none !important;
    position: relative !important;
    margin: 0 !important;
    top: auto !important;
    bottom: auto !important;
    flex-shrink: 0 !important;
    align-self: center !important;
  }
  #header .mo-header-v2 .menu_other_v2 .color-switcher,
  #header .mo-header-v2 .menu_other_v2 .select-languages {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  #header .mo-header-v2 .menu_other_v2 .color-switcher ul {
    margin: 0 !important;
    padding: 0 !important;
  }
  #header .mo-header-v2 .menu_other_v2 .call-us {
    height: auto !important;
    padding: 0 !important;
    direction: ltr !important;
  }
  #header .mo-header-v2 .menu_other_v2 .call-us i {
    top: auto !important;
  }
  #header .mo-header-v2 .menu-toggle {
    order: 3 !important;
    position: relative !important;
    float: none !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    margin: 0 !important;
    flex: 0 0 42px !important;
    align-self: center !important;
  }
  #header .mo-header-v2 > .mo-header-menu .btn-nav.button {
    order: 4 !important;
    float: none !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    align-self: center !important;
    white-space: nowrap !important;
  }
  #header .mo-header-v2 .mo-col-menu .mo-menu-list li ul {
    direction: rtl !important;
    text-align: right !important;
  }
  #header .mo-header-v2 .mo-menu-list > ul > li .mo-dropdown-menu-item > ul {
    right: 0 !important; left: auto !important;
  }
  #header .mo-header-v2 .mo-menu-list > ul > li .mo-dropdown-menu-item > ul > li > ul {
    right: 100% !important; left: auto !important;
  }
}
@media (min-width: 992px) and (max-width: 1250px) {
  #header .mo-header-v2 .mo-header-menu > .container-menu {
    gap: 5px !important;
    padding-inline: 12px !important;
  }
  #header .mo-header-v2 .mo-col-logo { max-width: 18% !important; }
  #header .mo-header-v2 .mo-col-logo img { max-width: 175px !important; }
  #header .mo-header-v2 .mo-col-menu .mo-menu-list > ul { gap: 5px !important; }
  #header .mo-header-v2 .mo-col-menu .mo-menu-list > ul > li > a { font-size: 11px !important; }
  #header .mo-header-v2 .menu_other_v2 { gap: 5px !important; }
}
@media (max-width: 991px) {
  #header .mo-header-v2 .container-menu {
    direction: rtl !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  #header .mo-header-v2 .mo-col-logo {
    float: none !important;
    order: 0 !important;
    padding: 0 15px !important;
    max-width: 68% !important;
    text-align: right !important;
  }
  #header .mo-header-v2 .mo-col-logo img {
    width: auto !important;
    max-width: min(225px, 55vw) !important;
    height: auto !important;
  }
  #header .mo-header-v2 .bg-header-icon {
    order: 2 !important;
    margin-left: 15px !important;
  }
  #header .mo-header-v2 #mo-header-icon {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    margin: 0 !important;
  }
  #header .mo-header-v2 .menu-toggle {
    order: 1 !important;
    float: none !important;
    position: relative !important;
    top: auto !important;
    margin-left: 8px !important;
    margin-right: auto !important;
  }
  #header .mo-header-v2 .menu_other_v2,
  #header .mo-header-v2 .mo-col-menu,
  #header .mo-header-v2 > .mo-header-menu .btn-nav.button {
    display: none !important;
  }
}
/* Language name length matching the V3/V7 switcher */
#header .mo-header-v2 .select-languages {
  width: auto !important;
  min-width: 95px !important;
}
#header .mo-header-v2 .select-languages > a { white-space: nowrap !important; }
#header .mo-header-v2 .select-languages ul {
  min-width: 145px !important;
  direction: rtl !important;
  text-align: right !important;
}
