/* FAQ — source: sections/Faq.tsx
 *
 * Built on Elementor's classic Accordion widget, which already gives
 * one-open-at-a-time (base-tabs.js: toggleSelf + hidePrevious) and toggles
 * .elementor-active on the open .elementor-tab-title / .elementor-tab-content.
 *
 * Everything below outranks Elementor's widget-accordion.css purely on the #faq
 * id: its rules top out at (0,3,0), so (1,1,0) here wins every longhand —
 * including the `.elementor-accordion-item+.elementor-accordion-item
 * {border-block-start:none}` border-collapsing, which we want off since each
 * item is a separate card.
 *
 * Deliberately NOT overridden: `.elementor-tab-content{display:none}`. That is
 * the closed state, and the handler drives it with an inline display via
 * jQuery slideUp/slideDown.
 */

#faq {
  background: var(--page-panel);
}

/* Static blob (no keyframes — the source does not animate this one). */
#faq .lt-faq-blob {
  bottom: -60px;
  inset-inline-end: -60px;
  width: 360px;
  height: 300px;
  border-radius: 55% 45% 40% 60% / 45% 60% 40% 55%;
  background: rgba(41, 128, 242, 0.06);
}

/* Narrower than .lt-container's 1280 — a full-width list of 8 rows reads badly. */
#faq .lt-faq-inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
}

/* Elementor resets .elementor-heading-title{line-height:1;margin:0} at (0,1,0),
   which beats inheritance from the wrapper — set type on the title itself. */
#faq .lt-faq-eyebrow {
  color: var(--brand-primary);
  background: rgba(41, 128, 242, 0.08);
  box-shadow: inset 0 0 0 1px rgba(41, 128, 242, 0.18);
}

#faq .lt-faq-h2 .elementor-heading-title {
  font-size: var(--t-h2);
  font-weight: 900;
  line-height: 1.05;
  color: var(--page-fg-strong);
}

/* Items */
#faq .elementor-accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#faq .elementor-accordion-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

/* .elementor-active lands on the title/content, never on the item — :has() is
   the only way to reach the card from the open child. */
#faq .elementor-accordion-item:has(.elementor-tab-title.elementor-active) {
  border-color: var(--brand-primary);
  box-shadow: 0 4px 20px -4px rgba(41, 128, 242, 0.18);
}

/* Question row */
#faq .elementor-tab-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(18px, 2.5vw, 24px);
  margin: 0;
  cursor: pointer;
}

/* Elementor prints the icon before the title; the source puts the toggle at the
   far end. Ordering beats reversing so the DOM/tab order stays question-first. */
#faq .elementor-accordion-title {
  order: 1;
  font-size: var(--t-body);
  font-weight: 700;
  line-height: 1.35;
  color: var(--page-fg-strong);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

#faq .elementor-tab-title.elementor-active .elementor-accordion-title {
  color: var(--brand-primary);
}

/* Toggle: one plus glyph for both states, rotated 45deg into an x when open.
   float:none undoes Elementor's icon_align float (a no-op on a flex item, but
   the declaration is what the widget ships and it is clearer to kill it). */
#faq .elementor-accordion-icon {
  order: 2;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  float: none;
  border-radius: 50%;
  background: rgba(41, 128, 242, 0.10);
  color: var(--brand-primary);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

#faq .elementor-tab-title.elementor-active .elementor-accordion-icon {
  background: var(--brand-primary);
  color: #fff;
  transform: rotate(45deg);
}

/* Do NOT set display on the icon-closed/-opened spans: Elementor toggles those
   with display, and an id-scoped rule here would show both at once. */
#faq .elementor-accordion-icon i {
  display: block;
  font-size: 11px;
  line-height: 1;
}

/* Answer */
#faq .elementor-tab-content {
  border-block-start: 1px solid var(--line);
  padding: 0 clamp(18px, 2.5vw, 24px) clamp(18px, 2.5vw, 24px);
  padding-top: 16px;
  font-size: var(--t-body);
  color: var(--page-fg-muted);
  line-height: 1.7;
}

#faq .elementor-tab-content p {
  margin: 0;
}

@media (max-width: 820px) {
  #faq .elementor-tab-title {
    min-height: 56px;
  }
}
