/* faq.css - 纸飞机常见问题样式 */

:root {
  --primary: #0088cc;
  --primary-hover: #0077b5;
  --dark: #0f172a;
  --light: #f8fafc;
  --text: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background-color: #ffffff;
  line-height: 1.7;
}

/* ===== 头部导航 ===== */
header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.logo svg {
  width: 32px;
  height: 32px;
  fill: var(--primary);
}

.nav-links a {
  color: #475569;
  text-decoration: none;
  margin-left: 25px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s;
  padding: 6px 12px;
  border-radius: 6px;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a.active {
  color: #ffffff;
  background-color: var(--primary);
}

/* ===== FAQ 主体 ===== */
.faq-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 20px;
}

.faq-header {
  text-align: center;
  margin-bottom: 60px;
}

.faq-header h1 {
  font-size: 36px;
  color: var(--dark);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.faq-header p {
  font-size: 16px;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
}

/* 创意小贴士板块 */
.faq-tips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 50px;
}

.tip-card {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  transition: all 0.3s;
}

.tip-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -8px rgba(0, 0, 0, 0.04);
  border-color: #cbd5e1;
}

.tip-icon {
  font-size: 32px;
  margin-bottom: 12px;
  display: block;
}

.tip-content h4 {
  font-size: 17px;
  color: var(--dark);
  margin-bottom: 8px;
  font-weight: 700;
}

.tip-content p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* FAQ 列表 */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}

.faq-item details summary {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s;
}

.faq-item details summary::-webkit-details-marker {
  display: none;
}

.faq-item details summary::after {
  content: "+";
  font-size: 22px;
  color: var(--muted);
  font-weight: 400;
  transition: transform 0.2s;
}

.faq-item details[open] summary {
  color: var(--primary);
}

.faq-item details[open] summary::after {
  content: "−";
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  padding-top: 16px;
  font-size: 15.5px;
  color: #475569;
  text-align: justify;
}

.faq-answer p {
  margin-bottom: 12px;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.code-inline {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
  color: var(--dark);
  border: 1px solid #e2e8f0;
}

/* ===== 页脚 ===== */
footer {
  background: var(--dark);
  color: #94a3b8;
  padding: 70px 20px 40px;
  font-size: 14px;
  border-top: 1px solid #1e293b;
  margin-top: 60px;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid #1e293b;
}

.footer-brand h4 {
  color: white;
  font-size: 18px;
  margin-bottom: 12px;
}

.footer-column h5 {
  color: white;
  font-size: 15px;
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-column ul li a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-column ul li a:hover {
  color: white;
}

.footer-bottom {
  max-width: 1200px;
  margin: 30px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .faq-tips {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  .faq-item details summary {
    font-size: 16px;
  }
}