/* =============================================================================
   SportX UI: FAQs With Dashed Lines Component
   Exact reproduction of https://ui.sx.com/blocks/faqs/faqs-with-dashed-lines
   ============================================================================= */

:root {
  --sx-dash-color: rgba(255, 255, 255, 0.26);
  --sx-dash-offset: 80px;
  --sx-accent: #38bdf8;
}

@media (max-width: 900px) {
  :root {
    --sx-dash-offset: 16px;
  }
}

.sx-faq-section {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 20px 80px 20px;
  position: relative;
  box-sizing: border-box;
  overflow-x: clip;
}

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

.sx-faq-kicker {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sx-accent);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 9999px;
  margin-bottom: 16px;
}

.sx-faq-title {
  font-size: clamp(30px, 4.5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  background: linear-gradient(180deg, #ffffff 20%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 14px;
}

.sx-faq-subtitle {
  font-size: clamp(14px, 2vw, 16.5px);
  color: #a1a1aa;
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Category Groups */
.sx-faq-group {
  margin-bottom: 48px;
}

.sx-faq-group:last-child {
  margin-bottom: 0;
}

.sx-faq-group-title {
  font-size: 19px;
  font-weight: 600;
  color: #f4f4f5;
  margin-bottom: 20px;
  letter-spacing: -0.015em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sx-faq-group-title::before {
  content: '';
  width: 4px;
  height: 18px;
  background: var(--sx-accent);
  border-radius: 2px;
  display: inline-block;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.sx-faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Accordion Card */
.sx-faq-card {
  position: relative;
  border-radius: 12px;
  background: rgba(24, 24, 27, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.sx-faq-card:hover:not(.is-active) {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.12);
}

.sx-faq-card.is-active {
  background: rgba(24, 24, 27, 0.88);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 14px 42px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Animated Dashed Grid Lines extending outside card */
.sx-dashed-line {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

.sx-faq-card.is-active .sx-dashed-line {
  opacity: 1;
}

.sx-dashed-line-h {
  left: calc(var(--sx-dash-offset) * -1);
  right: calc(var(--sx-dash-offset) * -1);
  height: 1px;
  background-image: linear-gradient(to right, var(--sx-dash-color) 50%, transparent 50%);
  background-size: 8px 1px;
  background-repeat: repeat-x;
  -webkit-mask-image: linear-gradient(to right, transparent, black 80px, black calc(100% - 80px), transparent);
  mask-image: linear-gradient(to right, transparent, black 80px, black calc(100% - 80px), transparent);
}

.sx-dashed-line-top {
  top: -1px;
}

.sx-dashed-line-bottom {
  bottom: -1px;
}

.sx-dashed-line-v {
  top: calc(var(--sx-dash-offset) * -1);
  bottom: calc(var(--sx-dash-offset) * -1);
  width: 1px;
  background-image: linear-gradient(to bottom, var(--sx-dash-color) 50%, transparent 50%);
  background-size: 1px 8px;
  background-repeat: repeat-y;
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 80px, black calc(100% - 80px), transparent);
  mask-image: linear-gradient(to bottom, transparent, black 80px, black calc(100% - 80px), transparent);
}

.sx-dashed-line-left {
  left: -1px;
}

.sx-dashed-line-right {
  right: -1px;
}

/* Trigger Button */
.sx-faq-trigger {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: transparent;
  border: none;
  color: #f4f4f5;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  user-select: none;
  outline: none;
  border-radius: 12px;
  transition: color 0.2s ease;
}

.sx-faq-trigger:focus-visible {
  outline: 2px solid var(--sx-accent);
  outline-offset: -2px;
}

.sx-faq-card.is-active .sx-faq-trigger {
  color: #ffffff;
}

.sx-faq-question {
  flex: 1;
  padding-right: 16px;
}

/* Plus Icon rotates 45deg to an 'X' */
.sx-faq-icon-box {
  margin-left: 16px;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #71717a;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.sx-faq-card:hover .sx-faq-icon-box {
  color: #a1a1aa;
}

.sx-faq-card.is-active .sx-faq-icon-box {
  transform: rotate(45deg);
  color: var(--sx-accent);
}

.sx-faq-icon-box svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* Grid-based Smooth Accordion Body */
.sx-faq-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.sx-faq-card.is-active .sx-faq-body {
  grid-template-rows: 1fr;
}

.sx-faq-inner {
  overflow: hidden;
}

.sx-faq-answer {
  padding: 0 22px 22px 22px;
  font-size: 14.5px;
  line-height: 1.68;
  color: #a1a1aa;
  max-width: 95%;
}

.sx-faq-answer p {
  margin: 0 0 10px 0;
}

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

.sx-faq-answer code {
  font-family: 'Geist', ui-monospace, monospace;
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 2px 7px;
  border-radius: 4px;
  color: #38bdf8;
}

.sx-faq-answer a {
  color: var(--sx-accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.sx-faq-answer a:hover {
  text-decoration: underline;
  opacity: 0.9;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  :root {
    --sx-dash-offset: 40px;
  }
  .sx-faq-section {
    padding: 40px 16px 60px 16px;
  }
  .sx-faq-trigger {
    padding: 15px 16px;
    font-size: 14.5px;
  }
  .sx-faq-answer {
    padding: 0 16px 18px 16px;
    font-size: 13.5px;
    max-width: 100%;
  }
  .sx-faq-header {
    margin-bottom: 40px;
  }
}
