/* --- المتغيرات الأساسية (للتوافق) --- */
:root {
  --primary-color: #e63946;
  --dark-color: #1d3557;
  --light-color: #f1faee;
  --secondary-color: #ffd166;
  --glass-effect: rgba(255, 255, 255, 0.1);
  --footer-metal: #263044;
  --footer-purple: #5b304d;
  --footer-violet: #352748;
  --footer-line: rgba(217, 184, 108, 0.24);
}

/* --- تنسيق الفوتر المحسن --- */
.footer {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.13), transparent 24%),
    radial-gradient(circle at 86% 12%, rgba(151, 84, 172, 0.28), transparent 30%),
    linear-gradient(135deg, rgba(38, 48, 68, 0.9), rgba(53, 39, 72, 0.88) 46%, rgba(106, 47, 81, 0.84));
  color: var(--light-color);
  padding: 2rem 0;
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  border-top: 1px solid var(--footer-line);
  margin-top: auto; /* يدفعه لأسفل الصفحة */
  min-height: 120px; /* --- حل CLS: حجز مساحة للفوتر --- */
  box-sizing: border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 -18px 46px rgba(0, 0, 0, 0.24);
}

.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.16), transparent 18%, transparent 76%, rgba(217, 184, 108, 0.1)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 62px);
  mix-blend-mode: screen;
  opacity: 0.58;
}

/* --- الجزء العلوي (الشعار والروابط الرئيسية) --- */
.footer-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(217, 184, 108, 0.18);
}
.footer-logo .logo-text {
  font-weight: 900;
  font-size: 2.2rem;
  color: var(--light-color);
  text-decoration: none;
}
.footer-links {
  display: flex;
  gap: 2rem;
}
.footer-links a {
  color: var(--light-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s ease, background 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
}
.footer-links a:hover {
  color: var(--secondary-color);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

/* --- الجزء الجديد: قوائم الروابط الإضافية --- */
.footer-extra-links {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 2rem auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
.footer-widget {
  padding: 18px;
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035));
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.footer-widget .widget-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--light-color);
  margin: 0 0 1rem 0;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 0.5rem;
  display: inline-block;
}
.footer-widget .widget-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-widget .widget-menu li {
  margin-bottom: 0.7rem;
}
.footer-widget .widget-menu a {
  color: rgba(255, 255, 255, 0.74);
  text-decoration: none;
  transition: color 0.3s ease, padding-inline-start 0.3s ease;
}
.footer-widget .widget-menu a:hover {
  color: var(--light-color);
  padding-inline-start: 4px;
}

/* --- حقوق النشر --- */
.copyright {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(217, 184, 108, 0.16);
  font-size: 0.9rem;
  opacity: 0.8;
}

/* --- التجاوب مع الشاشات الصغيرة --- */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
  }
}

