/* /assets/css/faq.css */

/* ------------------------------------------------------------
   Base
------------------------------------------------------------ */

body.faq-page,
.faq-page .page-main,
.page-main.faq-page {
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.10), transparent 30%),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 28%),
    linear-gradient(180deg, var(--bg-body, #f8fafc), var(--bg-body, #f8fafc));
  color: var(--text, #0f172a);
}

.faq-page .site-container {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
}

html[data-theme="dark"] body.faq-page,
body.theme-dark.faq-page,
html[data-theme="dark"] .faq-page .page-main,
body.theme-dark .faq-page .page-main,
html[data-theme="dark"] .page-main.faq-page,
body.theme-dark .page-main.faq-page {
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 25%),
    linear-gradient(180deg, #020617, #0f172a 52%, #111827);
  color: #f8fafc;
}

/* ------------------------------------------------------------
   Shared cards
------------------------------------------------------------ */

.faq-card,
.faq-hero__card,
.faq-empty {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

html[data-theme="dark"] .faq-card,
html[data-theme="dark"] .faq-hero__card,
html[data-theme="dark"] .faq-empty,
body.theme-dark .faq-card,
body.theme-dark .faq-hero__card,
body.theme-dark .faq-empty {
  background: rgba(15, 23, 42, 0.82);
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 22px 54px rgba(2, 6, 23, 0.42);
}

/* ------------------------------------------------------------
   Hero
------------------------------------------------------------ */

.faq-hero {
  padding: 22px 0 10px;
}

.faq-hero__card {
  border-radius: 28px;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 20px;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.faq-hero__text {
  position: relative;
  z-index: 2;
}

.faq-hero__badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4f46e5;
  background: rgba(99, 102, 241, 0.10);
  border: 1px solid rgba(99, 102, 241, 0.12);
}

.faq-hero h1 {
  margin: 14px 0 10px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.04;
  font-weight: 900;
  color: var(--text, #0f172a);
}

.faq-hero p {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted, #475569);
  max-width: 720px;
}

.faq-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  align-items: center;
}

.faq-hero__stats span,
.faq-hero__stats a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--muted, #475569);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.faq-hero__stats a:hover {
  border-color: rgba(99, 102, 241, 0.26);
  color: #4338ca;
}

html[data-theme="dark"] .faq-hero__stats span,
html[data-theme="dark"] .faq-hero__stats a,
body.theme-dark .faq-hero__stats span,
body.theme-dark .faq-hero__stats a {
  background: rgba(30, 41, 59, 0.88);
  color: rgba(226, 232, 240, 0.94);
}

/* ------------------------------------------------------------
   Hero tools
------------------------------------------------------------ */

.faq-actions {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.faq-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.20);
  padding: 0 14px;
}

html[data-theme="dark"] .faq-search,
body.theme-dark .faq-search {
  background: rgba(2, 6, 23, 0.68);
  border-color: rgba(148, 163, 184, 0.16);
}

.faq-search-icon {
  font-size: 16px;
  opacity: 0.9;
}

.faq-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text, #0f172a);
  font-size: 14px;
}

.faq-search input::placeholder {
  color: var(--muted, #64748b);
}

html[data-theme="dark"] .faq-search input,
body.theme-dark .faq-search input {
  color: #f8fafc;
}

html[data-theme="dark"] .faq-search input::placeholder,
body.theme-dark .faq-search input::placeholder {
  color: #94a3b8;
}

.faq-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ------------------------------------------------------------
   Premium FAQ Buttons
------------------------------------------------------------ */

.faq-btn,
.faq-more {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .01em;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease,
    box-shadow .18s ease,
    opacity .18s ease;
  backdrop-filter: blur(12px);
  color: var(--text, #0f172a);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, .82),
      rgba(255, 255, 255, .68)
    );
  box-shadow:
    0 10px 28px rgba(15, 23, 42, .08),
    inset 0 1px 0 rgba(255, 255, 255, .35);
}

.faq-btn--primary {
  color: #ffffff;
  border-color: transparent;
  background:
    linear-gradient(
      135deg,
      #16a34a 0%,
      #eab308 52%,
      #dc2626 100%
    );
  box-shadow:
    0 16px 36px rgba(22, 163, 74, .22),
    inset 0 1px 0 rgba(255, 255, 255, .18);
}

.faq-btn:hover,
.faq-more:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.24);
  box-shadow:
    0 18px 42px rgba(15, 23, 42, .14),
    inset 0 1px 0 rgba(255, 255, 255, .35);
}

.faq-btn:active,
.faq-more:active {
  transform: translateY(0);
}

.faq-btn:focus-visible,
.faq-more:focus-visible {
  outline: 3px solid rgba(250, 204, 21, .45);
  outline-offset: 3px;
}

.faq-more {
  width: 100%;
  margin-top: 14px;
}

html[data-theme="dark"] .faq-btn,
html[data-theme="dark"] .faq-more,
body.theme-dark .faq-btn,
body.theme-dark .faq-more {
  color: #f8fafc;
  background:
    linear-gradient(
      180deg,
      rgba(30, 41, 59, .92),
      rgba(15, 23, 42, .88)
    );
  border-color: rgba(148, 163, 184, .12);
  box-shadow:
    0 14px 34px rgba(2, 6, 23, .34),
    inset 0 1px 0 rgba(255, 255, 255, .04);
}

html[data-theme="dark"] .faq-btn--primary,
body.theme-dark .faq-btn--primary {
  color: #ffffff;
  background:
    linear-gradient(
      135deg,
      #22c55e 0%,
      #eab308 50%,
      #ef4444 100%
    );
  border-color: transparent;
}

