/**
 * DevCraft Studio - Footer 样式
 * 3列布局
 */

/* ==================== Footer 容器 ==================== */
.footer-enhanced {
  background: var(--entry);
  border-top: 1px solid var(--border);
}

.footer-container {
  max-width: var(--nav-width);
  margin: 0 auto;
  padding: calc(var(--gap) * 3) var(--gap) var(--gap);
}

/* ==================== Footer 网格 ==================== */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(var(--gap) * 2);
  margin-bottom: calc(var(--gap) * 2);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ==================== 品牌列 ==================== */
.footer-brand .footer-logo {
  height: 32px;
  width: auto;
}

.footer-tagline {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--secondary);
  margin: 0;
}

/* 社交链接 */
.social-links {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.social-links a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--code-bg);
  color: var(--secondary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s ease;
}

.social-links a:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
}

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

/* ==================== Footer 列标题 ==================== */
.footer-col h4 {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--primary);
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

/* ==================== Footer 链接列表 ==================== */
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul li {
  margin: 0;
}

.footer-col ul a {
  color: var(--secondary);
  text-decoration: none;
  font-size: var(--text-base);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-col ul a:hover {
  color: var(--accent);
  transform: translateX(4px);
}

.footer-col ul a::before {
  content: '→';
  opacity: 0;
  transition: opacity 0.2s ease;
}

.footer-col ul a:hover::before {
  opacity: 1;
}

/* ==================== Footer Bottom ==================== */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--gap);
  border-top: 1px solid var(--border);
  font-size: var(--text-sm);
  color: var(--secondary);
}

.footer-bottom p {
  margin: 0;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links a {
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-links span {
  color: var(--tertiary);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .footer-container {
    padding: calc(var(--gap) * 2) 16px var(--gap);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--gap);
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .social-links {
    justify-content: flex-start;
  }

  .social-links a {
    width: 36px;
    height: 36px;
  }
}

/* ==================== 返回顶部按钮 ==================== */
.back-to-top {
  position: fixed;
  bottom: calc(var(--gap) * 2);
  right: calc(var(--gap) * 2);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--accent-2);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: var(--gap);
    right: var(--gap);
    width: 44px;
    height: 44px;
  }
}
