/*=============== MODERN FOOTER STYLES ===============*/

/* Override existing footer styles for modern design */
.footer {
  position: relative !important;
  background: linear-gradient(135deg, #0f1419 0%, #1a1a2e 100%) !important;
  padding: 3rem 1.25rem !important;
  color: #fff !important;
  overflow: hidden !important;
}

.footer::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: url('../img/section-title-bg.png') no-repeat center/cover !important;
  opacity: 0.05 !important;
  z-index: 0 !important;
}

.footer__container {
  position: relative !important;
  z-index: 1 !important;
  max-width: 100% !important;
  /* Full width */
  width: 100% !important;
  margin: 0 auto !important;
  padding: 0 1rem !important;
}

.footer__content {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
  gap: 2rem !important;
  margin-bottom: 3rem !important;
  align-items: start !important;
}

@media screen and (min-width: 992px) {
  .footer__content {
    grid-template-columns: 2fr 1fr 1fr 1.2fr !important;
    gap: 1.5rem !important;
    /* Ensure default desktop gap is also small */
  }
}

/* Footer Data Sections */
.footer__data {
  display: flex !important;
  flex-direction: column !important;
}

/* First column (Company Info) takes more space */
.footer__data:first-child {
  grid-column: 1 !important;
}

/* Other three columns are more compact */
.footer__data:nth-child(2),
.footer__data:nth-child(3),
.footer__data:nth-child(4) {
  min-width: 150px !important;
}

/* Footer Logo & Description */
.footer__logo {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  margin-bottom: 1rem !important;
  justify-content: flex-start !important;
  /* English: starts from left */
}

.footer__logo img {
  width: 40px !important;
  height: 40px !important;
  object-fit: contain !important;
}

.footer__logo h3 {
  color: #fff !important;
  font-size: var(--h3-font-size) !important;
  font-weight: var(--font-semi-bold) !important;
  margin: 0 !important;
}

.footer__description {
  color: rgba(255, 255, 255, 0.7) !important;
  line-height: 1.6 !important;
  margin-bottom: 1.5rem !important;
  font-size: var(--small-font-size) !important;
}

/* Social Links */
.footer__social {
  display: flex !important;
  gap: 1rem !important;
}

.footer__social-link {
  width: 40px !important;
  height: 40px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fff !important;
  font-size: 1.2rem !important;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
}

.footer__social-link:hover {
  background: #efc1a9 !important;
  transform: translateY(-5px) !important;
  color: #000 !important;
  box-shadow: 0 8px 20px rgba(239, 193, 169, 0.3) !important;
}

/* Footer Links */
.footer__title {
  color: #fff !important;
  font-size: var(--normal-font-size) !important;
  font-weight: var(--font-semi-bold) !important;
  margin-bottom: 1rem !important;
  position: relative !important;
  padding-bottom: 0.5rem !important;
}

.footer__title::after {
  content: '' !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 30px !important;
  height: 2px !important;
  background: #efc1a9 !important;
  border-radius: 2px !important;
}

