
/* لإصلاح مشكلة اختفاء القوائم المنسدلة */
.main-header,
.header-right,
.header-left {
  overflow: visible !important;
  z-index: 10000 !important;
}

.main-nav {
  position: relative;
  z-index: 99999;
}

.main-nav .menu li ul.sub-menu {
  z-index: 999999 !important;
  position: absolute;
  overflow: visible;
}





/* ===== Topbar FLEX RTL/LTR ===== */

.topbar-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* نص */
.topbar-text a {
    font-size: 15px;
    color: #fff;
    text-decoration: none;
}

/* إلغاء float القديم */
.topbar-left,
.topbar-right {
    float: none !important;
    width: auto !important;
}

/* ===== اتجاه RTL ===== */
[dir="rtl"] .topbar-flex {
    flex-direction: initial;   /* نص يمين - سوشيال يسار */
    text-align: right;
}



/* ===== اتجاه LTR ===== */
[dir="ltr"] .topbar-flex {
    flex-direction: row;           /* نص يسار - سوشيال يمين */
    text-align: left;
}

/* محاذاة السوشيال في الطرف */
.topbar-social {
    display: flex;
    gap: 10px;
}

/* للجوال */
@media (max-width: 991px) {
    .topbar-flex {
        flex-direction: column !important;
        text-align: center !important;
        gap: 10px;
    }

    .topbar-social {
        justify-content: center;
    }
}



/* ===== Topbar ===== */
.topbar {
  background: #052847;
  color: #fff;
  padding: 8px 20px;
  font-size: 14px;
}
.topbar a { color: #fff; margin-left: 12px; text-decoration: none; }

.topbar-right {
    width: 50%;
    font-size: 15px;
    padding: 6px;
    float: right;
    text-align: end;
}

.topbar-left {
    width: 50%;
    float: right;
}



/* عند أي لغة عربية */
html[lang^="ar"] .title[lang="en"] {
  display: none !important;
}

/* عند أي لغة إنجليزية */
html[lang^="en"] .title[lang="ar"] {
  display: none !important;
}


/* ===== Main Header ===== */
.main-header {
  background: #fff;
  padding: 15px 20px;
  border-bottom: 2px solid #5b5b5b;
}
.container.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo img { height: 55px; }

.menu {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}
.menu li { margin: 0 15px; }
.menu li a { color: #000; text-decoration: none; font-weight: 500; }

/* Button */
.btn-yellow {
  background: #5b5b5b;
  padding: 10px 18px;
  color: #000;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
}

/* ===== Mobile Menu ===== */
.mobile-menu-toggle {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: #000;
  border-radius: 2px;
}
.mobile-menu {
  display: none;
  position: fixed;
  top: 0; 
  width: 80%;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 5px rgba(0,0,0,0.1);
  padding: 20px;
  z-index: 9999;
}
.mobile-menu.active { display: block;  transform: translateX(0); }
.mobile-nav { list-style: none; padding: 0; margin: 0; }
.mobile-nav li { margin: 15px 0; }
.mobile-nav a { text-decoration: none; font-size: 18px; color: #000; }

/* Close Button */
.close-mobile {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  float: right;
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
  .menu { display: none; }
  .header-btn { display: none; }
  .mobile-menu-toggle { display: flex; }
  
  
  .topbar-right {
    align-items: center;
    text-align: center;
    width: 100%;
    padding: 12px;
    font-size: 19px;
}

 .main-nav {
    display: none;
  }
  
  
.topbar-right {
    width: 100%;
    
   
    float: right;
    text-align: center;
}

.topbar-left {
    width: 100%;
    float: right;
}

 .mariadeprma-social-icons {
                
                justify-content: center;
            }

}



@media (max-width: 768px) {
 
}

/* ===== قائمة سطح المكتب ===== */

/* الأساسيات */




.main-nav .menu {
    display: flex;
    gap: 0px;
    list-style: none;
    margin: 0;
    padding: 0;
    margin-right: 53px;
    font-size: 14px;
    margin-left: 6px;
    font-family: unset;
}


.main-nav .menu li {
  position: relative;
}

.main-nav .menu li a {
  text-decoration: none;
  color: var(--maria-text);
  display: block;
  font-weight: 500;
  transition: 0.3s ease;
  font-weight: 600; /* قيمة رقمية */

}

/* Hover */
.main-nav .menu li a:hover {
  color: var(--maria-primary);
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 6px;
}

/* Active */
.main-nav .menu li.current-menu-item > a,
.main-nav .menu li.current_page_item > a {
  color: var(--maria-primary);
  font-weight: bold;
}

/* القوائم الفرعية */
.main-nav .menu li ul.sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: white;
  border: 1px solid #eee;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  padding: 10px 0;
  display: none;
  z-index: 99999;
}

.main-nav .menu li:hover > ul.sub-menu {
  display: block;
}

.main-nav .menu li ul.sub-menu li a {
  padding: 10px 15px;
  color: #333;
  white-space: nowrap;
}

.main-nav .menu li ul.sub-menu li a:hover {
  background-color: var(--maria-secondary);
  color: #fff;
}


/* ===== قائمة الجوال  ===== */
.mobile-menu {
  position: fixed;
  top: 0;
  width: 260px;
  height: 100vh;
  background: white;
  transition: transform 0.3s ease;
  z-index: 10016;
  box-shadow: -3px 0 10px rgba(0,0,0,0.1);
  padding-top: 50px;
  overflow-y: auto;
}

/* الحالة الابتدائية: مخفية خارج الشاشة حسب اللغة */
[dir="rtl"] .mobile-menu {
  right: 0;
  left: auto;
   /* إلى اليمين */
}

[dir="ltr"] .mobile-menu {
  left: 0;
  right: auto;
  transform: translateX(-100%); /* إلى اليسار */
}

/* عند الفتح */
.mobile-menu.open {
  transform: translateX(0);
  padding-top: 77px;
}


.mobile-nav ul.sub-menu,
.mobile-nav li ul.sub-menu,
.sub-menu {
  list-style: none !important;
  margin: 0;
  padding: 0;
}


[dir="ltr"] .mobile-menu-header {
  position: absolute;
  top: 30px;
  right: 10px;
}

[dir="rtl"] .mobile-menu-header {
  position: absolute;
  top: 50px;
  left: 10px;
  
}


.close-mobile {
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  padding-top: 22px;
}

.mobile-nav li {
  border-bottom: 1px solid #eee;
  position: relative;
}

.mobile-nav li a {
  display: block;
  padding: 12px 20px;
  color: #000;
  text-decoration: none;
  font-size: 18px;
}

.mobile-nav li.menu-item-has-children > a::after {
  content: "▼";
  font-size: 12px;
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s ease;
  pointer-events: none;
}

.mobile-nav li.open > a::after {
  transform: translateY(-50%) rotate(180deg);
}

.sub-menu {
  display: none;
  padding-left: 20px;
  background: #f9f9f9;
}

.sub-menu.open {
  display: block;
}

.sub-menu li a {
  font-size: 16px;
  padding-left: 35px;
}


/* === القوائم الفرعية داخل الجوال === */
.mobile-nav li.menu-item-has-children > a {
  position: relative;
}

.mobile-nav li.menu-item-has-children > a::after {
  content: "▼";
  font-size: 10px;
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s;
}

.mobile-nav li.menu-item-has-children.open > a::after {
  transform: translateY(-50%) rotate(180deg);
}

/* القائمة الفرعية مخفية مبدئياً */
.mobile-nav .sub-menu {
  display: none;
  background: #f9f9f9;
}

.mobile-nav .sub-menu.open {
  display: block;
}

.mobile-nav .sub-menu li a {
  padding-left: 35px;
  font-size: 15px;
}

/* ===== خلفية مائلة تغطي الشعار بالكامل ومتناسقة ===== */
.main-header {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 80px;
  box-sizing: border-box;
  overflow: hidden;
  background: transparent;
}

/* الخلفية المائلة */
.main-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    110deg,
    var(--maria-primary) 0%,
    var(--maria-primary) 280px,  /* ← غطاء كامل للشعار */
    var(--maria-secondary) 280px,
    var(--maria-secondary) 100%
  );
  transition: all 0.3s ease;
  pointer-events: none;
}

