/* ============================================================
   SITE FAQ - used by the homepage and Success Stories.
   ============================================================ */
.faq { --navy-deep:#0B1026; --card:#16203F; --card-line:#263056; --muted:#AAB2C5; --text:#fff; --teal:#EF4444; --coral:#EF4444; color:#fff; font-family:'Plus Jakarta Sans',sans-serif; }
.faq *, .faq *::before, .faq *::after { box-sizing:border-box; }
.faq .fq-list, .faq .fq-cats { margin:0; padding:0; }

  .faq { position: relative; padding: 56px 0 60px; overflow-x: clip; }
  .faq::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: radial-gradient(680px 300px at 50% 0%, rgba(239, 68, 68,0.10), transparent 62%); }
  .faq .wrap { position: relative; z-index: 1; }

  /* ---- header: tightened, subtitle trimmed ---- */
  .fq-head { text-align: center; margin: 0 auto 22px; max-width: 620px; container-type: inline-size; }
  .fq-eyebrow { display: inline-block; color: var(--teal); font-weight: 600; font-size: clamp(10px, 1.7cqi, 12px); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 8px; }
  .fq-title { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: clamp(1.4rem, 4.4cqi, 1.85rem); line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 8px; }
  .fq-sub { color: var(--muted); font-size: clamp(13px, 2.2cqi, 15px); line-height: 1.5; max-width: 540px; margin: 0 auto; text-wrap: balance; }

  /* ---- layout ---- */
  .fq-grid { display: grid; grid-template-columns: 216px 1fr; gap: 24px; align-items: start; }

  /* =========================================================
     CATEGORY PILLS — shared look for the desktop rail and the
     mobile scroller. Inactive = quiet. Active = gradient hairline
     border + soft glow, drawn with a two-layer background so we
     never need an extra wrapper element.
     ========================================================= */
  .faq .cat, .fq-chip {
    position: relative; display: flex; align-items: center; gap: 9px;
    cursor: pointer; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 13.5px; font-weight: 500;
    color: var(--muted); text-align: left; border-radius: 12px;
    border: 1px solid var(--card-line); background: rgba(255,255,255,0.015);
    transition: color .2s ease, background .2s ease, border-color .2s ease, box-shadow .25s ease;
  }
  .faq .cat:hover, .fq-chip:hover { color: var(--text); background: rgba(255,255,255,0.05); }

  .faq .cat.active, .fq-chip.active {
    color: var(--text); font-weight: 600;
    border: 1px solid transparent;
    background:
      linear-gradient(#151B33, #131829) padding-box,
      linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 15%, transparent)) border-box;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 10%, transparent),
                0 6px 20px color-mix(in srgb, var(--c) 20%, transparent);
  }

  .faq .cat-ico, .fq-chip .chip-ico {
    flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px;
    display: grid; place-items: center; font-size: 12.5px; line-height: 1;
    background: rgba(255,255,255,0.05); transition: background .2s ease;
  }
  .faq .cat.active .cat-ico, .fq-chip.active .chip-ico {
    background: color-mix(in srgb, var(--c) 20%, transparent);
  }

  .faq .cat-count, .fq-chip .chip-count {
    margin-left: auto; flex: 0 0 auto; min-width: 20px; text-align: center;
    font-size: 11px; font-weight: 600; color: #5B6684;
    background: rgba(255,255,255,0.04); border-radius: 20px; padding: 2px 7px;
    transition: color .2s ease, background .2s ease;
  }
  .faq .cat.active .cat-count, .fq-chip.active .chip-count {
    color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent);
  }

  /* ---- desktop rail ---- */
  .fq-rail { position: sticky; top: 20px; }
  .fq-rail-label { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 10.5px; font-weight: 600;
    letter-spacing: 0.13em; text-transform: uppercase; color: #5B6684; margin-bottom: 10px; padding-left: 2px; }
  .fq-cats { display: flex; flex-direction: column; gap: 6px; }
  .faq .cat { width: 100%; height: 50px; padding: 0 12px; }

  /* mobile-only bits, off by default */
  .fq-chips, .fq-chips-label, .fq-chips-scroller, .fq-dots { display: none; }

  /* ---- questions panel ---- */
  .fq-panel { min-width: 0; }

  .fq-list { display: flex; flex-direction: column; gap: 8px; }

  .qa { border: 1px solid var(--card-line); border-radius: 14px; background: rgba(255,255,255,0.018);
    overflow: hidden; transition: border-color .25s ease, background .25s ease; }
  .qa:hover { border-color: color-mix(in srgb, var(--c) 35%, var(--card-line)); }
  .qa.open { border-color: color-mix(in srgb, var(--c) 45%, var(--card-line)); background: rgba(255,255,255,0.03); }

  .qa-q { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px;
    padding: 10px 16px; text-align: left; cursor: pointer;
    background: none; border: 0; color: var(--text); font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14.5px; font-weight: 500; line-height: 1.4; }
  .qa-q .qmark { display: none; }            /* dropped — buys ~36px so titles stay on one line */
  .qa-q .qtext { flex: 1; min-width: 0; }

  /* chevron becomes a quiet +/x toggle */
  .qa-q .chev { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
    display: grid; place-items: center; font-size: 0; color: var(--muted);
    background: rgba(255,255,255,0.05); transition: transform .3s cubic-bezier(.4,0,.2,1), background .25s ease, color .25s ease; }
  .qa-q .chev::before { content: "+"; font-size: 15px; font-weight: 400; line-height: 1; }
  .qa.open .qa-q .chev { transform: rotate(135deg); color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }

  .qa-a { max-height: 0; overflow: hidden; transition: max-height .35s cubic-bezier(.4,0,.2,1); }
  .qa-a-inner { padding: 0 16px 16px; color: var(--muted); font-size: 13.5px; line-height: 1.6; }

  @keyframes panelIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  .fq-panel.swap { animation: panelIn .3s cubic-bezier(.2,.7,.2,1); }


  /* =========================================================
     MOBILE — rail becomes a sticky swipeable strip
     ========================================================= */
  @media (max-width: 860px) {
    .faq { padding: 40px 0 44px; }
    .fq-head { margin-bottom: 16px; }
    .fq-grid { grid-template-columns: 1fr; gap: 0; }
    .fq-rail { display: none; }
    .fq-chips-label { display: none; }        /* the pills speak for themselves */

    .fq-chips-scroller {
      display: block; position: sticky; top: 0; z-index: 20;
      margin: 0 -24px 12px; padding: 8px 0 9px;
      background: color-mix(in srgb, var(--navy-deep) 88%, transparent);
      backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
      border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .fq-chips { display: flex; gap: 7px; overflow-x: auto; padding: 2px 24px;
      scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .fq-chips::-webkit-scrollbar { display: none; }

    /* Fixed fraction, not content width: 2 chips fit and the 3rd is cut in
       half, so the strip always *looks* scrollable. Count badge is dropped
       here — at this width it would squeeze the longest names to nothing. */
    .fq-chip { flex: 0 0 calc(40% - 7px); width: auto; flex-direction: row;
      height: 38px; padding: 0 11px; scroll-snap-align: center; font-size: 12.5px; }
    .fq-chip .chip-count { display: none; }
    .fq-chip .chip-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .fq-chip .chip-ico { width: 20px; height: 20px; font-size: 11.5px; }

    /* edge fades tell you there's more to swipe */
    .fq-fade { position: absolute; top: 8px; bottom: 9px; width: 40px; pointer-events: none; z-index: 2;
      opacity: 0; transition: opacity .25s ease; }
    .fq-fade-l { left: 0;  background: linear-gradient(90deg, var(--navy-deep), transparent); }
    .fq-fade-r { right: 0; background: linear-gradient(270deg, var(--navy-deep), transparent); }
    .fq-chips-scroller.more-l .fq-fade-l { opacity: 1; }
    .fq-chips-scroller.more-r .fq-fade-r { opacity: 1; }

    /* tappable nudges at each edge — each shows only when that side has more */
    .fq-arrow { position: absolute; top: 50%; transform: translateY(-50%);
      z-index: 3; width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
      display: grid; place-items: center; padding: 0 0 2px;
      font-size: 17px; line-height: 1; color: var(--text);
      background: color-mix(in srgb, var(--navy-deep) 92%, transparent);
      border: 1px solid var(--card-line);
      opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .2s ease; }
    .fq-arrow-l { left: 6px; }
    .fq-arrow-r { right: 6px; }
    .fq-chips-scroller.more-l .fq-arrow-l,
    .fq-chips-scroller.more-r .fq-arrow-r { opacity: 1; pointer-events: auto; }
    .fq-arrow:active { transform: translateY(-50%) scale(.9); }

    /* position dots */
    .fq-dots { display: flex; justify-content: center; gap: 7px; margin: 0 0 14px; }
    .fq-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--card-line);
      border: none; padding: 0; cursor: pointer; transition: all .3s ease; }
    .fq-dot.on { background: var(--coral); width: 24px; border-radius: 100px; }

    .qa-q { min-height: 54px; font-size: 13.5px; padding: 9px 14px; gap: 10px; }
    .qa-a-inner { padding: 0 14px 14px; font-size: 12.5px; }

  }

  @media (prefers-reduced-motion: reduce) {
    .qa-a, .qa-q .chev, .faq .cat, .fq-chip, .qa { transition: none; }
    .fq-panel.swap { animation: none; }
  }


/* Same heading style as the homepage sections */
.faq { padding-top:88px; }
.faq .fq-head { max-width:none; margin:0 auto 36px; }
.faq .fq-title { font-family:'Plus Jakarta Sans',sans-serif; font-weight:700; font-size:32px; line-height:1.16; letter-spacing:-.02em; margin:0 auto 12px; color:#fff; white-space:normal; text-wrap:balance; }
.faq .fq-sub { font-size:16px; font-weight:400; line-height:1.55; color:var(--muted); max-width:760px; margin:0 auto; }
.faq .fq-eyebrow { margin-bottom:12px; }
.faq .fq-eyebrow, .faq .fq-rail-label { font-family:'JetBrains Mono',ui-monospace,monospace; }
.faq .cat-ico svg, .faq .chip-ico svg { width:1.05em; height:1.05em; display:block; }
.faq .cat-ico, .faq .chip-ico { color:#F87171; }
/* Phones and tablets: the topic strip fills the screen width on any page */
@media (max-width:860px) {
  .faq .fq-chips-scroller { margin-left:calc(50% - 50vw); margin-right:calc(50% - 50vw); }
}
@media (max-width:767px) {
  .faq { padding-top:56px; }
  .faq .fq-title { font-size:24px; line-height:1.2; }
  .faq .fq-sub { font-size:14px; }
  .faq .fq-head { margin-bottom:24px; }
}
