/* ========================================================================== 
   FOOTER STYLES
   Redesigned shared footer with clear hierarchy and responsive layout
   ========================================================================== */

.main-footer {
  --footer-ink: #f4e7da;
  --footer-muted: #d2b9a0;
  --footer-accent: #f08a33;
  --footer-accent-strong: #d76c1a;
  --footer-surface: #1d1510;
  --footer-surface-soft: #2c2119;

  margin-top: var(--space-20, 5rem);
  color: var(--footer-ink);
  background:
    radial-gradient(1200px 420px at 10% 0%, rgba(255, 153, 77, 0.2), transparent 55%),
    radial-gradient(900px 320px at 90% 100%, rgba(255, 127, 31, 0.12), transparent 60%),
    linear-gradient(165deg, #120d09 0%, #1a130f 40%, #221912 100%);
  position: relative;
  overflow: hidden;
}

/* Keep footer text readable even if page-level CSS is aggressive. */
.main-footer,
.main-footer p,
.main-footer li,
.main-footer span {
  color: #f3e9de;
}

.main-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.2));
}

.footer-shell {
  position: relative;
  z-index: 1;
  padding: clamp(2.5rem, 4vw, 4.5rem) 1rem 1.25rem;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) repeat(2, minmax(160px, 0.8fr)) minmax(260px, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
  align-items: start;
}

.footer-brand {
  padding: clamp(1rem, 2.2vw, 1.6rem);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.3));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(92, 48, 13, 0.16);
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  margin-bottom: 0.75rem;
}

.footer-logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.25));
}

.footer-brand-name {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.25rem, 1.8vw, 1.7rem);
  color: #6f3d16;
  letter-spacing: 0.02em;
}

.footer-description {
  margin: 0;
  color: var(--footer-muted);
  font-size: 0.96rem;
  line-height: 1.72;
}

.footer-note {
  margin-top: 1rem;
  padding: 0.85rem 0.95rem;
  border-left: 3px solid var(--footer-accent);
  background: rgba(255, 255, 255, 0.65);
  border-radius: 10px;
}

.footer-note p {
  margin: 0;
  color: #5f3c1f;
  font-size: 0.9rem;
  line-height: 1.55;
}

.footer-note p + p {
  margin-top: 0.35rem;
}

.footer-note a,
.footer-nav a,
.footer-bottom a {
  color: #7a3f12;
  text-decoration: none;
}

.footer-note a:hover,
.footer-nav a:hover,
.footer-bottom a:hover {
  color: #582c0b;
  text-decoration: underline;
}

.arabic-text {
  direction: rtl;
  text-align: right;
  font-family: "Tahoma", "Arial", sans-serif;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.05rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  color: #6c3a13;
  border: 1px solid rgba(131, 75, 31, 0.25);
  background: rgba(255, 255, 255, 0.5);
  transition: transform 220ms ease, background-color 220ms ease, border-color 220ms ease;
}

.footer-social a:hover {
  background: linear-gradient(135deg, var(--footer-accent), var(--footer-accent-strong));
  border-color: transparent;
  color: #2f1d12;
  transform: translateY(-2px);
}

.footer-nav,
.footer-newsletter {
  padding-top: 0.45rem;
}

.main-footer .footer-nav h5,
.main-footer .footer-newsletter h5 {
  margin: 0 0 0.75rem;
  font-size: 1.06rem;
  color: #fff8f1 !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  font-family: "Playfair Display", Georgia, serif;
  letter-spacing: 0.02em;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.46rem;
}

.main-footer .footer-nav a {
  display: inline-flex;
  align-items: center;
  color: #ffd4ad !important;
  font-size: 0.95rem;
  transition: color 180ms ease, transform 180ms ease;
}

.footer-nav a::before {
  content: ">";
  opacity: 0;
  width: 0;
  transform: translateX(-6px);
  transition: all 180ms ease;
}

.footer-nav a:hover {
  color: #fff2e4;
  transform: translateX(3px);
  text-decoration: none;
}

.footer-nav a:hover::before {
  opacity: 1;
  width: 14px;
  transform: translateX(0);
}

.main-footer .footer-newsletter p {
  margin: 0 0 0.8rem;
  color: #fff1e2 !important;
  font-size: 0.92rem;
  line-height: 1.6;
}

.footer-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
}

.main-footer .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.footer-form input {
  min-width: 0;
  height: 42px;
  border-radius: 11px;
  border: 1px solid rgba(131, 75, 31, 0.28);
  background: rgba(255, 255, 255, 0.75);
  color: #4f2f17;
  padding: 0 0.9rem;
  font-size: 0.93rem;
}

.footer-form input::placeholder {
  color: rgba(95, 60, 31, 0.7);
}

.footer-form input:focus {
  outline: none;
  border-color: var(--footer-accent);
  box-shadow: 0 0 0 3px rgba(255, 157, 77, 0.22);
}

.footer-form button {
  height: 42px;
  padding: 0 1rem;
  border: 0;
  border-radius: 11px;
  color: #2b190f;
  background: linear-gradient(135deg, var(--footer-accent), var(--footer-accent-strong));
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease;
}

.footer-form button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.footer-payment {
  margin-top: 0.95rem;
}

.footer-payment span {
  display: inline-block;
  margin-bottom: 0.45rem;
  color: #ffe9d4 !important;
  font-size: 0.86rem;
}

.payment-icons {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.payment-icons i {
  font-size: 1.55rem;
  color: #f1caa4;
  opacity: 0.9;
}

.footer-bottom {
  margin-top: clamp(1.5rem, 2.8vw, 2.4rem);
  padding-top: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-bottom p {
  margin: 0;
  color: #efd4bb;
  font-size: 0.86rem;
}

.footer-bottom nav {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  flex-wrap: wrap;
}

.footer-bottom a {
  color: #ffd7b1;
  font-size: 0.87rem;
}

@keyframes footer-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.footer-top > section {
  animation: footer-rise 520ms ease both;
}

.footer-top > section:nth-child(2) {
  animation-delay: 60ms;
}

.footer-top > section:nth-child(3) {
  animation-delay: 110ms;
}

.footer-top > section:nth-child(4) {
  animation-delay: 160ms;
}

@media (max-width: 1080px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 760px) {
  .main-footer {
    margin-top: var(--space-16, 4rem);
  }

  .footer-shell {
    padding: 2.2rem 0.9rem 1rem;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 1.3rem;
  }

  .footer-brand,
  .footer-nav,
  .footer-newsletter {
    text-align: center;
  }

  .footer-logo {
    justify-content: center;
  }

  .footer-note {
    border-left: 0;
    border-top: 3px solid var(--footer-accent);
  }

  .arabic-text {
    text-align: center;
  }

  .footer-social,
  .payment-icons,
  .footer-bottom nav,
  .footer-bottom {
    justify-content: center;
  }

  .footer-form {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer-top > section,
  .footer-social a,
  .footer-form button,
  .footer-nav a {
    animation: none;
    transition: none;
  }
}
