html { scroll-behavior: smooth; }

.footer {
  background: linear-gradient(135deg, #0a001a 0%, #1a0033 50%, #0a001a 100%);
  color: #fff;
  font-family: var(--font-family);
  padding: 80px 40px 20px;
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(138, 43, 226, 0.2);
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(138, 43, 226, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(71, 13, 136, 0.1) 0%, transparent 50%);
  z-index: 0;
}

.footer a, .footer p, .footer span, .footer h3, .footer button {
  color: #fff;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

.footer-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* ====== العمود الأول ====== */
.footer-col-left {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.footer-logo {
  max-width: 180px;
  margin-bottom: 10px;
  filter: drop-shadow(0 4px 15px rgba(138, 43, 226, 0.3));
  transition: all 0.3s ease;
}

.footer-logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 6px 20px rgba(138, 43, 226, 0.5));
}

.footer-brand-desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  max-width: 400px;
  margin-bottom: 20px;
}

.footer-links-container {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-links {
  flex: 1;
  min-width: 150px;
}

.footer-links h3 {
  margin-bottom: 20px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
}

.footer-links h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, #8A2BE2, #470d88);
  border-radius: 2px;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a, .footer-links button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0;
  font-family: var(--font-family);
}

.footer-links a:hover, .footer-links button:hover {
  color: #fff;
  transform: translateX(5px);
}

.footer-links a:hover .btn-arrow,
.footer-links button:hover .btn-arrow {
  transform: translateX(3px);
}

.btn-arrow {
  width: 16px;
  height: 16px;
  transition: all 0.3s ease;
  filter: brightness(0) invert(1);
  opacity: 0.6;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  border-radius: 12px;
  background: linear-gradient(135deg, #8A2BE2 0%, #470d88 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(138, 43, 226, 0.2);
  margin-top: 10px;
}

.download-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(138, 43, 226, 0.3);
}

.download-btn:active {
  transform: translateY(-1px);
}

/* ====== العمود الثاني ====== */
.footer-col-contact {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.footer-contact-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #fff;
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
}

.footer-contact-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, #8A2BE2, #470d88);
  border-radius: 2px;
}

/* بيانات الاتصال */
.footer-contact-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.contact-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(138, 43, 226, 0.1);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.contact-item:hover {
  background: rgba(138, 43, 226, 0.1);
  transform: translateY(-5px);
  border-color: rgba(138, 43, 226, 0.3);
  box-shadow: 0 10px 20px rgba(138, 43, 226, 0.1);
}

.contact-icon {
  width: 24px;
  height: 24px;
  margin-bottom: 12px;
  filter: brightness(0) invert(1) sepia(1) saturate(5) hue-rotate(240deg);
  opacity: 0.8;
}

.contact-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 5px;
  display: block;
}

.contact-value {
  font-size: 1rem;
  color: #fff;
  font-weight: 500;
  line-height: 1.4;
}

/* السوشيال */
.footer-social {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(138, 43, 226, 0.1);
  border-radius: 20px;
  padding: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.footer-social:hover {
  background: rgba(138, 43, 226, 0.1);
  border-color: rgba(138, 43, 226, 0.3);
  transform: translateY(-5px);
}

.social-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  flex: 1;
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.social-icons a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #8A2BE2, #470d88);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.social-icons a:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(138, 43, 226, 0.2);
}

.social-icons a:hover::before {
  opacity: 1;
}

.social-icons a:hover img {
  filter: brightness(0) invert(1);
}

.social-icons img {
  width: 20px;
  height: 20px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  filter: brightness(0) invert(1);
}

.social-arrow {
  width: 24px;
  height: 24px;
  transition: all 0.3s ease;
  filter: brightness(0) invert(1);
  opacity: 0.7;
}

.footer-social:hover .social-arrow {
  transform: translateX(5px);
  opacity: 1;
}

html[dir="rtl"] .footer-social:hover .social-arrow {
  transform: translateX(-5px);
}

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 0 0;
  flex-wrap: wrap;
  max-width: 1400px;
  margin: 40px auto 0;
  position: relative;
  z-index: 1;
}

.footer-bottom-left {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.footer-copyright {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
}

.divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.3);
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
  position: relative;
}

.footer-bottom-links a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: #8A2BE2;
  transition: width 0.3s ease;
}

.footer-bottom-links a:hover {
  color: #fff;
}

.footer-bottom-links a:hover::after {
  width: 100%;
}

