/* ========================================
   BBpay 帮助中心 — help.css
   ======================================== */

/* ----- 紧凑 Hero（高定氛围层 + common .hero-bg）----- */
.help-hero {
  position: relative;
  padding: 104px 0 48px;
  background-color: #fcfcfd;
  overflow: hidden;
  border-bottom: 1px solid var(--gray-200);
  background-image: url("/images/help/help-banner.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.help-hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.help-hero-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 12px;
}
.help-hero-sub {
  font-size: 17px;
  color: var(--text-tertiary);
  margin-bottom: 28px;
  line-height: 1.55;
}
.help-search-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-lg);
  box-shadow:
    0 8px 28px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  pointer-events: none;
  opacity: 0.96;
}
.help-search-wrap svg {
  flex-shrink: 0;
  color: var(--text-muted);
}
.help-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  color: var(--text-muted);
  font-family: var(--font-cn);
}
.help-search-input::placeholder {
  color: var(--text-muted);
}

/* ----- 区块通用 ----- */
.help-section {
  padding: 64px 0;
}
.help-section:nth-child(even) {
  background: var(--bg-secondary);
}
.help-section-header {
  text-align: center;
  margin-bottom: 48px;
}
.help-section-header .section-desc {
  margin-left: auto;
  margin-right: auto;
}

/* ----- FAQ 手风琴 ----- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--bg-primary);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 2px 12px rgba(15, 23, 42, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition:
    border-color 0.25s var(--ease-out),
    box-shadow 0.25s var(--ease-out);
}
.faq-item:hover {
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow:
    0 6px 20px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
.faq-item.is-open {
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow:
    0 10px 32px rgba(37, 99, 235, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}
.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  text-align: left;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s;
}
.faq-trigger:hover {
  background: var(--primary-bg-subtle);
}
.faq-q {
  flex: 1;
  line-height: 1.45;
}
.faq-chevron {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: #9ca3af;
  transition: transform 0.35s var(--ease-out);
}
.faq-item.is-open .faq-chevron {
  transform: rotate(180deg);
}
.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease-out);
}
.faq-item.is-open .faq-panel {
  grid-template-rows: 1fr;
}
.faq-panel-inner {
  overflow: hidden;
  min-height: 0;
}
.faq-answer {
  padding: 0 20px 18px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  border-top: 1px solid transparent;
}
.faq-item.is-open .faq-answer {
  border-top-color: var(--gray-100);
  padding-top: 14px;
}

/* ----- 安全须知卡片 (Figma 新设计) ----- */
.safety-notice-section {
  /* background: #f4f9ff; */
  background-image: url("/images/help/help-banner2.webp");
  background-size: cover;
  background-position: bottom;
  background-repeat: no-repeat;
}

.safety-accordion {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.safety-accordion-item {
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(6, 38, 116, 0.04);
  position: relative;
  transition: box-shadow 0.3s ease;
}

.safety-accordion-item::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  bottom: -1px;
  width: 4px;
  /* background: var(--accent-color); */
  border-radius: 16px 0 0 16px;
  z-index: 1;
}

.safety-accordion-item:hover {
  box-shadow: 0 6px 24px rgba(6, 38, 116, 0.08);
}

.safety-accordion-header {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 17px 21px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.safety-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #8ab5ff26;
  /* background-color: color-mix(in srgb, var(--accent-color, #2563eb) 10%, transparent); */
}

.safety-icon img {
  width: 24px;
  height: 24px;
}
[style*="--accent-color: #2563eb"] .safety-icon img {
  filter: invert(30%) sepia(90%) saturate(1800%) hue-rotate(215deg)
    brightness(95%);
}
[style*="--accent-color: #ef4444"] .safety-icon img {
  filter: invert(35%) sepia(95%) saturate(2000%) hue-rotate(340deg)
    brightness(95%);
}
[style*="--accent-color: #f93087"] .safety-icon img {
  filter: invert(30%) sepia(85%) saturate(2500%) hue-rotate(315deg)
    brightness(100%);
}
[style*="--accent-color: #9b58ff"] .safety-icon img {
  filter: invert(35%) sepia(80%) saturate(2000%) hue-rotate(250deg)
    brightness(95%);
}
[style*="--accent-color: #db933c"] .safety-icon img {
  filter: invert(55%) sepia(70%) saturate(600%) hue-rotate(5deg) brightness(95%);
}

