/* ===================================================================
   Site Footer — Elementor Widget Frontend CSS
   Design reference: fuyaogroup.com footer
   =================================================================== */

/* ===== Scoped Reset ===== */
.sf-footer,
.sf-footer *,
.sf-footer *::before,
.sf-footer *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  font-style: normal;
  text-decoration: none;
  list-style: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Footer Wrapper ===== */
.sf-footer {
  position: relative;
  width: 100%;
  overflow: visible;
  background-color: #1a1a1a;
  color: rgba(255, 255, 255, 0.6);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* Zero gap between content and footer */
.elementor-widget-sf_site_footer {
  margin-bottom: 0 !important;
  margin-top: 0 !important;
}

.e-con:has(.elementor-widget-sf_site_footer) {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

/* ===== Skew Top — WHITE overlay on dark footer ===== */
.sf-skew {
  position: absolute;
  top: -1px;
  /* Full viewport width — break out of Elementor container */
  left: 50%;
  margin-left: -50vw;
  width: 100vw;
  z-index: 2;
  pointer-events: none;
}

/* ===== Footer Inner (above skew so content is visible) ===== */
.sf-footer-inner {
  position: relative;
  z-index: 3;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 5% 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ===== Back to Top (Fuyao style) ===== */
.sf-totop {
  position: absolute;
  left: 0;
  right: 0;
  margin: auto;
  z-index: 10000;
  width: 46px;
  height: 46px;
  line-height: 43px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.9);
  background: -webkit-gradient(linear, 0 0, 0 bottom, from(rgba(0, 0, 0, 0.9)), to(rgba(0, 0, 0, 0.3)));
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.3));
  box-shadow: 0 2px 2px rgba(255, 255, 255, 0.9);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  -webkit-animation: sf-Tmouse 0.5s cubic-bezier(0.56, 0.01, 0.46, 1) infinite alternate;
  animation: sf-Tmouse 0.5s cubic-bezier(0.56, 0.01, 0.46, 1) infinite alternate;
}

.sf-totop svg {
  width: 18px;
  height: 18px;
  color: #fff;
}

/* Fuyao bounce animation */
@keyframes sf-Tmouse {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-8px);
  }
}

.sf-totop:hover {
  animation-play-state: paused;
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.6);
}

.sf-totop:active {
  animation-play-state: paused;
  transform: translateY(0);
}

/* ===== Social Icons Row ===== */
.sf-social-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 28px;
}

.sf-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s ease;
  position: relative;
  text-decoration: none !important;
}

.sf-social-icon svg {
  width: 24px;
  height: 24px;
}

.sf-social-icon:hover {
  color: #fff;
  transform: translateY(-3px);
}

/* ─── WeChat QR Popup ─── */
.sf-wechat-wrap {
  position: relative;
}

.sf-wechat-qr {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 140px;
  padding: 8px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 20;
}

.sf-wechat-qr::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: #fff;
}

.sf-wechat-qr img {
  width: 100%;
  display: block;
  border-radius: 4px;
}

.sf-wechat-wrap:hover .sf-wechat-qr {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ===== Navigation Links Row ===== */
.sf-nav-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 24px;
}

.sf-nav-link {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  letter-spacing: 0.5px;
  text-decoration: none !important;
  transition: color 0.3s ease;
  padding: 4px 0;
}

.sf-nav-link:hover {
  color: #fff;
}

.sf-nav-sep {
  color: rgba(255, 255, 255, 0.25);
  margin: 0 16px;
  user-select: none;
  font-size: 14px;
}

/* ===== Copyright Area ===== */
.sf-copyright-area {
  text-align: center;
}

.sf-copyright {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.8;
  letter-spacing: 0.3px;
}

.sf-icp-link {
  color: rgba(255, 255, 255, 0.4) !important;
  text-decoration: none !important;
  transition: color 0.3s ease;
}

.sf-icp-link:hover {
  color: rgba(255, 255, 255, 0.7) !important;
}

.sf-security {
  margin-top: 12px;
}