.footer-scroll-top {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(138, 43, 226, 0.2);
  border-radius: 12px;
  padding: 10px 20px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.footer-scroll-top:hover {
  background: rgba(138, 43, 226, 0.2);
  color: #fff;
  transform: translateY(-3px);
}

.footer-scroll-top i {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.footer-scroll-top:hover i {
  transform: translateY(-3px);
}

/* ====== RTL Support ====== */
html[dir="rtl"] .footer-links h3::after,
html[dir="rtl"] .footer-contact-title::after {
  left: auto;
  right: 0;
}

html[dir="rtl"] .footer-links a:hover,
html[dir="rtl"] .footer-links button:hover {
  transform: translateX(-5px);
}

html[dir="rtl"] .footer-links a:hover .btn-arrow,
html[dir="rtl"] .footer-links button:hover .btn-arrow {
  transform: translateX(-3px);
}

html[dir="rtl"] .footer-bottom-links a::after {
  left: auto;
  right: 0;
}

/* ====== Responsive ====== */

/* الأجهزة اللوحية الكبيرة */
@media (max-width: 1200px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 50px;
  }
  
  .footer-links-container {
    gap: 30px;
  }
}

/* الأجهزة اللوحية */
@media (max-width: 991px) {
  .footer {
    padding: 60px 30px 20px;
  }
  
  .footer-contact-row {
    grid-template-columns: 1fr;
  }
  
  .footer-social {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
  
  .social-text {
    max-width: 100%;
    text-align: center;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  
  .footer-bottom-left {
    justify-content: center;
  }
}

/* الأجهزة اللوحية الصغيرة */
@media (max-width: 768px) {
  .footer {
    padding: 50px 20px 20px;
  }
  
  .footer-links-container {
    flex-direction: column;
    gap: 30px;
  }
  
  .footer-links {
    min-width: 100%;
  }
  
  .footer-contact-row {
    grid-template-columns: 1fr;
  }
  
  .social-icons {
    justify-content: center;
  }
  
  .footer-bottom-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }
}

/* الهواتف الكبيرة */
@media (max-width: 576px) {
  .footer {
    padding: 40px 16px 20px;
  }
  
  .footer-brand-desc {
    font-size: 0.9rem;
  }
  
  .footer-links h3 {
    font-size: 1.1rem;
  }
  
  .footer-links a, .footer-links button {
    font-size: 0.9rem;
  }
  
  .contact-item {
    padding: 15px;
  }
  
  .contact-label {
    font-size: 0.8rem;
  }
  
  .contact-value {
    font-size: 0.9rem;
  }
  
  .footer-social {
    padding: 20px;
  }
  
  .social-text {
    font-size: 1rem;
  }
  
  .social-icons a {
    width: 40px;
    height: 40px;
  }
  
  .download-btn {
    padding: 10px 24px;
    font-size: 0.9rem;
  }
  
  .footer-copyright {
    font-size: 0.85rem;
  }
  
  .footer-bottom-links a {
    font-size: 0.85rem;
  }
}

/* الهواتف الصغيرة */
@media (max-width: 480px) {
  .footer {
    padding: 30px 12px 15px;
  }
  
  .footer-logo {
    max-width: 140px;
  }
  
  .footer-links h3 {
    font-size: 1rem;
    margin-bottom: 15px;
  }
  
  .footer-links a, .footer-links button {
    font-size: 0.85rem;
  }
  
  .contact-item {
    padding: 12px;
  }
  
  .contact-icon {
    width: 20px;
    height: 20px;
  }
  
  .contact-label {
    font-size: 0.75rem;
  }
  
  .contact-value {
    font-size: 0.85rem;
  }
  
  .footer-social {
    padding: 15px;
  }
  
  .social-text {
    font-size: 0.9rem;
  }
  
  .social-icons {
    gap: 10px;
  }
  
  .social-icons a {
    width: 36px;
    height: 36px;
  }
  
  .download-btn {
    padding: 8px 20px;
    font-size: 0.85rem;
  }
  
  .footer-scroll-top {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
}

/* أصغر الهواتف */
@media (max-width: 360px) {
  .footer {
    padding: 25px 10px 10px;
  }
  
  .footer-logo {
    max-width: 120px;
  }
  
  .footer-brand-desc {
    font-size: 0.8rem;
  }
  
  .footer-links h3 {
    font-size: 0.9rem;
  }
  
  .footer-links a, .footer-links button {
    font-size: 0.8rem;
  }
  
  .social-icons a {
    width: 32px;
    height: 32px;
  }
  
  .social-icons img {
    width: 16px;
    height: 16px;
  }
  
  .footer-copyright {
    font-size: 0.8rem;
  }
  
  .footer-bottom-links a {
    font-size: 0.8rem;
  }
}

/* ====== تأثيرات إضافية ====== */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.footer-logo {
  animation: float 6s ease-in-out infinite;
}

.footer {
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}