@import url("../variables.css");

.main-header {
  font-family:  var(--font-family);  /* استبدل "Tajawal" بالخط الذي ترغب به */
}

html {
  scroll-behavior: smooth;
}

/* ====== الهيدر ====== */
/* ====== الهيدر ====== */
.main-header { 
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.85);  /* شفافية خفيفة */
  z-index: 1000;
  font-size: 20px;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(10px);  /* تأثير ضبابي على الخلفية */
}

/* إزالة التغيير عند التمرير */
.main-header.scrolled {
  background: rgb(255, 255, 255); /* شفافية ثابتة */
  box-shadow: none;  /* لا حاجة لتغيير shadow */
}

/* الحاوية الأساسية */
.container {
  max-width: 1300px;
  margin: auto;
  padding: 15px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img {
  height: 45px;
  transition: all 0.3s ease;
}

/* روابط التنقل */
.nav-links {
  display: flex;
  gap: 35px;
}

.nav-links a { 
  text-decoration: none;
  color: #1D23D1;
  font-weight: 500;
font-family: var(--font-family-main);
  position: relative;
  transition: color 0.3s, font-weight 0.3s;
}

.nav-links a:hover {
  color: #00B9F2;
}

.nav-links a.active {
  font-weight: 700;
  font-family: var(--font-family-main);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background-color: #00B9F2;
  border-radius: 2px;
}

/* الأزرار الجانبية */
.right-buttons {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* زر التواصل */
.contact-btn {
  background: #00B9F2;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 18px;
  
  font-family: var(--font-family-main);
  transition: background 0.3s ease, transform 0.2s;
}

.contact-btn:hover {
  background: #1D23D1;
  transform: scale(1.05);
}

/* أيقونة اللغة */
.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.lang-btn img.lang-icon {
  width: 24px;
  height: 24px;
  filter: brightness(0) saturate(100%) invert(12%) sepia(93%) saturate(5230%) hue-rotate(210deg) brightness(90%) contrast(102%);
}

/* قائمة اللغات */
/* حاوية قائمة اللغات */
.language-wrapper {
  position: relative;
  display: inline-block;
}

/* صندوق قائمة اللغات */
.lang-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #00B9F2; /* خلفية جميلة */
  border-radius: 8px;
  list-style: none;
  margin-top: 5px;
  padding: 0;
  min-width: 150px;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1); /* تأثير الظل */
  z-index: 999;
  transition: opacity 0.3s ease, transform 0.3s ease; /* تأثير ظهور/اختفاء */
  opacity: 0;
  transform: translateY(20px); /* تأثير الترجمة */
}

/* عند فتح القائمة */
.language-wrapper.active .lang-menu {
  display: block;
  opacity: 1;
  transform: translateY(0); /* إظهار القائمة بتأثير */
}

/* تصميم العناصر داخل القائمة */
.lang-menu li {
  padding: 12px 16px;
  cursor: pointer;
  color: #fff; /* نص أبيض */
  font-weight: 500;
  text-align: center;
  font-family: var(--font-family-main);
  transition: background-color 0.3s ease;
}

/* تأثير عند المرور على العناصر */
.lang-menu li:hover {
  background-color: #1D23D1; /* تغيير الخلفية عند التمرير */
}

/* أيقونة اللغة بجانب النص */
.lang-menu li img {
  width: 20px;
  margin-left: 10px;
  vertical-align: middle;
  transition: transform 0.3s ease; /* تأثير حركة الأيقونة */
}

/* تأثير حركة الأيقونة عند التمرير */
.lang-menu li:hover img {
  transform: translateX(5px); /* تحريك الأيقونة قليلاً عند التمرير */
}

/* زر اللغة (أيقونة اللغة) */
.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.3s ease;
}

/* تأثير عند التمرير على الأيقونة */
.lang-btn:hover {
  transform: scale(1.1); /* تكبير الأيقونة قليلاً */
}

.lang-btn img.lang-icon {
  width: 24px;
  height: 24px;
  filter: brightness(0) saturate(100%) invert(12%) sepia(93%) saturate(5230%) hue-rotate(210deg);
}

/* تأثير عند تغيير الاتجاه بين اللغات */
html[dir="ltr"] .lang-btn img.lang-icon {
  transform: rotate(0deg); /* الأيقونة في اللغة الإنجليزية */
}

html[dir="rtl"] .lang-btn img.lang-icon {
  transform: rotate(180deg); /* عكس الأيقونة في اللغة العربية */
}


/* ====== التجاوب ====== */

/* الشاشات المتوسطة */
@media (max-width: 1000px) {
  .container {
    padding: 12px 25px;
  }

  .logo img {
    height: 38px;
  }

  .contact-btn {
    padding: 8px 14px;
    font-size: 13px;
  }

  .main-header { 
  font-size: 16px;
}
}

/* الشاشات الصغيرة (الهواتف) */
@media (max-width: 700px) {
  .nav-links {
    display: none; /* 🚫 إخفاء روابط التنقل */
  }

  .logo img {
    height: 32px; /* 🔹 تصغير الشعار */
  }

  .contact-btn {
    padding: 6px 12px; /* 🔹 زر صغير */
    font-size: 12px;
    border-radius: 8px;
  }

  .right-buttons {
    gap: 10px;
  }
}
/* عند تغيير الاتجاه بين اللغات */
html[dir="ltr"] .language-wrapper .lang-menu {
  left: 0; /* فتح القائمة لليمين في اللغة الإنجليزية */
  right: auto;
}

