/* ===================================
   Footer Section
   Prefix: ftx-
   =================================== */

.main-footer {
  position: relative;
  padding: 40px 20px 30px;
  overflow: hidden;
  direction: rtl;
  background:
    radial-gradient(circle at 15% 20%, rgba(107, 146, 215, 0.14), transparent 28%),
    radial-gradient(circle at 85% 80%, rgba(24, 33, 74, 0.14), transparent 30%),
    linear-gradient(180deg, #f4f8ff 0%, #eef3ff 100%);
}

.main-footer::before,
.main-footer::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}

.main-footer::before {
  top: 40px;
  right: -120px;
  width: 260px;
  height: 260px;
  background: rgba(107, 146, 215, 0.18);
}

.main-footer::after {
  left: -90px;
  bottom: 20px;
  width: 240px;
  height: 240px;
  background: rgba(24, 33, 74, 0.12);
}

.ftx-footer-shell {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
}

.ftx-footer-glass {
  position: relative;
  overflow: hidden;
  padding: 42px 34px 26px;
  border-radius: 36px;

  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);

  border: 1px solid rgba(255, 255, 255, 0.65);

  box-shadow:
    0 30px 80px rgba(24, 33, 74, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.ftx-footer-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(107, 146, 215, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
  pointer-events: none;
}

/* Top */
.ftx-footer-top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 28px;
}

.ftx-footer-brand,
.ftx-footer-links,
.ftx-footer-contact {
  min-width: 0;
}

.ftx-footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-bottom: 18px;
}

.ftx-footer-logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: #fff;
  font-size: 1.25rem;
  font-weight: 900;

  background: linear-gradient(135deg, #18214A 0%, #2b3e86 100%);
  box-shadow: 0 18px 30px rgba(24, 33, 74, 0.18);
}

.ftx-footer-logo-text {
  color: #18214A;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.3px;
}

.ftx-footer-desc {
  margin: 0 0 22px;
  color: #4b557e;
  font-size: 0.98rem;
  line-height: 2;
  max-width: 360px;
}

.ftx-footer-title {
  margin: 8px 0 18px;
  color: #18214A;
  font-size: 1.06rem;
  font-weight: 900;
  position: relative;
}

.ftx-footer-title::after {
  content: "";
  display: block;
  width: 58px;
  height: 4px;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #6B92D7, transparent);
}

.ftx-footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ftx-footer-links li + li {
  margin-top: 12px;
}

.ftx-footer-links a,
.ftx-footer-contact a {
  color: #4b557e;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.25s ease, transform 0.25s ease;
  display: inline-block;
}

.ftx-footer-links a:hover,
.ftx-footer-contact a:hover {
  color: #18214A;
  transform: translateX(-4px);
}

.ftx-footer-contact p {
  margin: 0;
  color: #4b557e;
  line-height: 1.9;
  font-weight: 500;
}

.ftx-contact-item + .ftx-contact-item {
  margin-top: 16px;
}

.ftx-contact-label {
  display: inline-block;
  margin-bottom: 6px;
  color: #18214A;
  font-size: 0.9rem;
  font-weight: 800;
}

/* Socials */
.ftx-footer-socials {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ftx-social-link {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: #18214A;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(107, 146, 215, 0.18);
  box-shadow: 0 14px 24px rgba(24, 33, 74, 0.08);

  transition:
    transform 0.28s ease,
    background 0.28s ease,
    color 0.28s ease,
    box-shadow 0.28s ease;
}

.ftx-social-link svg {
  width: 20px;
  height: 20px;
}

.ftx-social-link:hover {
  color: #fff;
  background: linear-gradient(135deg, #18214A 0%, #2b3e86 100%);
  transform: translateY(-5px);
  box-shadow: 0 20px 35px rgba(24, 33, 74, 0.18);
}

/* Bottom */
.ftx-footer-bottom {
  position: relative;
  z-index: 1;

  margin-top: 28px;
  padding-top: 20px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;

  border-top: 1px solid rgba(24, 33, 74, 0.08);
}

.ftx-footer-bottom p {
  margin: 0;
  color: #66729b;
  font-size: 0.94rem;
  font-weight: 600;
}

.ftx-footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.ftx-footer-bottom-links a {
  color: #4b557e;
  text-decoration: none;
  font-weight: 700;
  transition: color 0.25s ease;
}

.ftx-footer-bottom-links a:hover {
  color: #18214A;
}

/* Responsive */
@media (max-width: 1100px) {
  .ftx-footer-top {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .main-footer {
    padding: 28px 14px 24px;
  }

  .ftx-footer-glass {
    padding: 28px 18px 22px;
    border-radius: 26px;
  }

  .ftx-footer-top {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .ftx-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 576px) {
  .ftx-footer-logo-text {
    font-size: 1.08rem;
  }

  .ftx-footer-desc,
  .ftx-footer-links a,
  .ftx-footer-contact p,
  .ftx-footer-contact a {
    font-size: 0.94rem;
  }

  .ftx-footer-title {
    font-size: 1rem;
  }

  .ftx-social-link {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }
}








/* ===================================
   Mobile Performance Optimization - Footer
   فقط برای موبایل
   این کد را آخر فایل footer.css قرار بده
=================================== */

@media (max-width: 768px) {

  /* حذف انیمیشن و ترنزیشن‌های اضافی در موبایل */
  .main-footer,
  .main-footer *,
  .main-footer *::before,
  .main-footer *::after {
    animation: none !important;
    transition-duration: 0s !important;
  }

  /* حذف blur های سنگین پس‌زمینه */
  .main-footer::before,
  .main-footer::after {
    filter: none !important;
    opacity: 0.45;
  }

  /* حذف glass blur سنگین */
  .ftx-footer-glass {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(255, 255, 255, 0.88) !important;
    box-shadow:
      0 10px 24px rgba(24, 33, 74, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
  }

  /* لایه تزئینی داخلی سبک‌تر */
  .ftx-footer-glass::before {
    opacity: 0.55;
  }

  /* سبک‌سازی لوگو */
  .ftx-footer-logo-mark {
    box-shadow: 0 8px 18px rgba(24, 33, 74, 0.12) !important;
  }

  /* سبک‌سازی آیکن‌های شبکه اجتماعی */
  .ftx-social-link {
    box-shadow: 0 8px 18px rgba(24, 33, 74, 0.06) !important;
  }

  /* حذف حرکت hover روی موبایل */
  .ftx-footer-links a:hover,
  .ftx-footer-contact a:hover,
  .ftx-social-link:hover,
  .ftx-footer-bottom-links a:hover {
    transform: none !important;
  }

  /* hover شبکه اجتماعی بدون پرش */
  .ftx-social-link:hover {
    box-shadow: 0 8px 18px rgba(24, 33, 74, 0.06) !important;
  }
}
