/* TikNote FAQ Page Styles */

/* CSS Variables - Using global TikNote variables for consistency */

/* Main Content Layout - 与pricing页面一致 */
.main-content {
  min-height: 100vh;
  padding-top: 5rem; /* Account for fixed navbar */
}

/* FAQ Hero Section */
.faq-section {
  position: relative;
  background: linear-gradient(
    135deg,
    var(--tiknote-primary) 0%,
    var(--tiknote-secondary) 100%
  );
  padding-top: 20px; /* 与pricing页面一致 */
  padding-bottom: 50px;
  min-height: 100vh;
  overflow: hidden;
}

.faq-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 30% 20%,
      rgba(59, 130, 246, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 70% 80%,
      rgba(29, 78, 216, 0.1) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 1280px; /* max-w-7xl - 与pricing页面一致 */
  margin: 0 auto 50px; /* 与下方内容的间距 */
  padding: 0 1rem; /* px-4 - 与pricing页面一致 */
}

@media (min-width: 640px) {
  .hero-content {
    padding: 0 1.5rem; /* sm:px-6 - 与pricing页面一致 */
  }
}

@media (min-width: 1024px) {
  .hero-content {
    padding: 0 2rem; /* lg:px-8 - 与pricing页面一致 */
  }
}

.hero-title {
  font-size: 2.25rem; /* text-4xl - 与pricing页面一致 */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem; /* mb-6 = 24px - 与pricing页面一致 */
  color: white;
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 3rem; /* lg:text-5xl - 与pricing页面一致 */
  }
}

.hero-description {
  font-size: 1.25rem; /* text-xl - 与pricing页面一致 */
  color: rgb(203, 213, 225); /* text-slate-300 - 与pricing页面一致 */
  line-height: 1.6;
  margin-bottom: 0;
}

/* FAQ Container */
.faq-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* 减少间距一半，从1rem改为0.5rem */
}

/* FAQ Items */
.faq-item {
  background: rgba(55, 65, 81, 0.9); /* 更深的灰蓝色背景，匹配图片 */
  border: 1px solid rgba(75, 85, 99, 0.6);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease-out;
}

.faq-item:hover {
  border-color: rgba(147, 51, 234, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem; /* 减少垂直内边距，从1.5rem改为1rem */
  background: transparent;
  border: none;
  color: white;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
}

.faq-question:hover {
  background: rgba(75, 85, 99, 0.3);
}

.faq-question h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  padding-right: 1rem;
  line-height: 1.4;
  color: white; /* 确保问题标题是白色 */
}

.faq-icon {
  flex-shrink: 0;
  color: rgba(156, 163, 175, 0.8); /* 灰色箭头，匹配图片 */
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background: transparent;
}

.faq-item.active .faq-answer {
  max-height: 200px;
  padding: 0 1.5rem 1rem; /* 减少底部内边距，从1.5rem改为1rem */
}

.faq-answer p {
  color: rgba(156, 163, 175, 0.9); /* 灰色回答文本，匹配图片 */
  line-height: 1.5; /* 减少行高，从1.6改为1.5 */
  margin: 0;
  font-size: 0.95rem;
  padding-top: 0.25rem; /* 减少顶部内边距，从0.5rem改为0.25rem */
}

/* Contact Section */
.contact-section {
  background: rgba(30, 41, 59, 0.5);
  padding: 60px 20px;
}

.contact-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.contact-title {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
}

.contact-description {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

.contact-card {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(71, 85, 105, 0.8);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.contact-card:hover {
  border-color: rgba(147, 51, 234, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: linear-gradient(
    135deg,
    var(--tiknote-accent) 0%,
    var(--tiknote-blue) 100%
  );
  border-radius: 50%;
  margin-bottom: 1rem;
  color: white;
}

.contact-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.5rem;
}

.contact-link {
  color: var(--tiknote-accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.contact-link:hover {
  color: var(--tiknote-blue);
}

.contact-handle {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

/* RedNote Icon Styling */
.redbook-icon {
  background: linear-gradient(to bottom right, #ef4444, #ec4899);
  font-size: 1.5rem;
  font-weight: 700;
}

/* Animation delays for FAQ items */
.faq-item:nth-child(1) {
  animation-delay: 0.1s;
}
.faq-item:nth-child(2) {
  animation-delay: 0.2s;
}
.faq-item:nth-child(3) {
  animation-delay: 0.3s;
}
.faq-item:nth-child(4) {
  animation-delay: 0.4s;
}
.faq-item:nth-child(5) {
  animation-delay: 0.5s;
}
.faq-item:nth-child(6) {
  animation-delay: 0.6s;
}
.faq-item:nth-child(7) {
  animation-delay: 0.7s;
}
.faq-item:nth-child(8) {
  animation-delay: 0.8s;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .faq-container {
    padding: 0 16px;
  }

  .faq-question {
    padding: 0.875rem 1.25rem; /* 减少移动端内边距 */
  }

  .faq-question h3 {
    font-size: 1rem;
  }

  .faq-item.active .faq-answer {
    padding: 0 1.25rem 0.875rem; /* 减少移动端内边距 */
  }

  .contact-section {
    padding: 40px 16px;
  }

  .contact-title {
    font-size: 1.75rem;
  }

  .contact-description {
    font-size: 1rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .contact-card {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .faq-section {
    padding-top: 100px;
  }

  .hero-content {
    padding: 30px 16px 30px;
  }

  .faq-question {
    padding: 0.75rem 1rem; /* 进一步减少小屏幕内边距 */
  }

  .faq-question h3 {
    font-size: 0.95rem;
  }

  .faq-item.active .faq-answer {
    padding: 0 1rem 0.75rem; /* 进一步减少小屏幕内边距 */
  }
}
