/* Site footer — matches home / services atmosphere (violet + blue) */

.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: auto;
  padding: 0;
  color: var(--text-color);
  background: linear-gradient(165deg, var(--hero-bg-from) 0%, var(--hero-bg-to) 100%);
  border-top: 1px solid var(--hero-border);
}

.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 12% 100%, color-mix(in srgb, #6366f1 14%, transparent), transparent 58%),
    radial-gradient(ellipse 60% 50% at 88% 80%, color-mix(in srgb, #2563eb 12%, transparent), transparent 55%),
    radial-gradient(ellipse 50% 40% at 50% 0%, var(--hero-glow) 0%, transparent 60%);
}

.footer-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.9fr 1fr;
  gap: 2.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2.5rem;
  align-items: start;
}

.footer-section {
  margin: 0;
}

.footer-section--brand {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: fit-content;
  text-decoration: none;
  color: var(--text-color);
  border-radius: 10px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-logo-link:hover {
  opacity: 0.88;
  transform: translateY(-2px);
}

.footer-logo-link:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 4px;
}

.footer-section .logo,
.footer-logo-link :global(svg) {
  width: 72px;
  height: 72px;
  display: block;
}

.footer-title {
  font-family: 'Marhey', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0.35rem 0 0.5rem;
  color: var(--text-color);
  letter-spacing: 0.01em;
}

.footer-section--brand .footer-title {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 45%, #2563eb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-text {
  font-family: 'Tajawal', sans-serif;
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0;
  color: var(--hero-sub, var(--text-color));
  opacity: 0.92;
  max-width: 22rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-color);
  background: color-mix(in srgb, var(--glass-bg) 90%, transparent);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px var(--glass-shadow);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    color 0.22s ease;
}

.social-link :global(svg) {
  width: 1.35rem;
  height: 1.35rem;
}

.social-link:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, #6366f1 45%, transparent);
  color: #6366f1;
  box-shadow: 0 8px 22px color-mix(in srgb, #6366f1 18%, transparent);
}

.dark-theme .social-link:hover {
  color: #a5b4fc;
}

.footer-links,
.footer-contact {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li,
.footer-contact li {
  margin-bottom: 0.65rem;
}

.footer-links a,
.footer-contact a {
  font-family: 'Tajawal', sans-serif;
  font-size: 0.95rem;
  color: var(--text-color);
  text-decoration: none;
  opacity: 0.88;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.footer-links a:hover,
.footer-contact a:hover {
  opacity: 1;
  color: #6366f1;
}

.dark-theme .footer-links a:hover,
.dark-theme .footer-contact a:hover {
  color: #a5b4fc;
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  opacity: 0.9;
}

.footer-contact i {
  margin-top: 0.2rem;
  width: 1rem;
  text-align: center;
  color: #6366f1;
  opacity: 0.85;
}

.dark-theme .footer-contact i {
  color: #818cf8;
}

.footer-bottom {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--hero-border);
  padding: 1.15rem 1.5rem;
  background: color-mix(in srgb, var(--glass-bg) 55%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.footer-bottom-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.copyright {
  font-family: 'Tajawal', sans-serif;
  font-size: 0.88rem;
  margin: 0;
  color: var(--hero-sub, var(--text-color));
  opacity: 0.85;
}

@media (max-width: 900px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1.5rem;
  }

  .footer-section--brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.75rem 1.15rem 2rem;
    text-align: center;
  }

  .footer-section--brand {
    align-items: center;
  }

  .footer-logo-link {
    margin-inline: auto;
  }

  .footer-text {
    max-width: none;
  }

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

  .footer-links a,
  .footer-contact li {
    justify-content: center;
  }

  .footer-contact li {
    justify-content: center;
    text-align: center;
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer {
    background: var(--bg-color);
  }

  .site-footer::before {
    opacity: 0.5;
  }
}
