/*
 * FAQ page styles
 * Eko DDD - Frequently Asked Questions accordion
 */

/* Hero section */
.hero {
  position: relative;
  isolation: isolate;
  background: radial-gradient(
      1200px 600px at 10% -10%,
      color-mix(in oklab, var(--brand-purple) 10%, white) 0%,
      transparent 55%
    ),
    radial-gradient(
      900px 500px at 100% 10%,
      color-mix(in oklab, var(--brand-green) 12%, white) 0%,
      transparent 60%
    ),
    linear-gradient(180deg, #ffffff, #f6f7fb);
}

.hero__wrap {
  width: var(--container);
  margin-inline: auto;
  padding: clamp(3.5rem, 6vw, 6.5rem) 0 clamp(2.5rem, 4vw, 3rem);
  text-align: center;
  max-width: 50rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.hero__title {
  font-family: Poppins, Inter, sans-serif;
  font-weight: 800;
  line-height: 1.1;
  font-size: clamp(2rem, 3.8vw + 1rem, 3.6rem);
  letter-spacing: -0.5px;
  margin: 0.9rem 0 0.7rem;
}

.hero__title .hl {
  background: linear-gradient(
    90deg,
    var(--brand-purple),
    color-mix(in oklab, var(--brand-purple) 70%, var(--brand-green))
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  font-size: clamp(1rem, 1vw + 0.8rem, 1.25rem);
  color: var(--muted);
  margin: 0;
}

/* FAQ Accordion */
.faq {
  max-width: 56rem;
  margin-inline: auto;
}

.faq__item {
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.faq__item:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 0, 0, 0.08);
}

.faq__item.is-open {
  border-color: color-mix(in oklab, var(--brand-purple) 25%, white);
  box-shadow: var(--shadow-md);
}

.faq__question {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease;
}

.faq__question:hover {
  background: color-mix(in oklab, var(--brand-purple) 2%, white);
}

.faq__item.is-open .faq__question {
  background: color-mix(in oklab, var(--brand-purple) 3%, white);
  padding-bottom: 1rem;
}

.faq__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(
    135deg,
    color-mix(in oklab, var(--brand-purple) 10%, white),
    color-mix(in oklab, var(--brand-green) 10%, white)
  );
  color: var(--brand-purple);
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  border: 1px solid color-mix(in oklab, var(--brand-purple) 15%, white);
}

.faq__item.is-open .faq__number {
  background: linear-gradient(
    135deg,
    var(--brand-purple),
    color-mix(in oklab, var(--brand-purple) 80%, var(--brand-green))
  );
  color: white;
  border-color: var(--brand-purple);
}

.faq__title {
  font-family: Poppins, Inter, sans-serif;
  font-size: clamp(1rem, 1vw + 0.7rem, 1.2rem);
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  line-height: 1.4;
}

.faq__icon {
  flex-shrink: 0;
  color: var(--brand-purple);
  transition: transform 0.3s ease;
}

.faq__item.is-open .faq__icon {
  transform: rotate(180deg);
}

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq__item.is-open .faq__answer {
  max-height: 800px;
  padding-bottom: 1.25rem;
}

.faq__content {
  padding: 0 1.5rem 0 calc(1.5rem + 40px + 1rem);
  color: var(--muted);
  line-height: 1.7;
}

.faq__content p {
  margin: 0 0 0.8rem;
}

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

.faq__content strong {
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 700px) {
  .faq__question {
    grid-template-columns: auto 1fr;
    gap: 0.8rem;
    padding: 1rem;
  }

  .faq__icon {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
  }

  .faq__number {
    grid-column: 1;
    grid-row: 2;
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  .faq__title {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .faq__content {
    padding: 0 1rem;
  }

  .faq__item.is-open .faq__answer {
    padding-bottom: 1rem;
  }
}

/* CTA Box */
.cta-box {
  background: linear-gradient(
    135deg,
    color-mix(in oklab, var(--brand-purple) 8%, white),
    color-mix(in oklab, var(--brand-green) 8%, white)
  );
  border: 1px solid color-mix(in oklab, var(--brand-purple) 15%, white);
  border-radius: 20px;
  padding: clamp(2rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  box-shadow: var(--shadow-md);
}

.cta-box__content {
  flex: 1;
}

.cta-box__content .heading {
  margin-bottom: 0.5rem;
}

.cta-box__actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .cta-box {
    flex-direction: column;
    align-items: flex-start;
    text-align: center;
  }

  .cta-box__actions {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .cta-box__actions {
    flex-direction: column;
    width: 100%;
  }

  .cta-box__actions .btn {
    width: 100%;
    justify-content: center;
  }
}
