/* ==========================================
   قائمة التنقل العلوية (Navbar)
   ========================================== */

nav {
  background: white;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

nav.scrolled {
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.15);
  padding: 10px 0;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* اللوجو */
.logo {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  transition: var(--transition);
}

.logo img {
  height: 50px;
  width: auto;
  transition: var(--transition);
}

.logo:hover img {
  transform: scale(1.05);
}

.logo-text {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-dark);
}

.logo-text span {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* قائمة الروابط */
.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
  align-items: center;
}

.nav-links a {
  color: var(--text-dark);
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  right: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--primary-color);
}

.nav-links a.active::after {
  width: 100%;
}

/* أيقونة القائمة في الجوال */
.menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  gap: 6px;
  padding: 0;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(10px, 10px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* الأزرار في navbar */
.nav-buttons {
  display: flex;
  gap: 15px;
  align-items: center;
}

.nav-buttons .btn {
  padding: 10px 20px;
  font-size: 0.95rem;
}

/* الاستجابة للأجهزة الصغيرة */
@media (max-width: 768px) {
  .navbar-container {
    padding: 12px 15px;
  }

  .logo img {
    height: 40px;
  }

  .logo-text {
    font-size: 1rem;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    right: -100%;
    flex-direction: column;
    background: white;
    width: 100%;
    text-align: right;
    padding: 20px;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-buttons {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .nav-buttons .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .navbar-container {
    padding: 10px 12px;
  }

  .logo img {
    height: 35px;
  }

  .logo-text {
    font-size: 0.9rem;
  }

  .nav-links {
    top: 60px;
  }
}
