/* ==========================================================================
   Al Rahma Footer Styles
   Premium layered dark footer with gradient accent
   ========================================================================== */

/* ---------- Custom Properties ---------- */
.alrahma-footer {
  --footer-dark: #02435b;
  --footer-darker: #012e3f;
  --footer-darkest: #011e2a;
  --footer-primary: #ff2714;
  --footer-text: rgba(255, 255, 255, 0.75);
  --footer-text-muted: rgba(255, 255, 255, 0.5);
  --footer-heading: #ffffff;
  --footer-link: rgba(255, 255, 255, 0.75);
  --footer-link-hover: #ffffff;
  --footer-border: rgba(255, 255, 255, 0.1);
  --footer-radius: 8px;
}

/* ---------- Footer Base ---------- */
.alrahma-footer {
  direction: rtl;
  text-align: right;
  font-family: 'Fustat', sans-serif;
  color: var(--footer-text);
  position: relative;
  overflow: hidden;
}

/* ---------- Gradient Accent Bar ---------- */
.alrahma-footer-gradient-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--footer-primary) 0%, var(--footer-dark) 50%, var(--footer-primary) 100%);
  background-size: 200% 100%;
  animation: footerGradientSlide 4s ease infinite;
}

@keyframes footerGradientSlide {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 100% 0%; }
}

/* ---------- Main Footer ---------- */
.alrahma-footer-main {
  background-color: var(--footer-dark);
  padding: 70px 0 50px;
  position: relative;
}

/* Subtle pattern overlay */
.alrahma-footer-main::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 80%, rgba(255, 39, 20, 0.05) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

/* ---------- About Column ---------- */
.alrahma-footer-logo-link {
  display: inline-block;
  margin-bottom: 20px;
}

.alrahma-footer-logo {
  max-width: 180px;
  height: auto;
  filter: brightness(0) invert(1);
  transition: opacity 0.3s ease;
}

.alrahma-footer-logo-link:hover .alrahma-footer-logo {
  opacity: 0.85;
}

.alrahma-footer-desc {
  color: var(--footer-text);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 24px;
  max-width: 320px;
}

/* ---------- Social Icons ---------- */
.alrahma-footer-social {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.alrahma-footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--footer-text);
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.alrahma-footer-social a:hover {
  background: var(--footer-primary);
  border-color: var(--footer-primary);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 39, 20, 0.35);
}

/* ---------- Headings ---------- */
.alrahma-footer-heading {
  color: var(--footer-heading);
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  position: relative;
}

.alrahma-footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 3px;
  background: var(--footer-primary);
  border-radius: 2px;
}

/* ---------- Quick Links ---------- */
.alrahma-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.alrahma-footer-links li {
  margin-bottom: 10px;
}

.alrahma-footer-links li a {
  color: var(--footer-link);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 4px 0;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
  position: relative;
}

.alrahma-footer-links li a::before {
  content: '\f104'; /* fa-angle-left for RTL */
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-size: 0.75rem;
  margin-left: 8px;
  opacity: 0;
  transform: translateX(6px);
  transition: all 0.3s ease;
  color: var(--footer-primary);
}

.alrahma-footer-links li a:hover {
  color: var(--footer-link-hover);
  padding-right: 8px;
}

.alrahma-footer-links li a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

/* ---------- Contact List ---------- */
.alrahma-footer-contact-list {
  margin-bottom: 28px;
}

.alrahma-footer-contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  color: var(--footer-text);
  text-decoration: none;
  transition: color 0.3s ease;
}

a.alrahma-footer-contact-item:hover {
  color: var(--footer-link-hover);
}

a.alrahma-footer-contact-item:hover .alrahma-footer-contact-icon {
  background: var(--footer-primary);
  border-color: var(--footer-primary);
  color: #fff;
}

.alrahma-footer-contact-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--footer-primary);
  transition: all 0.3s ease;
}

.alrahma-footer-contact-icon--wa {
  color: #25d366;
}

a.alrahma-footer-contact-item:hover .alrahma-footer-contact-icon--wa {
  background: #25d366;
  border-color: #25d366;
  color: #fff;
}