.sf-security a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.4) !important;
  text-decoration: none !important;
  font-size: 12px;
  transition: color 0.3s ease;
}

.sf-security a:hover {
  color: rgba(255, 255, 255, 0.7) !important;
}

.sf-security-badge {
  width: 16px;
  height: auto;
}


/* ===== Entrance Animations ===== */
.sf-anim {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.sf-anim.sf-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Back-to-top specific anim */
.sf-totop.sf-anim {
  transform: translateY(20px);
  opacity: 0;
}

.sf-totop.sf-anim.sf-visible {
  transform: translateY(0);
  opacity: 1;
}


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

/* Large Desktop ≤ 1440px */
@media screen and (max-width: 1440px) {
  .sf-footer-inner {
    max-width: 1100px;
  }
}

/* Small Desktop ≤ 1280px */
@media screen and (max-width: 1280px) {
  .sf-footer-inner {
    max-width: 960px;
  }
}

/* Tablet Landscape ≤ 1024px */
@media screen and (max-width: 1024px) {
  .sf-footer-inner {
    max-width: 90%;
    padding-top: 60px;
  }

  .sf-social-icon svg {
    width: 22px;
    height: 22px;
  }
}

/* Tablet Portrait ≤ 800px */
@media screen and (max-width: 800px) {
  .sf-footer-inner {
    padding: 50px 5% 32px;
  }

  .sf-social-row {
    gap: 20px;
    margin-bottom: 24px;
  }

  .sf-social-icon svg {
    width: 20px;
    height: 20px;
  }

  .sf-nav-link {
    font-size: 13px;
  }

  .sf-nav-sep {
    margin: 0 10px;
  }

  .sf-totop {
    width: 42px;
    height: 42px;
  }

  .sf-totop svg {
    width: 18px;
    height: 18px;
  }
}

/* Large Phone ≤ 640px */
@media screen and (max-width: 640px) {
  .sf-footer-inner {
    padding: 44px 4% 28px;
  }

  .sf-social-row {
    gap: 18px;
    margin-bottom: 20px;
  }

  .sf-nav-row {
    margin-bottom: 18px;
  }

  .sf-nav-link {
    font-size: 12px;
  }

  .sf-nav-sep {
    margin: 0 8px;
    font-size: 12px;
  }

  .sf-wechat-qr {
    width: 110px;
    padding: 6px;
  }
}

/* Phone ≤ 480px */
@media screen and (max-width: 480px) {
  .sf-footer-inner {
    padding: 36px 4% 24px;
  }

  .sf-social-row {
    gap: 16px;
    margin-bottom: 16px;
  }

  .sf-social-icon svg {
    width: 18px;
    height: 18px;
  }

  .sf-nav-row {
    flex-wrap: wrap;
    gap: 4px 0;
  }

  .sf-nav-sep {
    margin: 0 6px;
  }

  .sf-nav-link {
    font-size: 11px;
  }

  .sf-copyright {
    font-size: 11px;
  }

  .sf-totop {
    width: 38px;
    height: 38px;
  }

  .sf-totop svg {
    width: 16px;
    height: 16px;
  }
}

/* Small Phone ≤ 375px */
@media screen and (max-width: 375px) {
  .sf-footer-inner {
    padding: 30px 3.5% 20px;
  }

  .sf-social-icon svg {
    width: 16px;
    height: 16px;
  }

  .sf-nav-link {
    font-size: 10px;
  }

  .sf-copyright {
    font-size: 10px;
  }
}

/* ===== Keyboard Focus ===== */
.sf-totop:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 4px;
}

.sf-social-icon:focus-visible,
.sf-nav-link:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

/* ===== Accessibility: Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  .sf-anim {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .sf-totop.sf-anim {
    transform: none !important;
  }
  .sf-totop {
    transition: none !important;
    animation: none !important;
  }
  .sf-social-icon {
    transition: none !important;
  }
  .sf-wechat-qr {
    transition: none !important;
  }
  .sf-nav-link {
    transition: none !important;
  }
}
