/**
 * 山西诚又诚律师事务所 - 页脚样式
 * ===========================================
 * 作用：页脚布局、链接、社交媒体二维码弹出样式
 * 引用：所有页面通过 footer.php 引入
 * 依赖：需要先引用 style.css（使用其中的 CSS 变量）
 */

/* ==================== 页脚样式 ==================== */
.footer {
  background-color: #111111;
  color: #888888;
  padding: 50px 0 40px;
  font-family: var(--font-sans);
}

/* 顶部 Logo */
.footer-top {
  margin-top: 10px;
  margin-bottom: 10px;
}

.footer-logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 60px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/* 中部 链接与社交 */
.footer-middle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 14px;
  color: #cccccc;
}

.footer-links .link-text {
  color: #cccccc;
  animation: flash 5s infinite;
  animation-delay: calc(var(--i) * 0.2s);
}

/* 依次闪光动画 - 主题色 */
@keyframes flash {
  0%, 100% {
    color: #cccccc;
    text-shadow: none;
  }
  50% {
    color: var(--primary-400);
    text-shadow: 0 0 10px rgba(172, 30, 100, 0.6);
  }
}

.footer-divider {
  color: #555555;
  font-size: 12px;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 15px;
}

.social-text {
  font-size: 14px;
  color: #888888;
  margin-right: 10px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--primary-600);
  color: var(--white);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 18px;
}

.social-icon:hover {
  background-color: var(--white);
  color: var(--primary-600);
}

/* 社交媒体容器 - hover 弹出二维码 */
.social-container {
  position: relative;
  display: inline-block;
}

.social-container .qrcode-popup {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #fff;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: none;
  z-index: 10;
  text-align: center;
}

.social-container .qrcode-popup img {
  max-width: 150px;
  max-height: 150px;
  width: auto;
  height: auto;
  display: block;
}

.social-container .qrcode-popup p {
  font-size: 12px;
  color: #333;
  white-space: nowrap;
}

/* hover 时显示二维码 */
.social-container:hover .qrcode-popup {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* 底部 版权 */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  font-size: 14px;
  color: #666666;
}

.legal-links a {
  color: #888888;
  text-decoration: none;
  transition: color 0.3s;
}

.legal-links a:hover {
  color: #ffffff;
}

.legal-links .divider {
  font-size: 14px;
  color: #555;
  margin: 0 10px;
}

/* 响应式 */
@media (max-width: 1024px) {
  .footer-middle {
    flex-direction: column;
    align-items: flex-start;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .footer {
    padding: 42px 0 34px;
    text-align: center;
  }
  .footer-top {
    margin-top: 0;
    margin-bottom: 18px;
  }
  .footer-logo {
    justify-content: center;
  }
  .logo-img {
    height: 46px;
    margin: 0 auto;
  }
  .footer-middle {
    align-items: center;
    gap: 24px;
    padding: 24px 0;
  }
  .footer-links {
    justify-content: center;
    gap: 8px 10px;
    line-height: 1.8;
  }
  .footer-social {
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
  }
  .social-text {
    flex: 0 0 100%;
    margin-right: 0;
  }
  .social-container .qrcode-popup {
    bottom: 48px;
  }
  .footer-bottom {
    flex-direction: column-reverse;
    align-items: center;
    gap: 14px;
    padding-top: 24px;
    line-height: 1.7;
  }
  .legal-links {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .copyright {
    max-width: 320px;
    margin: 0 auto;
  }
}
