html { scroll-behavior: smooth; }

.footer {
  background: #1D23D1;
  color: #fff;
  font-family: "Tajawal", sans-serif;
  padding: 40px 25px 10px;
  position: relative;
  font-size: 14px;
  overflow: hidden;
}

.footer a, .footer p, .footer span, .footer h3, .footer button {
  color: #fff;
  text-decoration: none;
  transition: 0.3s;
}
.footer a:hover { color: #fff; }

.footer-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10%;
  max-width: 90%;
  margin: 0 auto;
  width: 100%;
}

.btn-arrow {
  width: 15px;
  height: auto;
  transition: transform 0.3s, filter 0.3s;
}

/* العمود الأول */
.footer-col-left { display: flex; flex-direction: column; gap: 20px; }
.footer-logo { max-width: 150px; margin-bottom: 20px; }

.footer-links-container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.footer-links h3 {
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 600;
}

.footer-links a, .footer-links button {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.download-btn {
  padding: 7px 16px;
  border-radius: 12px;
  background-color: #00B9F2;
  color: #1D23D1;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
}
.download-btn:hover { background-color: #fff; color: #1D23D1; }

/* العمود الثاني */
.footer-col-contact { display: flex; flex-direction: column; gap: 20px; }

/* بيانات الاتصال */
.footer-contact-row {
   display: grid;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  text-align: center;
  grid-template-columns: repeat(4, 1fr);
}

.contact-item { flex: 1 1 45%; min-width: 120px; }
.contact-item img { width: 20px; margin-bottom: 3px; }
.contact-label { font-size: 10px; display: block; margin-bottom: 2px; }
.contact-value { font-size: 11px; }

/* السوشيال */
.footer-social {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.social-text { font-size: 12px; font-weight: 200; max-width: 40%; }

/* السهم */
.social-arrow {
  width: 20px;
  height: auto;
  transition: all 0.3s ease;
  filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%);
}
.footer-social:hover .social-arrow {
  transform: scale(1.1);
  filter: invert(80%) sepia(10%) saturate(500%) hue-rotate(180deg) brightness(90%);
}
html[dir="ltr"] .social-arrow { transform: scaleX(1); }
html[dir="rtl"] .social-arrow { transform: scaleX(-1); }

.social-icons { display: flex; gap: 10px; flex-wrap: wrap; }
.social-icons a img { width: 20px; height: 20px; transition: transform 0.3s, opacity 0.3s; }
.social-icons a:hover img { transform: scale(1.2); opacity: 0.8; }

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid #ccc;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0 0;
  flex-wrap: wrap;
  max-width: 90%;
  margin: 20px auto 0;
}
.footer-bottom-left { display: flex; align-items: center; gap: 8px; }
.divider { width: 1px; height: 14px; background: #ccc; }

/* ======== Responsive ======== */

/* أقل من 1000 */
@media (max-width: 1000px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }
  .footer-links-container { justify-content: center; gap: 15px; }
  .footer-col-contact { align-items: center; }
  .footer-social { justify-content: center; }
}

/* أقل من 700 */
@media (max-width: 700px) {
  .footer { padding: 40px 20px 10px; font-size: 12px; }
  .footer-links-container { flex-direction: row; flex-wrap: wrap; gap: 12px; }
  .footer-links-container > div { flex: 1 1 48%; }
  .footer-links h3 { font-size: 12px; margin-bottom: 6px; }
  .footer-links a, .footer-links button { font-size: 10px; }
  .footer-contact-row { flex-direction: row; flex-wrap: wrap; gap: 8px; justify-content: center; }
  .contact-item { flex: 1 1 48%; min-width: 0; }
  .contact-item img { width: 16px; }
  .contact-label { font-size: 9px; }
  .contact-value { font-size: 10px; }
  .footer-social { flex-wrap: wrap; justify-content: center; gap: 8px; }
  .social-text { font-size: 10px; max-width: 100%; }
  .social-icons a img { width: 16px; height: 16px; }
  .download-btn { display: block; margin: 0 auto; padding: 5px 12px; font-size: 9px; }
  .footer-logo { max-width: 100px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
   /* إخفاء كل الأقسام الأخرى ماعدا Branding و زر التحميل */
  .company,
  .btn-arrow,
  .social-arrow {
    display: none; /* إخفاء الجميع أولاً */
  }

  /* إبقاء قسم Branding */
  .footer-links-container > .footer-links.branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  /* إخفاء نص Stay Connected */
  .social-text { display: none; }

  /* ترتيب العمود الأيسر: الشعار + Branding */
  .footer-col-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  /* زر التحميل في الوسط */
  .download-btn {
    display: block;
    margin: 0 auto;
  }

  /* تقليل الفراغات */
  .footer {
    padding: 30px 15px 10px;
  }
}

/* أقل من 500 */
@media (max-width: 500px) {
  .footer-logo { max-width: 80px; }
  .footer { padding: 30px 15px 10px; font-size: 10px; }
  .footer-links-container { gap: 8px; }
  .footer-links h3 { font-size: 11px; }
  .footer-links a, .footer-links button { font-size: 9px; }
  .footer-contact-row { gap: 5px; }
  .contact-item img { width: 14px; }
  .contact-label, .contact-value { font-size: 8px; }
  .social-icons a img { width: 14px; height: 14px; }
  .download-btn { padding: 4px 10px; font-size: 8px; }
  .footer-bottom { margin: 15px auto; gap: 5px; }
}
