
/* =========================================================
   Atlobni - Header Fix
   مستقل عن style.css - هيدر فقط
   ========================================================= */

.site-header{
  height:68px;
  position:relative;
  z-index:1000;
  background:#fff;
  border-bottom:1px solid #e8eef1;
}

.site-header .header-grid{
  position:relative;
  width:min(1180px,calc(100% - 48px));
  height:68px;
  margin:0 auto;
  display:block;
}

/* الشعار: يمين */
.site-header .brand-area{
  position:absolute;
  top:0;
  right:0;
  height:68px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  z-index:3;
}

.site-header .brand{
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:10px;
  white-space:nowrap;
}

.site-header .brand-mark{
  width:52px;
  height:52px;
  object-fit:contain;
  flex:0 0 auto;
}

.site-header .brand span{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
}

.site-header .brand strong{
  font-size:25px;
  line-height:1;
  color:#0c2c43;
}

.site-header .brand small{
  margin-top:5px;
  font-size:9px;
  line-height:1;
  color:#82909a;
}

/* القائمة: في المنتصف الحقيقي للشاشة */
.site-header .main-nav{
  position:absolute;
  top:0;
  left:50%;
  transform:translateX(-50%);
  width:max-content;
  height:68px;
  display:flex;
  align-items:stretch;
  justify-content:center;
  gap:27px;
  z-index:2;
}

.site-header .main-nav a{
  height:68px;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  white-space:nowrap;
  font-size:15px;
  color:#273c4b;
}

.site-header .main-nav a.active,
.site-header .main-nav a:hover{
  color:#008b68;
}

.site-header .main-nav a.active:after{
  content:"";
  position:absolute;
  right:0;
  left:0;
  bottom:0;
  height:3px;
  background:#08ae7b;
}

/* الأزرار: يسار */
.site-header .header-actions{
  position:absolute;
  top:0;
  left:0;
  height:68px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:9px;
  z-index:3;
}

.site-header .header-actions .btn{
  white-space:nowrap;
}

/* زر إغلاق القائمة - يظهر فقط في الجوال */
.site-header .nav-close{
  display:none;
}

/* زر القائمة */
.site-header .mobile-menu{
  display:none;
  width:44px;
  height:44px;
  padding:0;
  border:1px solid #d7e2e7;
  border-radius:11px;
  background:#fff;
  color:#0c2c43;
  font-size:24px;
  line-height:1;
  cursor:pointer;
}

/* الشاشات المتوسطة */
@media (max-width:1000px){
  .site-header .header-grid{
    width:calc(100% - 28px);
  }

  .site-header .main-nav{
    gap:15px;
  }

  .site-header .main-nav a{
    font-size:13px;
  }

  .site-header .brand strong{
    font-size:22px;
  }

  .site-header .brand-mark{
    width:48px;
    height:48px;
  }
}

/* الجوال */
@media (max-width:760px){
  body.header-menu-open{
    overflow:hidden;
  }

  .site-header,
  .site-header .header-grid{
    height:62px;
  }

  .site-header .header-grid{
    width:calc(100% - 20px);
  }

  .site-header .brand-area{
    top:0;
    right:0;
    height:62px;
  }

  .site-header .brand{
    gap:7px;
  }

  .site-header .brand-mark{
    width:44px;
    height:44px;
  }

  .site-header .brand strong{
    font-size:21px;
  }

  .site-header .brand small{
    font-size:8px;
    margin-top:4px;
  }

  /* أزرار الدخول/الانضمام لا تزاحم زر القائمة */
  .site-header .header-actions{
    left:0;
    top:0;
    height:62px;
    gap:7px;
  }

  .site-header .header-actions > .btn,
  .site-header .header-actions > .notify-wrap,
  .site-header .header-actions > .user-wrap{
    display:none !important;
  }

  .site-header .mobile-menu{
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }

  /* القائمة الجانبية */
  .site-header .main-nav{
    position:fixed;
    top:0;
    right:0;
    left:auto;
    width:min(320px,86vw);
    height:100dvh;
    max-height:100dvh;
    transform:translateX(110%);
    transition:transform .25s ease;
    display:flex;
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
    gap:0;
    padding:70px 14px 20px;
    background:#fff;
    border:0;
    border-radius:0;
    box-shadow:-20px 0 50px rgba(10,35,50,.18);
    overflow-y:auto;
    overflow-x:hidden;
    z-index:10001;
  }

  .site-header .main-nav.open{
    transform:translateX(0);
  }

  .site-header .main-nav a{
    height:auto;
    min-height:50px;
    width:100%;
    justify-content:flex-start;
    padding:13px 14px;
    border-radius:10px;
    font-size:15px;
    color:#243b4b;
  }

  .site-header .main-nav a.active,
  .site-header .main-nav a:hover{
    color:#008b68;
    background:#f1faf7;
  }

  .site-header .main-nav a.active:after{
    display:none;
  }

  .site-header .nav-close{
    display:flex;
    align-items:center;
    justify-content:center;
    position:absolute;
    top:15px;
    left:15px;
    width:40px;
    height:40px;
    border:0;
    border-radius:10px;
    background:#0c2c43;
    color:#fff;
    font-size:29px;
    line-height:1;
    cursor:pointer;
  }

  /* طبقة خلفية للقائمة */
  .site-header .main-nav.open:before{
    content:"";
    position:fixed;
    top:0;
    right:0;
    bottom:0;
    left:calc(-1 * (100vw - 100%));
    background:rgba(5,24,38,.45);
    z-index:-1;
    pointer-events:auto;
  }
}
