/* HP2 tablet/mobile navigation — PWS off-canvas + accordion (EN + AR) */
@media (max-width: 992px) {
  .hp2-header-cta { display: none !important; }

  .hp2-header {
    height: 70px !important;
    min-height: 70px !important;
    max-height: 70px !important;
  }

  .hp2-header .ct-section-inner-wrap {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 70px !important;
    min-height: 70px !important;
    max-height: 70px !important;
    gap: 12px;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: clamp(22px, 4vw, 28px) !important;
    padding-right: clamp(22px, 4vw, 28px) !important;
    overflow: visible !important;
  }

  .hp2-header .hp2-logo {
    order: 1;
    flex: 0 1 auto;
    justify-self: start;
    align-self: center !important;
    display: flex !important;
    align-items: center !important;
    height: auto !important;
    max-height: 70px !important;
  }

  .hp2-header .hp2-logo img,
  .hp2-header .hp2-logo .ct-image img {
    height: 36px !important;
    width: auto !important;
    display: block;
  }

  .hp2-header .hp2-header-actions,
  .hp2-header .ct-div-block.hp2-header-actions {
    order: 2;
    flex: 0 0 auto;
    display: flex !important;
    align-items: center !important;
    align-self: center !important;
    justify-content: flex-end !important;
    height: auto !important;
    min-height: 0 !important;
    gap: 0 !important;
  }

  /* Off-canvas must not affect header row alignment */
  .hp2-header .hp2-header-actions .oxy-pws-off-canvas {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: visible !important;
    pointer-events: none;
    z-index: 9999;
  }

  .hp2-header .hp2-header-actions .oxy-pws-off-canvas.pws-oc-active .pws-offcanvas-panel,
  .hp2-header .hp2-header-actions .oxy-pws-off-canvas.pws-oc-active .pws-oc-close-btn,
  .hp2-header .hp2-header-actions .oxy-pws-off-canvas.pws-oc-active .pws-offcanvas-backdrop,
  .hp2-header .hp2-header-actions .oxy-pws-off-canvas.pws-oc-active .pws-offcanvas-overlay {
    pointer-events: auto;
  }

  .hp2-header .hp2-header-actions .oxy-pws-off-canvas:not(.pws-oc-active) .pws-offcanvas-panel,
  .hp2-header .hp2-header-actions .oxy-pws-off-canvas:not(.pws-oc-active) .pws-offcanvas-backdrop {
    pointer-events: none !important;
  }

  /* Scrolled header backdrop-filter shrinks fixed panel height:100% */
  .hp2-header,
  .hp2-header.is-scrolled,
  .hp2-header .ct-section-inner-wrap,
  .hp2-header.is-scrolled .ct-section-inner-wrap,
  .hp2-header .hp2-header-actions {
    overflow: visible !important;
  }

  .hp2-header .oxy-pws-off-canvas .pws-offcanvas-panel {
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    max-height: none !important;
  }

  .hp2-header .oxy-pws-off-canvas .pws-offcanvas-backdrop {
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
  }

  /* Force flex over Oxygen's grid !important on the header wrap */
  html body .hp2-header .ct-section-inner-wrap {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  html[lang="ar"] body .hp2-header .ct-section-inner-wrap {
    /* Physical LTR chrome so logo stays right and menu stays left */
    direction: ltr !important;
  }

  html[lang="ar"] body .hp2-header .hp2-logo {
    order: 2 !important;
    margin-left: auto !important;
    margin-right: 0 !important;
  }

  html[lang="ar"] body .hp2-header .hp2-header-actions,
  html[lang="ar"] body .hp2-header .ct-div-block.hp2-header-actions {
    order: 1 !important;
    width: auto !important;
    max-width: max-content !important;
    flex: 0 0 auto !important;
    justify-content: flex-start !important;
    justify-self: start !important;
    margin: 0 !important;
  }

  html[lang="ar"] body .hp2-header .hp2-header-actions [id*="fancy_icon-"],
  html[lang="ar"] body .hp2-header .hp2-header-actions .ct-fancy-icon {
    margin: 0 !important;
  }

  .hp2-header .hp2-header-cta,
  .hp2-header .oxy-pws-button-animations,
  .hp2-header .ct-link-text[href*="contact-us"] {
    display: none !important;
  }

  /* Hide desktop pro menu on tablet/mobile — PWS off-canvas handles nav */
  .hp2-header .oxy-pro-menu,
  .hp2-header #-pro-menu-5-2481,
  .hp2-header #-pro-menu-5-2457 {
    display: none !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* Hamburger trigger (both languages) */
  .hp2-header [id*="fancy_icon-"],
  .hp2-header .hp2-header-actions .ct-fancy-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: center !important;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    margin: 0 !important;
    padding: 0;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    position: relative;
    z-index: 10001;
    pointer-events: auto !important;
    transition: border-color .25s, color .25s, background .25s;
  }
  .hp2-header.is-scrolled [id*="fancy_icon-"],
  .hp2-header.is-scrolled .hp2-header-actions .ct-fancy-icon {
    border-color: rgba(4,32,44,.22);
    color: #04202c;
  }
  .hp2-header [id*="fancy_icon-"] svg,
  .hp2-header .hp2-header-actions .ct-fancy-icon svg {
    width: 22px !important;
    height: 22px !important;
  }

  /* Off-canvas panel */
  .hp2-header .oxy-pws-off-canvas {
    --pws-oc-width: min(100vw, 380px);
  }

  html:not([lang="ar"]) .oxy-pws-off-canvas .pws-offcanvas-panel {
    width: min(100vw, 380px) !important;
    padding: 0 !important;
    background: #d7e3ec !important;
    box-shadow: -12px 0 40px rgba(0,19,29,.15);
  }

  html[lang="ar"] .oxy-pws-off-canvas .pws-offcanvas-panel {
    width: min(100vw, 380px) !important;
    padding: 0 !important;
    background: #d7e3ec !important;
    box-shadow: 12px 0 40px rgba(0,19,29,.15);
    left: 0 !important;
    right: auto !important;
  }

  html:not([lang="ar"]) .oxy-pws-off-canvas .pws-oc-close-btn {
    position: absolute;
    top: 13px;
    right: clamp(22px, 4vw, 28px);
    left: auto;
  }

  html[lang="ar"] .oxy-pws-off-canvas .pws-oc-close-btn {
    position: absolute;
    top: 13px;
    left: clamp(22px, 4vw, 28px);
    right: auto;
  }

  .hp2-header .oxy-pws-off-canvas .pws-oc-close-btn {
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid rgba(4,32,44,.12);
    border-radius: 50%;
    background: rgba(255,255,255,.65) !important;
    color: #04202c !important;
  }

  .hp2-header .oxy-pws-off-canvas .pws-oc-close-btn .pws-oc-btn-text {
    display: none !important;
  }

  .hp2-header .oxy-pws-off-canvas .oxy-pws-accordion-menu {
    padding: 72px 0 28px;
  }

  .hp2-header .oxy-pws-off-canvas .oxy-pws-accordion-menu .pws-acrd-item-text {
    font-size: clamp(18px, 4.2vw, 22px) !important;
    font-weight: 600 !important;
    color: #04202c !important;
    padding: 16px clamp(20px, 4vw, 28px) !important;
  }

  html[lang="ar"] .hp2-header .oxy-pws-off-canvas .oxy-pws-accordion-menu .pws-acrd-item-text {
    text-align: right;
  }

  .hp2-header .oxy-pws-off-canvas .oxy-pws-accordion-menu .menu-item a {
    border-bottom-color: #a8c2d3 !important;
  }

  .hp2-header .oxy-pws-off-canvas .oxy-pws-accordion-menu a:hover,
  .hp2-header .oxy-pws-off-canvas .oxy-pws-accordion-menu .current-menu-item > a {
    background: rgba(0,137,175,.08) !important;
  }

  html:not([lang="ar"]) .hp2-header .oxy-pws-off-canvas .oxy-pws-accordion-menu .sub-menu .pws-acrd-item-text {
    font-size: 15px !important;
    font-weight: 500 !important;
    padding-inline-start: 36px !important;
  }

  html[lang="ar"] .hp2-header .oxy-pws-off-canvas .oxy-pws-accordion-menu .sub-menu .pws-acrd-item-text {
    font-size: 15px !important;
    font-weight: 500 !important;
    padding-inline-end: 36px !important;
    text-align: right;
  }

  /* Mobile language switcher — flag-only row (matches desktop header) */
  .hp2-header .oxy-pws-off-canvas .hp2-lang-menu--mobile {
    display: block;
    padding: 68px clamp(20px, 4vw, 28px) 18px;
    margin: 0;
    border-bottom: 1px solid #a8c2d3;
    background: transparent;
  }

  html[lang="ar"] .hp2-header .oxy-pws-off-canvas .hp2-lang-menu--mobile {
    text-align: right;
  }

  .hp2-header .oxy-pws-off-canvas .hp2-lang-menu--mobile .hp2-lang-label {
    display: none;
  }

  .hp2-header .oxy-pws-off-canvas .hp2-lang-menu--mobile .hp2-lang-list,
  .hp2-header .oxy-pws-off-canvas .hp2-lang-menu--mobile > ul {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .hp2-header .oxy-pws-off-canvas .hp2-lang-menu--mobile .menu-item {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    min-width: 0;
  }

  .hp2-header .oxy-pws-off-canvas .hp2-lang-menu--mobile .menu-item a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    min-height: 0;
    padding: 4px;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
    text-decoration: none;
    color: #04202c;
    opacity: 0.88;
    transition: opacity 0.25s ease;
  }

  .hp2-header .oxy-pws-off-canvas .hp2-lang-menu--mobile .menu-item a img,
  .hp2-header .oxy-pws-off-canvas .hp2-lang-menu--mobile .menu-item a img.pws-language-custom-flag {
    display: inline-block !important;
    width: 18px;
    height: 13px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 1px;
    margin-inline-end: 0;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  }

  .hp2-header .oxy-pws-off-canvas .hp2-lang-menu--mobile .menu-item a .pws-language-emoji-flag {
    width: 18px;
    height: 13px;
    font-size: 18px;
  }

  .hp2-header .oxy-pws-off-canvas .hp2-lang-menu--mobile .menu-item a .pws-language-emoji-flag img.wp-smiley {
    width: 18px !important;
    height: 13px !important;
  }

  .hp2-header .oxy-pws-off-canvas .hp2-lang-menu--mobile .menu-item a span:not(.screen-reader-text) {
    display: none;
  }

  .hp2-header .oxy-pws-off-canvas .hp2-lang-menu--mobile .menu-item a:hover,
  .hp2-header .oxy-pws-off-canvas .hp2-lang-menu--mobile .current-lang > a,
  .hp2-header .oxy-pws-off-canvas .hp2-lang-menu--mobile .current-menu-item > a,
  .hp2-header .oxy-pws-off-canvas .hp2-lang-menu--mobile .lang-item-current > a,
  .hp2-header .oxy-pws-off-canvas .hp2-lang-menu--mobile .hp2-lang-item--active > a,
  .hp2-header .oxy-pws-off-canvas .hp2-lang-menu--mobile .pws-current-language > a,
  .hp2-header .oxy-pws-off-canvas .hp2-lang-menu--mobile a[aria-current="page"] {
    background: transparent;
    color: #04202c;
    box-shadow: none;
    opacity: 1;
  }

  .hp2-header .oxy-pws-off-canvas .pws-offcanvas-panel .hp2-lang-menu--mobile + .oxy-pws-accordion-menu {
    padding-top: 20px;
  }
}
