:root { --sia-header-height: 88px; --sia-header-navy: #162238; --sia-header-red: #e22d30; }
body.sia-life-header-active:not(.sia-has-hero) { padding-top: var(--sia-header-height) !important; }
body.admin-bar #sia-life-header { top: 32px; }
body:not(.admin-bar) #sia-life-header { top: 0; }
@media (max-width:782px) { body.admin-bar #sia-life-header { top:46px; } }
/* Hide only other theme/Elementor site headers after our JS confirms SIA header is active. Never hide wpadminbar. */
body.sia-life-header-active.sia-life-hide-previous #masthead,
body.sia-life-header-active.sia-life-hide-previous header.site-header,
body.sia-life-header-active.sia-life-hide-previous #site-header,
body.sia-life-header-active.sia-life-hide-previous .bb-header,
body.sia-life-header-active.sia-life-hide-previous .elementor-location-header { display: none !important; }
#sia-life-header, #sia-life-header *, .sia-life-search-dialog, .sia-life-search-dialog * {box-sizing:border-box;}
#sia-life-header { direction: rtl; position:fixed; left:0; right:0; width:100%; min-height:var(--sia-header-height); z-index:99990; color:#fff; background:var(--sia-header-navy); box-shadow:0 3px 16px rgba(4,9,19,.12); transition:background .25s ease,box-shadow .25s ease; font-family:"Cairo","Tajawal",Tahoma,Arial,sans-serif; }
body.sia-has-hero:not(.sia-life-scrolled) #sia-life-header { background:linear-gradient(180deg,rgba(12,21,37,.94) 0%,rgba(12,21,37,.58) 52%,rgba(12,21,37,0) 100%); box-shadow:none; }
#sia-life-header .sia-life-header__inner {max-width:1920px; min-height:var(--sia-header-height); margin:auto; padding:10px clamp(16px,2.4vw,42px); display:flex; align-items:center; justify-content:space-between; gap:clamp(12px,1.5vw,28px); }
#sia-life-header a {text-decoration:none; color:#fff;}
#sia-life-header button {color:inherit;font:inherit;cursor:pointer;}
.sia-life-header__logo {display:flex;flex:0 0 auto;align-items:center;justify-content:center;max-width:128px;min-width:72px;}
.sia-life-header__logo img {display:block;max-width:112px;max-height:65px;width:auto;height:auto;object-fit:contain;}
.sia-life-header__textlogo {display:block;color:white;font-size:23px;font-weight:800;white-space:nowrap;}
.sia-life-header__textlogo span {color:#f3d49d;}
.sia-life-header__nav {flex:1 1 auto; min-width:0; align-self:stretch; display:flex;align-items:center;justify-content:center;}
.sia-life-nav-list {list-style:none;margin:0;padding:0;display:flex;align-items:center;justify-content:center;gap:clamp(10px,1.5vw,26px);width:100%;}
.sia-life-nav-list li {list-style:none;position:relative;margin:0;padding:0;white-space:nowrap;}
#sia-life-header .sia-life-nav-list > li > a {display:flex;align-items:center;min-height:40px;line-height:1.5; font-size:clamp(13px,.87vw,17px);font-weight:700;white-space:nowrap;letter-spacing:0;transition:color .2s ease;}
#sia-life-header .sia-life-nav-list > li:nth-child(2) > a {color:#f7d48b;}
#sia-life-header .sia-life-nav-list > li > a:hover,#sia-life-header .sia-life-nav-list > li.current-menu-item > a,#sia-life-header .sia-life-nav-list > li.current-menu-ancestor > a {color:#ff6d65;}
.sia-life-nav-list .menu-item-has-children > a:after {content:'⌄';margin-right:7px;font-size:18px;line-height:1;}
.sia-life-nav-list .sub-menu {position:absolute;top:calc(100% - 1px);right:0;z-index:99992;min-width:205px;list-style:none;margin:0;padding:8px;display:none; flex-direction:column;background:#fff;border-radius:12px;box-shadow:0 10px 24px rgba(0,0,0,.2);}
.sia-life-nav-list li:hover > .sub-menu,.sia-life-nav-list li:focus-within > .sub-menu {display:flex;}
#sia-life-header .sia-life-nav-list .sub-menu a {display:block;color:#172238;font-weight:600;line-height:1.6;padding:9px 12px;font-size:14px;border-radius:8px;}
#sia-life-header .sia-life-nav-list .sub-menu a:hover {background:#f3f5f8;color:#b32225;}
#sia-life-header .sia-life-nav-list .sub-menu .sub-menu {top:0;right:100%;}
.sia-life-header__actions {display:flex;align-items:center;justify-content:flex-end;gap:10px;flex:0 0 auto;direction:ltr;}
#sia-life-header .sia-life-icon-button {position:relative;min-width:35px;width:35px;height:35px;padding:0;display:inline-flex;align-items:center;justify-content:center;color:#fff;border:0;background:transparent;border-radius:9px;}
#sia-life-header .sia-life-icon-button:hover {background:rgba(255,255,255,.14);}
.sia-life-icon-button svg {width:22px;height:22px;}
.sia-life-count {position:absolute;top:-2px;right:-4px;min-width:17px;height:17px;padding:0 3px;display:inline-flex;align-items:center;justify-content:center;border-radius:99px;background:#de252c;color:#fff;font:700 10px Arial,sans-serif;}
#sia-life-header .sia-life-login {display:inline-flex;align-items:center;justify-content:center;min-height:37px;padding:7px 15px;background:#c8262b;border-radius:6px;font-size:14px;font-weight:700;white-space:nowrap;}
#sia-life-header .sia-life-login:hover {background:#e13b40;}
#sia-life-header .sia-life-register {font-size:13px;font-weight:700;white-space:nowrap;}
.sia-life-header__user {position:relative;direction:rtl;}
#sia-life-header .sia-life-header__user-link {display:flex;align-items:center;gap:8px;max-width:210px;min-height:41px;padding:3px 8px;border-radius:9px;background:rgba(255,255,255,.11);}
.sia-life-header__username {font-size:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:130px;}
.sia-life-header__avatar img {display:block;width:35px;height:35px;border-radius:50%;object-fit:cover;}
.sia-life-header__user-menu {display:none;position:absolute;top:calc(100% + 4px);left:0;min-width:160px;background:#fff;border-radius:10px;padding:7px;box-shadow:0 7px 20px rgba(0,0,0,.2);}
.sia-life-header__user:focus-within .sia-life-header__user-menu,.sia-life-header__user:hover .sia-life-header__user-menu {display:block;}
#sia-life-header .sia-life-header__user-menu a {display:block;color:#172238;padding:9px 12px;border-radius:6px;font-size:13px;}
#sia-life-header .sia-life-header__user-menu a:hover {background:#f2f4f8;}
#sia-life-header .sia-life-menu-toggle {display:none;}
.sia-life-search-dialog[hidden] {display:none!important;}
.sia-life-search-dialog {position:fixed;inset:0;z-index:999995;display:flex;align-items:center;justify-content:center;padding:20px;font-family:"Cairo",Tahoma,Arial,sans-serif;}
.sia-life-search-dialog__backdrop {position:absolute;inset:0;background:rgba(6,11,23,.74);}
.sia-life-search-dialog__form {position:relative;z-index:1;background:white;border-radius:16px;box-shadow:0 20px 48px rgba(0,0,0,.3);width:min(92vw,700px);padding:28px;color:#162238;}
.sia-life-search-dialog__form label {display:block;font-size:20px;font-weight:700;margin:0 0 15px;}
.sia-life-search-dialog__row {display:flex;gap:9px;}
.sia-life-search-dialog__row input {flex:1;min-width:0;border:1px solid #cad1d8;border-radius:8px;padding:12px 14px;font:inherit;font-size:16px;color:#172238;background:#fff;}
.sia-life-search-dialog__row button {background:#c62828;border:0;border-radius:8px;color:white;font:700 15px inherit;padding:10px 23px;cursor:pointer;}
.sia-life-search-dialog__close {position:absolute;top:12px;left:12px;color:#162238;background:transparent;border:0;cursor:pointer;}
body.sia-search-open {overflow:hidden;}
@media(max-width:1200px) {
  #sia-life-header .sia-life-header__inner {gap:12px;padding:8px 16px;}
  .sia-life-header__username {max-width:85px;}
  #sia-life-header .sia-life-nav-list > li > a {font-size:13px;}
  .sia-life-nav-list {gap:12px;}
  .sia-life-header__actions {gap:5px;}
}
@media(max-width:1060px) {
  :root {--sia-header-height:74px;}
  #sia-life-header .sia-life-header__inner {min-height:var(--sia-header-height);gap:10px;}
  .sia-life-header__logo img {max-height:53px;max-width:94px;}
  #sia-life-header .sia-life-menu-toggle {display:inline-flex;}
  #sia-life-header .sia-life-header__nav {display:none;position:absolute;top:100%;right:0;left:0;max-height:calc(100vh - 80px);overflow-y:auto;padding:10px 18px 18px;background:#162238;box-shadow:0 12px 20px rgba(0,0,0,.2);}
  #sia-life-header .sia-life-header__nav.is-open {display:block;}
  .sia-life-nav-list {display:flex;flex-direction:column;align-items:stretch;gap:0;}
  #sia-life-header .sia-life-nav-list > li > a {font-size:15px;padding:11px 7px;border-bottom:1px solid rgba(255,255,255,.1);}
  .sia-life-nav-list .sub-menu, .sia-life-nav-list li:hover > .sub-menu,.sia-life-nav-list li:focus-within > .sub-menu {position:static;display:flex;box-shadow:none;border-radius:0;background:rgba(255,255,255,.06);margin:0 15px 5px 0;padding:4px 10px;}
  #sia-life-header .sia-life-nav-list .sub-menu a {color:#fff;}
}
@media(max-width:620px) {
  #sia-life-header .sia-life-header__inner {padding:7px 10px;}
  .sia-life-header__logo img {max-width:78px;max-height:48px;}
  #sia-life-header .sia-life-icon-button {min-width:30px;width:30px;}
  .sia-life-header__username,.sia-life-register {display:none !important;}
  #sia-life-header .sia-life-login {padding:7px 10px;min-height:33px;}
  #sia-life-header .sia-life-header__user-link {padding:3px;min-height:36px;}
  .sia-life-header__avatar img {width:30px;height:30px;}
  .sia-life-search-dialog__row {flex-direction:column;}
}

/* v1.0.2: English header is LTR; Arabic header remains untouched. */
#sia-life-header.sia-life-header--en {direction:ltr; font-family:Arial,Helvetica,sans-serif;}
#sia-life-header.sia-life-header--en .sia-life-header__user {direction:ltr;}
#sia-life-header.sia-life-header--en .sia-life-nav-list > li > a {font-family:Arial,Helvetica,sans-serif;font-size:clamp(12px,.83vw,16px);font-weight:700;}
#sia-life-header.sia-life-header--en .sia-life-nav-list .sub-menu {right:auto;left:0;}
#sia-life-header.sia-life-header--en .sia-life-nav-list .sub-menu .sub-menu {right:auto;left:100%;}
#sia-life-header.sia-life-header--en .sia-life-nav-list .menu-item-has-children > a:after {margin-right:0;margin-left:7px;}
#sia-life-header.sia-life-header--en .sia-life-header__user-menu {left:auto;right:0;}
.sia-life-search-dialog__form[dir="ltr"] {font-family:Arial,Helvetica,sans-serif;text-align:left;}
.sia-life-search-dialog__form[dir="ltr"] .sia-life-search-dialog__close {left:auto;right:12px;}
@media(max-width:1060px){
 #sia-life-header.sia-life-header--en .sia-life-nav-list > li > a {font-size:15px;}
 #sia-life-header.sia-life-header--en .sia-life-nav-list .sub-menu,
 #sia-life-header.sia-life-header--en .sia-life-nav-list li:hover > .sub-menu,
 #sia-life-header.sia-life-header--en .sia-life-nav-list li:focus-within > .sub-menu {margin:0 0 5px 15px;}
}


/* v1.0.3 — Mobile hero banner ONLY.
   Keep desktop presentation and all header/navigation styles unchanged.
   The hero is the existing Elementor container with CSS class "sia-hero".
   Its natural image ratio is populated by the small, scoped banner helper below. */
@media (max-width: 767px) {
  body .sia-hero {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: var(--sia-hero-mobile-image-ratio, 16 / 9) !important;
    background-size: contain !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;
    overflow: hidden;
  }

  /* Only if Elementor places the hero image on its background overlay. */
  body .sia-hero > .elementor-background-overlay {
    background-size: contain !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;
  }
}
