/* ==========================================================================
   Footer（页脚）样式
   ========================================================================== */

/* =========================
   页脚整体样式
   ========================= */
.footer {
  background-color: var(--bs-primary) !important;
  color: #fff;
  padding: 50px 0 20px 0;
  font-family: 'Poppins', sans-serif;
}

/* =========================
   页脚主内容区布局
   ========================= */
.footer-content {
  display: flex; /* 三列横向排列 */
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(255,255,255,0.1); /* 底部分割线 */
  padding-bottom: 30px;
}

/* =========================
   单列通用样式
   ========================= */
.footer-column {
  flex: 1 1 250px;
  min-width: 220px;
  margin-bottom: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center; /* 列内内容居中 */
}

/* 列之间的分割线，最后一列不显示 */
.footer-column:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 10%;
  right: 0;
  width: 1px;
  height: 80%;
  background: rgba(255,255,255,0.12);
}

/* =========================
   LOGO与公司简介
   ========================= */
.footer-logo {
  width: 70px;
  margin-bottom: 18px;
  margin-left: auto;
  margin-right: auto;
}

.footer-column-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 18px;
  color: #fff;
  letter-spacing: 1px;
  text-align: center;
  width: 100%;
}

.company-description {
  color: #e0f3fa;
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 0;
}

/* =========================
   快速导航链接
   ========================= */
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: #e0f3fa;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.2s, text-decoration 0.2s;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

/* =========================
   社交媒体图标
   ========================= */
.footer-social {
  display: flex;
  flex-wrap: wrap; /* 允许图标换行 */
  gap: 18px; /* 图标之间的水平和垂直间距 */
  margin-bottom: 18px;
  width: 150px; /* 设置宽度以容纳3个图标 (3*38px + 2*18px = 150px) */
  justify-content: flex-start; /* 在每行内从左开始排列图标 */
  /* 父级 .footer-column 会将此容器居中 */
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  transition: background 0.2s, color 0.2s;
}

.footer-social a:hover {
  background: #fff;
  color: #3498bb;
}

/* =========================
   联系信息样式 (新增)
   ========================= */
.contact-info p {
  color: #e0f3fa;
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 8px;
  display: flex;
  align-items: center; /* 图标和文字垂直居中 */
}

.contact-info p i {
  margin-right: 10px; /* 图标和文字之间的间距 */
  font-size: 18px; /* 图标大小 */
}

/* 新增：为 Email: 和 Phone: 文本设置固定宽度和右边距 */
.contact-info-key {
  display: inline-block; /* 允许设置宽度 */
  width: 60px; /* 根据实际内容调整此宽度，确保 Email: 和 Phone: 对齐 */
  margin-right: 8px; /* Email:/Phone: 和其值之间的间距 */
}

.contact-info-value {
  color: #fff;
}

.contact-info a {
  color: #e0f3fa;
  text-decoration: none;
  transition: color 0.2s, text-decoration 0.2s;
}

.contact-info a:hover {
  color: #fff;
  text-decoration: underline;
}

/* =========================
   页脚底部条款与版权
   ========================= */
.footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding-top: 18px;
  font-size: 14px;
  color: #c6e6f3;
  flex-wrap: wrap;
}

.footer-terms {
  margin-bottom: 6px;
}

.footer-terms a {
  color: #e0f3fa;
  font-size: 14px;
  text-decoration: none;
  margin: 0 4px;
  transition: color 0.2s;
}

.footer-terms a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-terms .separator {
  color: #e0f3fa;
  margin: 0 4px;
}

.footer-copyright {
  font-size: 14px;
  color: #c6e6f3;
  margin-top: 0;
}

/* =========================
   响应式布局
   ========================= */
/* 900px以下：三列变为纵向排列，分割线隐藏 */
@media (max-width: 900px) {
  .footer-content {
    flex-direction: column;
    gap: 0;
  }
  .footer-column:not(:last-child)::after {
    display: none;
  }
  .footer-links.two-columns {
    flex-direction: column;
    gap: 0;
    align-items: center;
    max-width: 250px;
  }
  .footer-links.two-columns > div {
    align-items: center;
  }
  /* 新增：确保联系信息在堆叠时也居中对齐 */
  .contact-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* 左对齐文本内容 */
    width: 100%; /* 确保容器宽度适应父列 */
  }
  .contact-info p {
    justify-content: flex-start; /* 确保图标和文本在行内也居中 */
    width: 100%; /* 每行P标签占满宽度，以便内部元素对齐 */
  }
}

/* 768px以下：内容居中，导航列宽收窄，社交图标居中 */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    gap: 2rem;
    padding-bottom: 3.5rem;
  }
  .footer-content::after {
    bottom: 1rem;
  }
  .footer-column {
    width: 100%;
    text-align: center;
  }
  .footer-links {
    margin: 0 auto;
    max-width: 250px;
  }
  .footer-social {
    justify-content: center;
  }
  .contact-info {
    align-items: center; /* Override flex-start from 900px breakpoint for mobile */
  }
  .contact-info p {
    justify-content: center; /* Override flex-start from 900px breakpoint for mobile */
  }
  .footer-bottom {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
}

/* 576px以下：页脚内边距缩小 */
@media (max-width: 576px) {
  .container {
    padding-left: 5px;
    padding-right: 5px;
  }
}

/* =========================
   统一模块间距工具类
   ========================= */
.section-spacing {
  padding: 2.25rem 0;
}

/* =========================
   页脚结构性辅助类（原home.css）
   ========================= */
.footer-links.two-columns {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  gap: 48px;
}
.footer-links.two-columns > div {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 0;
  align-items: flex-start;
}

.footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding-top: 18px;
  font-size: 14px;
  color: #c6e6f3;
  flex-wrap: wrap;
}
.footer-bottom .footer-terms {
  margin-bottom: 0;
}
.footer-bottom .footer-terms a {
  color: #e0f3fa;
  font-size: 14px;
  text-decoration: none;
  margin: 0 4px;
  transition: color 0.2s;
}
.footer-bottom .footer-terms a:hover {
  color: #fff;
  text-decoration: underline;
}
.footer-bottom .separator {
  color: #e0f3fa;
  margin: 0 4px;
}
.footer-bottom .footer-copyright {
  font-size: 14px;
  color: #c6e6f3;
  margin-top: 0;
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
}
@media (max-width: 900px) {
  .footer-links.two-columns {
    flex-direction: column;
    gap: 0;
    align-items: center;
    max-width: 250px;
  }
  .footer-links.two-columns > div {
    align-items: center;
  }
}