.footer__links {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.footer__links li {
  margin-bottom: 0.6rem !important;
}

.footer__link {
  color: rgba(255, 255, 255, 0.7) !important;
  font-size: var(--small-font-size) !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  display: inline-block !important;
}

.footer__link:hover {
  color: #efc1a9 !important;
  transform: translateX(5px) !important;
}

.footer__info {
  display: flex !important;
  align-items: flex-start !important;
  gap: 0.6rem !important;
  color: rgba(255, 255, 255, 0.7) !important;
  font-size: var(--small-font-size) !important;
  margin-bottom: 0.6rem !important;
}

.footer__info i {
  color: #efc1a9 !important;
  font-size: 1rem !important;
  margin-top: 0.2rem !important;
  flex-shrink: 0 !important;
  width: 16px !important;
  text-align: center !important;
}

.footer__info span {
  line-height: 1.4 !important;
}

/* Footer Bottom */
.footer__bottom {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding-top: 2rem !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  flex-wrap: wrap !important;
  gap: 1rem !important;
}

.footer__copy {
  color: rgba(255, 255, 255, 0.6) !important;
  font-size: var(--smaller-font-size) !important;
  margin: 0 !important;
}

.footer__terms {
  display: flex !important;
  align-items: center !important;
  gap: 1rem !important;
  flex-wrap: wrap !important;
}

.footer__terms span {
  color: rgba(255, 255, 255, 0.3) !important;
}

.footer__terms-link {
  color: rgba(255, 255, 255, 0.6) !important;
  font-size: var(--smaller-font-size) !important;
  text-decoration: none !important;
  transition: color 0.3s ease !important;
}

.footer__terms-link:hover {
  color: #efc1a9 !important;
}

/* RTL Support for Footer - Only for Arabic pages */
body.rtl .footer__content {
  direction: rtl !important;
}

body.rtl .footer__data {
  align-items: flex-start !important;
  /* In RTL flex-start is Right */
  text-align: right !important;
}

body.rtl .footer__logo {
  justify-content: flex-start !important;
  flex-direction: row !important;
  /* Keep order: Img then Text (which is visually Right to Left) */
}

body.rtl .footer__logo img {
  margin-left: 0.75rem !important;
  margin-right: 0 !important;
}

body.rtl .footer__logo h3 {
  text-align: right !important;
}

body.rtl .footer__title::after {
  left: auto !important;
  right: 0 !important;
}

body.rtl .footer__link:hover {
  transform: translateX(-5px) !important;
}

body.rtl .footer__info {
  flex-direction: row !important;
  text-align: right !important;
}

body.rtl .footer__social {
  justify-content: flex-start !important;
}

body.rtl .footer__description {
  text-align: right !important;
}


/* Responsive Design */
@media screen and (max-width: 1200px) {
  .footer {
    padding: 2.5rem 1rem !important;
  }

  .footer__content {
    grid-template-columns: 2fr 1fr 1fr !important;
    gap: 1.2rem !important;
  }

  /* Stack contact info below on smaller screens */
  .footer__data:nth-child(4) {
    grid-column: 1 / -1 !important;
    margin-top: 1rem !important;
  }
}

@media screen and (max-width: 768px) {
  .footer {
    padding: 2rem 1rem !important;
    text-align: left !important;
    /* LTR Default */
  }

  .footer__content {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    text-align: left !important;
    /* LTR Default */
  }

  .footer__data {
    align-items: flex-start !important;
    /* Force left alignment */
  }

  .footer__title {
    text-align: left !important;
    display: block !important;
    width: 100% !important;
  }

  .footer__title::after {
    left: 0 !important;
    right: auto !important;
    transform: none !important;
    margin: 0 !important;
  }

  /* RTL overrides */
  body.rtl .footer {
    text-align: right !important;
  }

  body.rtl .footer__content {
    text-align: right !important;
  }

  body.rtl .footer__data {
    align-items: flex-start !important;
    /* In RTL flex-start is Right */
  }

  body.rtl .footer__title {
    text-align: right !important;
  }

  body.rtl .footer__title::after {
    left: auto !important;
    right: 0 !important;
  }

  .footer__data:nth-child(4) {
    grid-column: 1 !important;
    margin-top: 0 !important;
  }

  .footer__logo {
    justify-content: flex-start !important;
    /* Start aligned */
    flex-direction: row !important;
  }

  body.rtl .footer__logo {
    justify-content: flex-start !important;
    /* RTL Right aligned */
    flex-direction: row !important;
  }

  .footer__social {
    justify-content: flex-start !important;
    /* Start aligned */
  }

  .footer__description {
    text-align: left !important;
  }

  body.rtl .footer__description {
    text-align: right !important;
  }

  .footer__bottom {
    flex-direction: column !important;
    align-items: flex-start !important;
    /* Start aligned */
    text-align: left !important;
    gap: 1.5rem !important;
  }

  body.rtl .footer__bottom {
  /*  align-items: flex-start !important;*/
    /* RTL Right aligned */
    text-align: right !important;
  }

  .footer__terms {
    justify-content: flex-start !important;
  }
}

@media screen and (max-width: 480px) {
  .footer {
    padding: 1.5rem 0.75rem !important;
  }

  .footer__content {
    gap: 1.5rem !important;
  }

  .footer__logo img {
    width: 35px !important;
    height: 35px !important;
  }

  .footer__logo h3 {
    font-size: 1.1rem !important;
  }

  .footer__social-link {
    width: 36px !important;
    height: 36px !important;
    font-size: 1.1rem !important;
  }
}

/* Large Desktop - Better spacing for the three columns */
@media screen and (min-width: 1400px) {
  .footer {
    padding: 4rem 2rem !important;
  }

  .footer__content {
    grid-template-columns: 2.5fr 1fr 1fr 1.2fr !important;
    justify-content: space-between !important;
    gap: 1.5rem !important;
    /* Decreased gap to bring elements closer */
    max-width: 100% !important;
    margin: 0 auto 2rem auto !important;
  }

  .footer__container {
    max-width: 100% !important;
    padding: 0 4rem !important;
  }
}

/* Desktop - Optimized for three columns */
@media screen and (min-width: 992px) and (max-width: 1399px) {
  .footer__content {
    grid-template-columns: 2fr 1fr 1fr 1fr !important;
    gap: 1.5rem !important;
    /* Decreased gap */
    max-width: 100% !important;
    margin: 0 auto 2rem auto !important;
  }
}

/* Tablet - Full Width */
@media screen and (min-width: 769px) {
  .footer__container {
    padding: 0 2rem !important;
  }
}

/* Mobile Specific Adjustments - Consolidation */
@media screen and (max-width: 767px) {
  .footer__content {
    justify-content: flex-start !important;
    text-align: left !important;
  }

  .footer__title {
    margin-bottom: 1.5rem !important;
  }

  /* Reset Title underline for LTR Mobile */
  .footer__title::after {
    left: 0 !important;
    right: auto !important;
    transform: none !important;
    margin: 0 !important;
  }

  .footer__links {
    /*row-gap: 1rem !important;*/
  }

  .footer__info {
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: center !important;
  }

  /* RTL Mobile adjustments - Strict Override */
  body.rtl .footer__content {
    text-align: right !important;
    justify-content: flex-start !important;
  }

  body.rtl .footer__info {
    flex-direction: row !important;
    justify-content: flex-start !important;
    text-align: right !important;
  }

  body.rtl .footer__title::after {
    left: auto !important;
    right: 0 !important;
    transform: none !important;
  }
}