:root {
  --hms-bg: #e2ecfd;
  --hms-white: #ffffff;
  --hms-text: #0e3160;
  --hms-primary: #0952f4;
  --hms-primary-dark: #0e3160;
  --hms-cyan: #0ea5e9;
  --hms-cyan-soft: #46dee0;
  --hms-border: rgba(9,82,244,.16);
  --hms-shadow: 0 24px 60px rgba(10,34,80,.14);
  --hms-font: var(--hms-font-family, 'LamaSans', Arial, sans-serif);
}

.hms-header-shell, .hms-header-shell * { box-sizing: border-box; font-family: var(--hms-font); }
.hms-header-shell { direction: rtl; width: 100%; color: var(--hms-text); }
.hms-header-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 24px 32px;
  background: var(--hms-bg);
}
.hms-brand-region { flex: 0 0 auto; display:flex; align-items:center; }
.hms-logo-link { display:inline-flex; align-items:center; justify-content:flex-end; text-decoration:none; line-height:1; }
.hms-logo-link img, .hms-logo-link .custom-logo { width:auto !important; height:auto !important; max-height:58px !important; max-width:220px !important; object-fit:contain; display:block; }
.hms-logo-text { color: var(--hms-text); text-decoration:none; font-weight:700; font-size:28px; white-space:nowrap; }
.hms-nav-region { grid-area:nav; display:flex; justify-content:center; min-width:0; }
.hms-nav {
  position: relative;
}
.hms-top-menu {
  list-style:none; display:flex; align-items:center; justify-content:center; flex-wrap:nowrap; gap:10px; margin:0; padding:8px 10px; background:#fff; border-radius:24px;
  min-height: 72px; width:max-content; max-width:100%;
}
.hms-top-item { position:relative; }
.hms-top-link {
  text-decoration:none; color:var(--hms-text); font-size:15px; font-weight:700; border-radius:18px; padding: 12px 16px; display:flex; align-items:center; gap:8px; line-height:1; white-space:nowrap;
  transition:.25s ease;
}
.hms-top-item:hover > .hms-top-link,
.hms-top-item.is-open > .hms-top-link,
.hms-top-item.current-menu-item > .hms-top-link,
.hms-top-item.current-menu-ancestor > .hms-top-link {
  color:#fff; background:linear-gradient(180deg, var(--hms-cyan) 0%, var(--hms-primary) 100%);
}
.hms-chevron { display:inline-block; width:8px; height:8px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform: rotate(45deg) translateY(-1px); }
.hms-actions-region { grid-area:actions; display:flex; align-items:center; justify-self:start; gap:10px; width:max-content; max-width:420px; }
.hms-socials { display:flex; align-items:center; gap:10px; flex-wrap:nowrap; }
.hms-social { width:40px; height:40px; border-radius:12px; display:flex; align-items:center; justify-content:center; background:#fff; color:var(--hms-primary-dark); border:1px solid rgba(14,49,96,.08); text-decoration:none; }
.hms-social svg { width:20px; height:20px; stroke:currentColor; fill:none; stroke-width:1.75; }
.hms-social-facebook svg, .hms-social-linkedin svg, .hms-social-youtube svg, .hms-social-x svg { fill:currentColor; stroke:none; }
.hms-cta-group { display:flex; align-items:center; gap:10px; flex-wrap:nowrap; }
.hms-btn { display:inline-flex; align-items:center; gap:8px; text-decoration:none; padding: 0 18px; height:56px; border-radius:18px; font-size:15px; font-weight:700; white-space:nowrap; }
.hms-btn-primary { background:#0e3160; color:#fff; }
.hms-btn-primary:hover,.hms-btn-primary:focus{color:#fff;}
.hms-btn-outline:hover,.hms-btn-outline:focus{color:#0e3160;}
.hms-btn-outline { background:#fff; color:var(--hms-text); }
.hms-btn-arrow { display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; font-size:19px; line-height:1; color:#46dee0; }

.hms-submenu {
  display:none; position:absolute; top: calc(100% + 4px); right:0; list-style:none; margin:0; padding:12px; min-width:260px; background:#fff; border-radius:16px; box-shadow: var(--hms-shadow); z-index:80;
}
.hms-submenu::before{content:'';position:absolute;right:0;left:0;top:-12px;height:12px;background:transparent;}
.hms-submenu-item a { display:block; text-decoration:none; color:var(--hms-text); font-size:16px; font-weight:600; padding:10px 12px; border-radius:12px; }
.hms-submenu-item a:hover { background:#f4f8ff; }
.hms-top-item.is-open > .hms-submenu, .hms-top-item:hover > .hms-submenu { display:block; }

.hms-mega-panel {
  display:none; position:absolute; top:calc(100% + 4px); right:50%; transform:translateX(50%); min-width:1040px; max-width:1180px; z-index:90; background:#fff; border-radius:24px; box-shadow:var(--hms-shadow); padding:18px;
}
.hms-mega-panel::before{content:'';position:absolute;right:0;left:0;top:-14px;height:14px;background:transparent;}
.hms-top-item.is-open > .hms-mega-panel, .hms-top-item:hover > .hms-mega-panel { display:block; }
.hms-mega-grid { display:grid; direction:ltr; grid-template-columns: 1.05fr 1fr 1.15fr; gap:24px; align-items:stretch; }
.hms-mega-grid > *{direction:rtl;text-align:right;}
.hms-primary-column { border-right:1px solid rgba(9,82,244,.22); padding-right:16px; }
.hms-panel-title { margin: 4px 0 14px; font-size:18px; line-height:1.5; font-weight:700; color: var(--hms-primary); }
.hms-primary-list { display:flex; flex-direction:column; gap:10px; }
.hms-primary-item {
  display:block; width:100%; text-align:right; background:transparent; border:none; cursor:pointer; color:var(--hms-text); padding:14px 18px; border-radius:18px; font-size:17px; font-weight:700; transition:.22s ease;
}
.hms-primary-item:hover, .hms-primary-item.is-active {
  background: linear-gradient(270deg, rgba(70,222,224,.10) 0%, rgba(9,82,244,.06) 100%);
  border:1px solid rgba(70,222,224,.7);
}
.hms-secondary-column { padding-top:10px; }
.hms-secondary-inner { min-height:100%; }
.hms-secondary-list { display:flex; flex-direction:column; gap:18px; }
.hms-secondary-group { display:flex; flex-direction:column; gap:10px; }
.hms-secondary-link { font-size:17px; font-weight:700; text-decoration:none; color: var(--hms-text); }
.hms-secondary-link:hover, .hms-tertiary-link:hover, .hms-feature-link:hover { color: var(--hms-primary); }
.hms-tertiary-list { display:flex; flex-direction:column; gap:8px; padding-right:14px; margin-top:4px; }
.hms-tertiary-link { text-decoration:none; color:#30507f; font-size:15px; font-weight:600; }
.hms-section-link {
  display:inline-flex; align-items:center; justify-content:center; min-width:170px; min-height:76px; background:#f5f7fb; color: var(--hms-text); text-decoration:none; font-weight:700; font-size:20px; border-radius:18px;
}
.hms-feature-card-wrap { display:flex; }
.hms-feature-card { background:#fafbfd; border-radius:22px; padding:18px; min-height:100%; width:100%; display:flex; flex-direction:column; }
.hms-feature-media { border-radius:18px; overflow:hidden; height:170px; background:#eef4fb; margin-bottom:22px; }
.hms-feature-media img { width:100%; height:100%; object-fit:cover; display:block; }
.hms-feature-placeholder { width:100%; height:100%; background:linear-gradient(180deg, rgba(14,165,233,.12), rgba(9,82,244,.08)); }
.hms-feature-title { margin:0 0 10px; font-size:22px; font-weight:800; color:var(--hms-text); }
.hms-feature-description { margin:0 0 18px; font-size:15px; line-height:1.9; color:#4b5675; }
.hms-feature-link { margin-top:auto; display:inline-flex; align-items:center; gap:6px; color:var(--hms-primary); font-size:16px; font-weight:700; text-decoration:none; }
.hms-nav-empty { background:#fff4f4; color:#7c1e1e; padding:12px 16px; border-radius:12px; }

@media (max-width: 1280px) {
  .hms-header-wrap { grid-template-columns:minmax(200px,max-content) minmax(320px,1fr) minmax(210px,max-content); padding: 16px 18px; column-gap:14px; }
  .hms-top-link { font-size:14px; padding:11px 13px; }
  .hms-btn { height:52px; font-size:14px; }
  .hms-social { width:38px; height:38px; }
  .hms-mega-panel { min-width:920px; }
}
@media (max-width: 1024px) {
  .hms-header-wrap { direction:rtl; grid-template-columns:1fr; grid-template-areas:'brand' 'actions' 'nav'; row-gap:14px; }
  .hms-brand-region { justify-self:end; }
  .hms-actions-region { justify-self:start; max-width:none; }
  .hms-nav-region { justify-content:stretch; }
  .hms-top-menu { flex-wrap:wrap; justify-content:center; width:100%; }
  .hms-mega-panel { min-width:0; width:100vw; max-width:100vw; right:0; transform:none; border-radius:0; }
  .hms-mega-grid { grid-template-columns:1fr; }
  .hms-primary-column { border-left:none; padding-left:0; order:1; }
  .hms-secondary-column { order:2; }
  .hms-feature-card-wrap { order:3; }
}
@media (max-width: 767px) {
  .hms-header-wrap { padding:14px; }
  .hms-logo-link img, .hms-logo-link .custom-logo { max-height:42px !important; max-width:180px !important; }
  .hms-actions-region { width:100%; justify-content:space-between; }
  .hms-socials { gap:8px; }
  .hms-social { width:40px; height:40px; border-radius:12px; }
  .hms-cta-group { gap:8px; }
  .hms-btn { height:48px; border-radius:14px; font-size:15px; padding:0 14px; }
  .hms-top-menu { min-height:initial; gap:6px; border-radius:18px; }
  .hms-top-link { font-size:15px; padding:10px 12px; }
  .hms-mega-panel { position:static; display:none!important; }
  .hms-submenu { position:static; display:none; box-shadow:none; border-radius:12px; margin-top:8px; }
  .hms-top-item.is-open > .hms-submenu { display:block; }
}

.hms-top-item{padding-bottom:6px;margin-bottom:-6px;}
.hms-top-item.has-mega>.hms-top-link,.hms-top-item.has-submenu>.hms-top-link{position:relative;z-index:2;}
.hms-mega-panel,.hms-submenu{pointer-events:auto;}

/* v4 hard overrides */
.hms-header-wrap{
  direction:ltr !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:16px !important;
  padding:14px 24px !important;
}
.hms-actions-region,
.hms-nav-region,
.hms-brand-region{direction:rtl !important;}
.hms-actions-region{order:1 !important; flex:0 0 auto !important; justify-self:auto !important;}
.hms-nav-region{order:2 !important; flex:1 1 auto !important; justify-content:center !important;}
.hms-brand-region{order:3 !important; flex:0 0 auto !important; justify-self:auto !important;}
.hms-top-menu{min-height:64px !important; gap:10px !important; padding:8px 14px !important;}
.hms-btn{height:54px !important; padding:0 18px !important; font-size:15px !important;}
.hms-logo-link img,.hms-logo-link .custom-logo{max-height:54px !important; max-width:230px !important;}
.hms-mega-grid{direction:ltr !important; grid-template-columns:1.05fr 1fr 1.15fr !important;}
.hms-feature-card-wrap{order:1 !important;}
.hms-secondary-column{order:2 !important;}
.hms-primary-column{order:3 !important; border-right:1px solid rgba(9,82,244,.22) !important; border-left:none !important; padding-right:16px !important; padding-left:0 !important;}
.hms-btn-primary,
.hms-btn-primary:hover,
.hms-btn-primary:focus{color:#fff !important;}
@media (max-width:1280px){
  .hms-header-wrap{gap:12px !important; padding:14px 18px !important;}
  .hms-logo-link img,.hms-logo-link .custom-logo{max-height:48px !important; max-width:210px !important;}
  .hms-btn{height:50px !important; font-size:14px !important; padding:0 16px !important;}
}
@media (max-width:1024px){
  .hms-header-wrap{direction:rtl !important; display:grid !important; grid-template-columns:1fr !important; gap:14px !important;}
  .hms-brand-region{order:1 !important; justify-content:flex-end !important;}
  .hms-actions-region{order:2 !important; justify-content:space-between !important;}
  .hms-nav-region{order:3 !important;}
  .hms-mega-grid{grid-template-columns:1fr !important;}
  .hms-primary-column{order:1 !important; border-right:none !important; padding-right:0 !important;}
  .hms-secondary-column{order:2 !important;}
  .hms-feature-card-wrap{order:3 !important;}
}


/* v5 refinements */
.hms-header-wrap{
  gap:22px !important;
}
.hms-actions-region{
  gap:16px !important;
}
.hms-socials{
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  margin-inline-end:4px !important;
  flex:0 0 auto !important;
}
.hms-cta-group{
  display:flex !important;
  align-items:center !important;
  gap:14px !important;
  flex:0 0 auto !important;
}
.hms-social{
  width:44px !important;
  height:44px !important;
}
.hms-logo-link img,.hms-logo-link .custom-logo{
  max-height:50px !important;
  max-width:210px !important;
}
.hms-btn{
  min-width:166px !important;
  height:50px !important;
  padding:0 16px !important;
  font-size:14px !important;
}
.hms-top-menu{
  position:relative !important;
  gap:18px !important;
  padding:8px 18px !important;
}
.hms-top-item.has-mega{position:static !important;}
.hms-top-item.has-submenu{position:relative !important;}
.hms-mega-panel{
  right:auto !important;
  left:50% !important;
  transform:translateX(-50%) !important;
  width:min(1100px, calc(100vw - 48px)) !important;
  min-width:0 !important;
  max-width:1100px !important;
  top:calc(100% + 14px) !important;
}
.hms-mega-panel::before{
  top:-18px !important;
  height:18px !important;
}
.hms-mega-grid{
  grid-template-columns:1.05fr 1fr 1.05fr !important;
  gap:28px !important;
}
.hms-btn-primary,.hms-btn-primary:hover,.hms-btn-primary:focus,.hms-btn-primary:active{
  color:#fff !important;
}
@media (max-width: 1366px){
  .hms-header-wrap{gap:16px !important;padding:14px 18px !important;}
  .hms-top-menu{gap:14px !important;padding:8px 14px !important;}
  .hms-btn{min-width:150px !important;height:48px !important;font-size:13px !important;padding:0 14px !important;}
  .hms-social{width:42px !important;height:42px !important;}
  .hms-logo-link img,.hms-logo-link .custom-logo{max-height:46px !important;max-width:190px !important;}
  .hms-mega-panel{width:min(1020px, calc(100vw - 40px)) !important;}
}
@media (max-width:1024px){
  .hms-actions-region{gap:10px !important;}
  .hms-socials{gap:8px !important;margin-inline-end:0 !important;}
  .hms-cta-group{gap:10px !important;}
}


/* v6 social trigger + hover refinements */
.hms-header-wrap{gap:16px !important;padding:12px 18px !important;}
.hms-actions-region{gap:12px !important;}
.hms-cta-group{gap:10px !important;}
.hms-btn{min-width:138px !important;height:46px !important;padding:0 14px !important;font-size:13px !important;transition:transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease !important;}
.hms-btn:hover,.hms-btn:focus-visible{transform:translateY(-1px) !important;box-shadow:0 10px 24px rgba(9,82,244,.12) !important;}
.hms-btn-primary:hover,.hms-btn-primary:focus-visible{background:#083fbe !important;color:#fff !important;}
.hms-btn-outline:hover,.hms-btn-outline:focus-visible{background:#f2f7ff !important;border-color:#b9d8ff !important;color:#083fbe !important;}
.hms-btn-outline:hover .hms-btn-arrow,.hms-btn-outline:focus-visible .hms-btn-arrow{color:#22cfe0 !important;}
.hms-logo-link img,.hms-logo-link .custom-logo{max-height:44px !important;max-width:185px !important;}
.hms-top-menu{gap:14px !important;padding:8px 12px !important;}
.hms-top-link{font-size:15px !important;padding:11px 10px !important;}
.hms-socials{display:none !important;}
.hms-social-menu{position:relative;display:flex;align-items:center;justify-content:center;flex:0 0 auto;}
.hms-social-menu::after{content:'';position:absolute;top:100%;left:50%;transform:translateX(-50%);width:72px;height:16px;background:transparent;}
.hms-social-trigger{width:48px;height:48px;border-radius:16px;border:1px solid rgba(9,82,244,.10);background:#fff;color:#0b2f66;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;box-shadow:0 8px 22px rgba(9,82,244,.08);}
.hms-social-trigger svg{width:24px;height:24px;display:block;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
.hms-social-trigger:hover,.hms-social-trigger:focus-visible,.hms-social-menu:hover .hms-social-trigger,.hms-social-menu:focus-within .hms-social-trigger{transform:translateY(-1px);border-color:#b9d8ff;background:#f5faff;box-shadow:0 10px 24px rgba(9,82,244,.12);outline:none;}
.hms-social-panel{position:absolute;top:calc(100% + 2px);left:50%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:10px;padding:12px 10px;border-radius:18px;background:#fff;border:1px solid rgba(9,82,244,.08);box-shadow:0 14px 34px rgba(9,82,244,.14);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .18s ease, visibility .18s ease, transform .18s ease;z-index:40;}
.hms-social-menu:hover .hms-social-panel,.hms-social-menu:focus-within .hms-social-panel,.hms-social-menu.is-open .hms-social-panel{opacity:1;visibility:visible;pointer-events:auto;transform:translateX(-50%) translateY(0);} 
.hms-social-menu.is-open .hms-social-trigger{transform:translateY(-1px);border-color:#b9d8ff;background:#f5faff;box-shadow:0 10px 24px rgba(9,82,244,.12);} 
.hms-social{width:42px !important;height:42px !important;}
.hms-social-panel .hms-social{box-shadow:none !important;}
.hms-social-panel .hms-social:hover,.hms-social-panel .hms-social:focus-visible{transform:translateY(-1px);background:#f5faff !important;border-color:#b9d8ff !important;outline:none;}
.hms-mega-panel{width:min(1000px, calc(100vw - 36px)) !important;max-width:1000px !important;}
.hms-mega-grid{gap:22px !important;padding:26px !important;grid-template-columns:1fr .9fr 1fr !important;}
.hms-primary-column,.hms-secondary-column,.hms-feature-card-wrap{min-width:0;}
.hms-primary-item,.hms-secondary-link,.hms-tertiary-link{transition:background-color .18s ease, color .18s ease, border-color .18s ease;}
.hms-secondary-link:hover,.hms-secondary-link:focus-visible,.hms-tertiary-link:hover,.hms-tertiary-link:focus-visible{background:#eef6ff !important;color:#0b2f66 !important;outline:none;}
.hms-primary-item:hover,.hms-primary-item:focus-visible{background:#eef6ff !important;color:#0b2f66 !important;outline:none;}
.hms-primary-item:hover .hms-primary-item-title,.hms-primary-item:focus-visible .hms-primary-item-title,.hms-secondary-link:hover,.hms-tertiary-link:hover{color:#0b2f66 !important;}
@media (max-width: 1366px){
  .hms-header-wrap{gap:12px !important;padding:12px 14px !important;}
  .hms-btn{min-width:126px !important;height:44px !important;padding:0 12px !important;font-size:12px !important;}
  .hms-logo-link img,.hms-logo-link .custom-logo{max-height:40px !important;max-width:170px !important;}
  .hms-top-menu{gap:12px !important;padding:7px 10px !important;}
  .hms-top-link{font-size:14px !important;padding:10px 8px !important;}
  .hms-mega-panel{width:min(940px, calc(100vw - 28px)) !important;max-width:940px !important;}
}
@media (max-width: 1024px){
  .hms-social-panel{left:auto;right:0;transform:none;}
  .hms-social-menu:hover .hms-social-panel,.hms-social-menu:focus-within .hms-social-panel{transform:none;}
}
