/* ========== Header ========== */
.main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 1.2rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ========== Logo ========== */
.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 50px;
  width: auto;
  object-fit: contain;
  transition:
    transform 0.35s ease,
    filter 0.35s ease;
  filter: drop-shadow(0 4px 10px rgba(59, 130, 246, 0.25));
}

.logo img:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 6px 18px rgba(79, 70, 229, 0.4));
}

/* ========== Navigation ========== */
.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  position: relative;
  text-decoration: none;
  color: var(--muted-text);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-alt), var(--accent));
  transition: width 0.35s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-color);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* ========== Mobile Menu Icon ========== */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.menu-toggle span {
  width: 26px;
  height: 2px;
  background: var(--text-color);
  transition: all 0.3s ease;
}

/* ========== Responsive Header ========== */
@media (max-width: 768px) {
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    display: none;
  }

  .nav-links {
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.5rem;
  }

  .menu-toggle {
    display: flex;
  }

  .nav.active {
    display: block;
    animation: slideDown 0.35s ease forwards;
  }
}

/* ========== Animation ========== */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== Footer ========== */
/* ================= Footer ================= */
#main-footer {
  background: #f9fafb; /* فاتحة */
  color: #0f172a;
  font-family: "Inter", sans-serif;
  padding: 3rem 2rem 1.5rem 2rem;
  border-top: 1px solid #e2e8f0;
}

#main-footer .footer-wrapper {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  gap: 2rem;
  padding: 0 1.2rem; /* padding داخلي لتوحيد المسافة مع الأطراف */
}

/* ---------- Brand ---------- */
#main-footer .footer-brand {
  flex: 1 1 280px;
}

#main-footer .footer-brand img {
  width: 160px;
  margin-bottom: 1rem;
}

#main-footer .footer-brand p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #334155;
}

/* ---------- Links ---------- */
#main-footer .footer-links {
  flex: 1 1 180px;
}

#main-footer .footer-links h4 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #4f46e5; /* accent */
  letter-spacing: 0.5px;
}

#main-footer .footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#main-footer .footer-links li {
  margin-bottom: 0.6rem;
}

#main-footer .footer-links a {
  text-decoration: none;
  color: #334155;
  font-weight: 500;
  transition: color 0.3s ease;
}

#main-footer .footer-links a:hover {
  color: #7c3aed; /* accent-alt */
}

/* ---------- Social Media ---------- */
#main-footer .footer-social {
  flex: 1 1 180px;
}

#main-footer .footer-social h4 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #4f46e5; /* accent */
  letter-spacing: 0.5px;
}

#main-footer .footer-social-icons {
  display: flex;
  gap: 1rem;
}

#main-footer .footer-social-icons a {
  font-size: 1.6rem;
  color: #334155;
  transition: all 0.3s ease;
}

#main-footer .footer-social-icons a:hover {
  color: #7c3aed;
  transform: translateY(-3px);
}

/* ---------- Bottom ---------- */
#main-footer .footer-bottom {
  text-align: center;
  margin-top: 2.5rem;
  font-size: 0.85rem;
  color: #64748b;
  border-top: 1px solid #e2e8f0;
  padding-top: 1rem;
}

/* ================= Responsive ================= */
@media (max-width: 1024px) {
  #main-footer .footer-wrapper {
    justify-content: space-around;
  }
}

@media (max-width: 768px) {
  #main-footer .footer-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 0 1rem;
  }

  #main-footer .footer-brand,
  #main-footer .footer-links,
  #main-footer .footer-social {
    flex: 1 1 100%;
  }

  #main-footer .footer-social-icons {
    gap: 0.8rem;
  }
}