.safety-text {
  flex: 1;
}

.safety-badge {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  font-weight: 700;
  color: #ef4444;
  letter-spacing: 0.48px;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 4px;
}

.safety-text h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary, #111827);
  margin: 0;
  line-height: 1.2;
}

.safety-arrow {
  color: #9ca3af;
  transition:
    transform 0.3s ease,
    color 0.3s ease;
  flex-shrink: 0;
}

.safety-accordion-item.open .safety-arrow {
  transform: rotate(180deg);
  color: var(--accent-color);
}

.safety-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.safety-accordion-item.open .safety-accordion-body {
  max-height: 400px;
}

.safety-accordion-content {
  padding: 0 21px 20px 85px;
}

.safety-accordion-content p {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.8;
  margin: 0;
}

@media (max-width: 768px) {
  .safety-accordion-content {
    padding-left: 21px;
  }
}

@media (max-width: 480px) {
  .safety-accordion-header {
    padding: 14px 16px;
    gap: 12px;
  }
  .safety-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
  }
  .safety-icon img {
    width: 20px;
    height: 20px;
  }
  .safety-text h3 {
    font-size: 15px;
  }
  .safety-accordion-content {
    padding: 0 16px 16px 16px;
  }
}

/* ----- 联系我们 ----- */
.contact-section {
  padding: 73px 0 89px;
  background: linear-gradient(
    180deg,
    var(--bg-secondary) 0%,
    var(--primary-bg-subtle) 100%
  );
}

.contact-card {
  max-width: 800px;
  margin: 0 auto;
  background: linear-gradient(170deg, #8ebbfe5e 0%, #ffffff 40%);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow:
    0 16px 48px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  text-align: center;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
}

.contact-card h2 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.contact-card > p {
  font-size: 15px;
  color: var(--text-tertiary);
  margin-bottom: 32px;
}
.contact-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-bottom: 24px;
}
.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  transition:
    transform 0.2s var(--ease-out),
    box-shadow 0.2s;
}
.contact-btn:hover {
  transform: translateY(-2px);
}
.contact-btn--tg {
  background: #3eb5ed;
  color: white;
  box-shadow:
    0 8px 22px rgba(34, 158, 217, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.contact-btn--tg:hover {
  box-shadow:
    0 12px 28px rgba(34, 158, 217, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  color: white;
}

@media screen and (max-width: 600px) {
  .contact-btn--tg {
    order: 2;
  }

  .contact-btn--service {
    order: 1;
  }
}

.contact-btn--service {
  background: #588dff;
  color: white;
  box-shadow:
    0 8px 24px rgba(37, 99, 235, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.contact-btn--service:hover {
  background: #588dff;
  color: white;
  box-shadow:
    0 12px 32px rgba(37, 99, 235, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.contact-hours {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-bg);
  padding: 10px 18px;
  border-radius: var(--radius-full);
}
.contact-hours svg {
  flex-shrink: 0;
  color: var(--primary-light);
}

.contact-content {
  display: flex;
  flex-direction: column;
  padding: 24px;
  width: 100%;
}

.contact-content > h2 {
  font-size: 32px;
  font-weight: 700;
}

.contact-content p {
  margin-bottom: 20px;
  color: #6b7280;
}

.contact-img {
  max-width: 261px;
}

/* ----- 响应式 ----- */
@media (max-width: 768px) {
  .help-hero {
    padding: 96px 0 40px;
  }
  .help-hero-title {
    font-size: 24px;
  }
  .help-section {
    padding: 48px 0;
  }
  .help-section-header {
    margin-bottom: 28px;
  }
  .contact-content {
    padding: 0;
  }

  .contact-content > h2 {
    font-size: 24px;
  }

  .contact-card {
    flex-direction: column;
    padding: 24px 22px 0px 22px;
  }
  .contact-actions {
    flex-direction: column;
  }
  .contact-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .help-hero-sub {
    font-size: 15px;
  }
  .faq-trigger {
    padding: 14px 16px;
    font-size: 15px;
  }
  .safety-trigger {
    padding: 14px 16px 14px 18px;
  }
  .safety-title {
    font-size: 16px;
  }
}