/* RTL: نعكس الاتجاه */
[dir="rtl"] .main-header::before {
  background: linear-gradient(
    250deg,
    var(--maria-primary) 0%,
    var(--maria-primary) 300px,
    var(--maria-secondary) 300px,
    var(--maria-secondary) 100%
  );
}

/* ===== محتوى الهيدر ===== */
.header-left {
  flex: 0 0 210px; /* ← نفس القيمة في التدرج */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}
.header-right {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
}

/* الشعار */
.header-left img {
  height: 55px;
  display: block;
}

/* ترتيب العناصر حسب الاتجاه */
[dir="rtl"] .header-left  { order: 0; } /* الشعار يمين */
[dir="rtl"] .header-right { order: 1; }

[dir="ltr"] .header-left  { order: 0; } /* الشعار يسار */
[dir="ltr"] .header-right { order: 1; }

/* ===== زر القائمة (Mobile Menu Toggle) ===== */
.mobile-menu-toggle {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  position: absolute;
  top: 22px;
  z-index: 10;
}
.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: #000;
  border-radius: 2px;
}

/* في الجوال يظهر الزر */
@media (max-width: 991px) {
  .mobile-menu-toggle {
    display: flex;
  }

  /* RTL: الزر في الجهة المقابلة للشعار (يسار) */
  [dir="rtl"] .mobile-menu-toggle {
    left: 15px;
    right: auto;
  }

  /* LTR: الزر في الجهة المقابلة للشعار (يمين) */
  [dir="ltr"] .mobile-menu-toggle {
    right: 15px;
    left: auto;
  }

  .header-left {
    flex: 0 0 180px;
  }

  .main-header::before {
    background: linear-gradient(
      110deg,
      var(--maria-primary) 0%,
      var(--maria-primary) 180px,
      var(--maria-secondary) 180px,
      var(--maria-secondary) 100%
    );
  }

  [dir="rtl"] .main-header::before {
    background: linear-gradient(
      250deg,
      var(--maria-primary) 0%,
      var(--maria-primary) 280px,
      var(--maria-secondary) 280px,
      var(--maria-secondary) 100%
    );
  }
}


.menu-home a::before {
  font-family: "Font Awesome 6 Free";
  content: "\f015"; /* رمز الأيقونة من Font Awesome */
  margin-right: 8px;
  font-weight: 900;
}
.menu-about a::before {
  font-family: "Font Awesome 6 Free";
  content: "\f129";
  margin-right: 8px;
  font-weight: 900;
}

img.site-logo {
    max-width: max-content;
}