.alrahma-footer-contact-item span {
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ---------- Newsletter ---------- */
.alrahma-footer-newsletter {
  margin-top: 10px;
}

.alrahma-footer-newsletter-title {
  color: var(--footer-heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.alrahma-footer-newsletter-group {
  display: flex;
  border-radius: var(--footer-radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: border-color 0.3s ease;
}

.alrahma-footer-newsletter-group:focus-within {
  border-color: var(--footer-primary);
}

.alrahma-footer-newsletter-input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.9rem;
  font-family: 'Fustat', sans-serif;
  direction: rtl;
}

.alrahma-footer-newsletter-input::placeholder {
  color: var(--footer-text-muted);
}

.alrahma-footer-newsletter-btn {
  background: var(--footer-primary);
  border: none;
  padding: 12px 20px;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.alrahma-footer-newsletter-btn:hover {
  background: #e0200f;
}

.alrahma-footer-newsletter-btn i {
  transition: transform 0.3s ease;
}

.alrahma-footer-newsletter-btn:hover i {
  transform: translateX(-3px) translateY(-2px);
}

/* ---------- Copyright Bar ---------- */
.alrahma-footer-copyright {
  background: var(--footer-darkest);
  padding: 20px 0;
  border-top: 1px solid var(--footer-border);
}

.alrahma-footer-copyright-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.alrahma-footer-copyright-inner p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--footer-text-muted);
}

.alrahma-footer-copyright-inner a {
  color: var(--footer-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.alrahma-footer-copyright-inner a:hover {
  color: #fff;
}

/* ==========================================================================
   Scroll-Reveal Animation
   ========================================================================== */
.alrahma-footer.alrahma-animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.alrahma-footer.alrahma-animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.alrahma-footer.is-visible .alrahma-footer-about,
.alrahma-footer.is-visible .alrahma-footer-heading,
.alrahma-footer.is-visible .alrahma-footer-contact-list,
.alrahma-footer.is-visible .alrahma-footer-newsletter {
  animation: footerFadeUp 0.6s ease forwards;
}

.alrahma-footer.is-visible .col-lg-4:first-child { animation-delay: 0.1s; }
.alrahma-footer.is-visible .col-lg-2 { animation-delay: 0.25s; }
.alrahma-footer.is-visible .col-lg-4:last-child { animation-delay: 0.4s; }

@keyframes footerFadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Tablet */
@media (max-width: 991.98px) {
  .alrahma-footer-main {
    padding: 50px 0 40px;
  }

  .alrahma-footer-desc {
    max-width: 100%;
  }
}

/* Mobile */
@media (max-width: 575.98px) {
  .alrahma-footer-main {
    padding: 40px 0 30px;
    text-align: center;
  }

  .alrahma-footer-heading::after {
    right: 50%;
    transform: translateX(50%);
  }

  .alrahma-footer-social {
    justify-content: center;
  }

  .alrahma-footer-desc {
    margin-left: auto;
    margin-right: auto;
  }

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

  .alrahma-footer-contact-item {
    justify-content: center;
  }

  .alrahma-footer-copyright-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .alrahma-footer-gradient-bar {
    animation: none;
  }

  .alrahma-footer.alrahma-animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .alrahma-footer.is-visible .alrahma-footer-about,
  .alrahma-footer.is-visible .alrahma-footer-heading,
  .alrahma-footer.is-visible .alrahma-footer-contact-list,
  .alrahma-footer.is-visible .alrahma-footer-newsletter {
    animation: none;
  }

  .alrahma-footer-social a:hover,
  .alrahma-footer-newsletter-btn:hover i {
    transform: none;
  }
}

/* ==========================================================================
   Print
   ========================================================================== */
@media print {
  .alrahma-footer-gradient-bar,
  .alrahma-footer-newsletter,
  .alrahma-footer-social {
    display: none !important;
  }

  .alrahma-footer-main {
    background: #fff !important;
    color: #333 !important;
    padding: 20px 0;
  }

  .alrahma-footer-heading {
    color: #333 !important;
  }

  .alrahma-footer-copyright {
    background: #eee !important;
  }
}
