/* ============================================
   Footer Section - 精确还原 Figma 设计 (重组后)
   蓝底 + 顶部背景细线装饰 + 联系信息 + Logo/菜单/版权
   ============================================ */

.footer {
  position: relative;
  width: 100%;
  background: var(--color-primary);
  overflow: hidden;
}

/* 装饰: 背景细线图案 (Figma Vector 568:23113, 白 50%, 顶部全宽 1920x451) */
.footer__deco {
  position: absolute;
  top: -40px;
  left: 0;
  width: 100%;
  min-width: 100%;
  height: auto;
  pointer-events: none;
  z-index: 1;
  display: block;
}

.footer__inner {
  position: relative;
  max-width: 1920px;
  margin: 0 auto;
  min-height: 550px;
  padding: 52px 48px 48px 80px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 2;
  box-sizing: border-box;
}

/* --- 联系信息行 --- */
.footer__contact {
  display: flex;
  align-items: center;
}

/* 按设计稿绝对间距: tel→email 76px, email→address 36px (1920 基准) */
.footer__contact-item:nth-child(2) {
  margin-left: 76px;
}

.footer__contact-item:nth-child(3) {
  margin-left: 36px;
}

.footer__contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.footer__contact-icon {
  flex-shrink: 0;
  width: clamp(32px, 2.396vw, 46px);
  height: clamp(32px, 2.396vw, 46px);
  border-radius: 50%;
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer__contact-icon svg {
  width: 55%;
  height: 55%;
  display: block;
}

.footer__contact-text {
  font-family: var(--font-primary);
  font-size: clamp(0.8125rem, 0.9375vw, 1.125rem);
  font-weight: 300;
  line-height: 1.375;
  color: var(--color-white);
}

.footer__contact-item--address .footer__contact-text {
  max-width: 460px;
}

/* --- 底部行 (Logo + 菜单/版权) --- */
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.footer__logo {
  text-align: center;
  margin-bottom: 30px;
}

.footer__logo img {
  width: clamp(120px, 10.99vw, 211px);
  height: auto;
  display: inline-block;
}

.footer__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  justify-content: center;
  width: 100%;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer__linkedin-wrap {
  position: relative;
  display: inline-block;
  margin-right: 16px;
}

.footer__linkedin {
  width: 32px;
  height: auto;
  display: block;
}

.footer__menu {
  display: flex;
  gap: 8px;
}

.footer__menu-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__menu-item {
  padding: 8px 16px;
  font-family: var(--font-primary);
  font-size: clamp(0.875rem, 1.0417vw, 1.25rem);
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-white);
  text-decoration: none;
}

/* 版权文字 50% 透明 (按重组后设计稿) */
.footer__copyright {
  font-family: var(--font-primary);
  font-size: clamp(0.875rem, 1.0417vw, 1.25rem);
  font-weight: 300;
  line-height: 1.375;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
  text-align: right;
}

/* 法律链接 (Terms of Use / Privacy Policy) */
.footer__legal {
  display: flex;
  gap: 8px;
  margin-top: -12px;
}

.footer__legal-link {
  font-family: var(--font-primary);
  font-size: clamp(0.75rem, 0.833vw, 1rem);
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  padding: 4px 16px;
  transition: opacity 0.2s ease;
}

.footer__legal-link:hover {
  opacity: 0.85;
}

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

@media (max-width: 1200px) {
  .footer__inner { padding: 40px 40px 28px; min-height: auto; }
  .footer__contact { gap: 28px; flex-wrap: wrap; }
  .footer__contact-item:nth-child(2),
  .footer__contact-item:nth-child(3) { margin-left: 0; }
}

@media (max-width: 768px) {
  .footer__inner { padding: 40px 20px 28px; justify-content: flex-start; }

  /* 移动端隐藏背景水印装饰 */
  .footer__deco { display: none; }

  /* 联系信息: 地址第一行, 电话 + Email 同一行 */
  .footer__contact {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px;
  }

  .footer__contact-item { width: auto; }

  .footer__contact-item--address {
    order: -1;
    flex: 0 0 100%;
  }

  .footer__contact-item--address .footer__contact-text { max-width: 100%; }

  /* Logo + LinkedIn 行: 左右两端对齐 (移动端显示) */
  .footer__logo-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
  }

  .footer__logo { text-align: left; margin-bottom: 0; }

  .footer__bottom {
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-top: 20px;
    width: 100%;
  }

  .footer__right { align-items: center; width: 100%; padding-top: 20px; }
  .footer__linkedin-wrap--pc { display: none; }
  .footer__logo--pc { display: none; }
  .footer__menu {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 8px 0;
    justify-content: center;
    width: 100%;
  }
  .footer__menu-item { padding: 3px 16px; }
  .footer__menu-item--legal {
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    font-size: clamp(0.75rem, 0.833vw, 1rem);
  }
  /* 三列布局: Col1 Products/About/Cookie, Col2 Markets/Contact/Terms, Col3 News/Privacy */
  .footer__menu-item:nth-child(1) { grid-column: 1; grid-row: 1; } /* Products */
  .footer__menu-item:nth-child(2) { grid-column: 2; grid-row: 1; } /* Markets */
  .footer__menu-item:nth-child(3) { grid-column: 3; grid-row: 1; } /* News */
  .footer__menu-item:nth-child(4) { grid-column: 1; grid-row: 2; } /* About */
  .footer__menu-item:nth-child(5) { grid-column: 2; grid-row: 2; } /* Contact Us */
  .footer__menu-item:nth-child(6) { grid-column: 1; grid-row: 3; } /* Cookie Policy */
  .footer__menu-item:nth-child(7) { grid-column: 2; grid-row: 3; } /* Terms of Use */
  .footer__menu-item:nth-child(8) { grid-column: 3; grid-row: 3; } /* Privacy Policy */
  .footer__legal { display: none; }

  /* 移动端隐藏版权行 */
  .footer__copyright { display: none; }
}

@media (max-width: 576px) {
  .footer__inner { padding: 32px 16px 24px; }
  .footer__contact { gap: 16px; }
}

/* 尊重减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .footer__menu-item { transition: none; }
}

/* PC端：隐藏移动端 logo+linkedin 行，保留原有布局 */
@media (min-width: 769px) {
  .footer__logo-row { display: none !important; }

  .footer__logo--pc {
    display: block !important;
    position: absolute;
    bottom: 48px;
    left: 80px;
    margin-bottom: 0 !important;
    text-align: left !important;
    z-index: 3;
  }

  .footer__logo--pc img {
    display: block !important;
  }

  .footer__bottom {
    margin-top: auto;
    justify-content: flex-end !important;
  }

  .footer__right {
    width: auto !important;
    padding-top: 0 !important;
    border-top: none !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 8px !important;
  }

  .footer__linkedin-wrap--pc {
    margin-right: 16px !important;
    display: block !important;
  }

  /* PC端法律链接样式: 隐藏菜单内的，保留原 .footer__legal */
  .footer__menu-item--legal {
    display: none !important;
  }
}