/* ------------------------------------------------------------
   Hero visual
------------------------------------------------------------ */

.faq-hero__visual {
  position: relative;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq-hero__visual-glow {
  position: absolute;
  inset: 10% 6% auto 6%;
  height: 68%;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, rgba(99, 102, 241, 0.24), transparent 62%);
  filter: blur(12px);
  z-index: 0;
}

.faq-hero__image-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

html[data-theme="dark"] .faq-hero__image-card,
body.theme-dark .faq-hero__image-card {
  background: rgba(2, 6, 23, 0.5);
}

.faq-hero__image {
  display: block;
  width: 100%;
  height: auto;
}

/* ------------------------------------------------------------
   Main layout
------------------------------------------------------------ */

.faq-main {
  padding: 14px 0 34px;
}

.faq-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.faq-index {
  position: sticky;
  top: 88px;
}

.faq-index .faq-card {
  border-radius: 24px;
  padding: 18px;
}

.faq-index h4 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 900;
  color: var(--text, #0f172a);
}

.faq-index ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.faq-index li {
  margin: 0;
  padding: 0;
}

.faq-index a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--text, #0f172a);
  font-size: 13px;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.04);
  border: 1px solid rgba(99, 102, 241, 0.08);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.faq-index a:hover {
  transform: translateY(-1px);
  border-color: rgba(99, 102, 241, 0.24);
  background: rgba(99, 102, 241, 0.08);
}

.faq-index a small {
  min-width: 28px;
  text-align: center;
  font-size: 11px;
  font-weight: 900;
  color: var(--muted, #64748b);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  padding: 4px 7px;
}

.faq-empty-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted, #64748b);
}

.faq-content {
  display: grid;
  gap: 16px;
}

.faq-empty {
  border-radius: 24px;
  padding: 18px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted, #475569);
}

/* ------------------------------------------------------------
   FAQ section cards
------------------------------------------------------------ */

.faq-section {
  border-radius: 26px;
  padding: 18px;
}

.faq-section h2 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 900;
  color: var(--text, #0f172a);
}

.faq-section-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--muted, #64748b);
}

.faq-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.10);
  color: #4f46e5;
  font-weight: 800;
}

/* ------------------------------------------------------------
   FAQ items
------------------------------------------------------------ */

.faq-item {
  margin: 10px 0 0;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.52);
}

html[data-theme="dark"] .faq-item,
body.theme-dark .faq-item {
  background: rgba(2, 6, 23, 0.34);
}

.faq-item.is-hidden {
  display: none;
}

.faq-item summary {
  list-style: none;
  position: relative;
  cursor: pointer;
  padding: 16px 18px;
  padding-right: 48px;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 800;
  color: var(--text, #0f172a);
}

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

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  line-height: 1;
  font-weight: 400;
  color: #6366f1;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  padding: 0 18px 18px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted, #475569);
}

/* ------------------------------------------------------------
   Dark mode text polish
------------------------------------------------------------ */

html[data-theme="dark"] .faq-hero h1,
html[data-theme="dark"] .faq-index h4,
html[data-theme="dark"] .faq-index a,
html[data-theme="dark"] .faq-section h2,
html[data-theme="dark"] .faq-item summary,
body.theme-dark .faq-hero h1,
body.theme-dark .faq-index h4,
body.theme-dark .faq-index a,
body.theme-dark .faq-section h2,
body.theme-dark .faq-item summary {
  color: #f8fafc;
}

html[data-theme="dark"] .faq-hero p,
html[data-theme="dark"] .faq-empty,
html[data-theme="dark"] .faq-empty-note,
html[data-theme="dark"] .faq-section-meta,
html[data-theme="dark"] .faq-answer,
body.theme-dark .faq-hero p,
body.theme-dark .faq-empty,
body.theme-dark .faq-empty-note,
body.theme-dark .faq-section-meta,
body.theme-dark .faq-answer {
  color: #cbd5e1;
}

html[data-theme="dark"] .faq-index a small,
body.theme-dark .faq-index a small {
  background: rgba(30, 41, 59, 0.92);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.16);
}

html[data-theme="dark"] .faq-pill,
body.theme-dark .faq-pill {
  color: #c4b5fd;
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.16);
}

/* ------------------------------------------------------------
   Responsive
------------------------------------------------------------ */

@media (max-width: 980px) {
  .faq-hero__card,
  .faq-layout {
    grid-template-columns: 1fr;
  }

  .faq-index {
    position: static;
  }
}

@media (max-width: 720px) {
  .faq-page .site-container {
    width: min(100% - 18px, 1180px);
  }

  .faq-hero {
    padding-top: 16px;
  }

  .faq-hero__card,
  .faq-card,
  .faq-empty {
    border-radius: 22px;
  }

  .faq-hero__card {
    padding: 18px;
  }

  .faq-hero h1 {
    font-size: 29px;
  }

  .faq-hero p {
    font-size: 14px;
  }

  .faq-section {
    padding: 14px;
  }

  .faq-section h2 {
    font-size: 21px;
  }

  .faq-item summary {
    font-size: 13px;
    padding: 14px 15px;
    padding-right: 42px;
  }

  .faq-answer {
    padding: 0 15px 15px;
    font-size: 13px;
  }

  .faq-tools {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .faq-btn,
  .faq-more {
    width: 100%;
    min-height: 48px;
    border-radius: 16px;
  }
}