/* =============================================================================
   Tewido Q&A List — component styles. Everything scoped to .qa-list, so the
   block still works standalone with no widget CSS attached to it at all.

   No font-family is declared anywhere — it inherits the site's type.

   Every value the Elementor widget exposes is a custom property declared here
   with a designed default. Elementor writes its overrides at
   `.elementor-element-xxx .qa-list`, which outranks the bare `.qa-list` below,
   so a control that is left empty simply leaves the default standing.
   ========================================================================== */

.qa-list {
  /* ------------------------------- brand ------------------------------- */
  --qa-brand: #D85048;
  --qa-brand-d: #B93C35;
  --qa-brand-t: #FDF0EF;

  /* -------------------------------- ink -------------------------------- */
  --qa-ink: #15223A;
  --qa-ink-2: #5A6A80;
  --qa-ink-3: #9AA6B7;
  --qa-line: #E6EBF2;
  --qa-card: #FFFFFF;

  /* ------------------------------- metrics ----------------------------- */
  --qa-fs: clamp(13px, 1.1vw, 17px);
  --qa-num-col: 4.4em;
  --qa-rail-w: 3px;
  --qa-rail-offset: 0.8em;
  --qa-item-pad: 1.6em;
  --qa-radius: 0.85em;

  /* The rail fills like a timer, so this MUST match the `dwell` option the
     script is given — the widget writes both from one control. */
  --qa-dwell: 2600ms;
  --qa-stagger: 0.08s;

  /* Derived from the brand, so recolouring the brand recolours the glow and
     the shadow with it instead of leaving two stale reds behind. */
  --qa-glow: color-mix(in srgb, var(--qa-brand) 8%, transparent);
  --qa-shadow: color-mix(in srgb, var(--qa-brand) 50%, transparent);
  --qa-lit-border: color-mix(in srgb, var(--qa-brand) 22%, transparent);

  position: relative;
  box-sizing: border-box;
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--qa-fs);
  line-height: 1.55;
  color: var(--qa-ink);
}

.qa-list *, .qa-list *::before, .qa-list *::after { box-sizing: border-box; min-width: 0; }

.qa-list :where(h2, h3, h4, h5, h6, p, span, div, b, strong, i, em, li) {
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  font-style: normal;
  list-style: none;
}

/* --------------------------------- item ---------------------------------- */
.qa-item {
  position: relative;
  display: grid;
  grid-template-columns: var(--qa-num-col) minmax(0, 1fr);
  gap: 0.6em;
  align-items: start;
  padding: var(--qa-item-pad) 0.2em var(--qa-item-pad) 0;
  border-top: 1px solid var(--qa-line);
}

.qa-item:first-child { border-top: 0; }

/* A list with the numerals switched off has no first column to reserve. */
.qa-list--flush .qa-item { grid-template-columns: minmax(0, 1fr); }

/* the brand rail — it fills like a timer while the item is lit */
.qa-item::before {
  content: "";
  position: absolute;
  left: calc(var(--qa-rail-offset) * -1);
  top: var(--qa-item-pad);
  bottom: var(--qa-item-pad);
  width: var(--qa-rail-w);
  border-radius: var(--qa-rail-w);
  background: var(--qa-brand);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.3s ease;
}

.qa-item.is-lit::before { transform: scaleY(1); transition: transform var(--qa-dwell) linear; }
.qa-item:hover::before  { transform: scaleY(1); transition: transform 0.35s cubic-bezier(.22, 1, .36, 1); }

/* the soft light that travels with the spotlight */
.qa-item::after {
  content: "";
  position: absolute;
  inset: -0.1em -0.6em;
  pointer-events: none;
  border-radius: 1em;
  background: radial-gradient(52% 120% at 0% 50%, var(--qa-glow), transparent 72%);
  opacity: 0;
  transition: opacity 0.45s;
}

.qa-item:hover::after, .qa-item.is-lit::after { opacity: 1; }

/* ------------------------------- the numeral ----------------------------- */
.qa-num {
  font-size: 2.4em;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: var(--qa-num, var(--qa-line));
  font-variant-numeric: tabular-nums;
  transition: color 0.45s, transform 0.45s cubic-bezier(.34, 1.56, .64, 1);
}

.qa-item:hover .qa-num,
.qa-item.is-lit .qa-num { color: var(--qa-num-lit, var(--qa-brand)); transform: translateX(0.1em); }

/* ------------------------------ the question ----------------------------- */
.qa-body { display: grid; gap: 0.55em; position: relative; }

.qa-who {
  font-size: 0.72em;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--qa-ink-3);
  transition: color 0.45s;
}

.qa-item:hover .qa-who, .qa-item.is-lit .qa-who { color: var(--qa-brand); }

.qa-q {
  position: relative;
  font-size: 1.2em;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.012em;
  color: var(--qa-ink);
  max-width: 30em;
}

/* ------------------------------- the answer ------------------------------ */
.qa-a {
  margin-top: 0.35em;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75em;
  align-items: start;
  padding: 0.9em 1.05em;
  border-radius: var(--qa-radius);
  background: var(--qa-card);
  border: 1px solid var(--qa-line);
  border-inline-start: 3px solid var(--qa-line);
  transition: background 0.45s, border-color 0.45s, box-shadow 0.45s,
              transform 0.45s cubic-bezier(.22, 1, .36, 1);
}

/* An answer with no icon must not leave the icon column's gap behind. */
.qa-a--plain { grid-template-columns: minmax(0, 1fr); }

/* A class, not `.qa-a > i`: Elementor's icon control can render an <i> or an
   <svg>, and only a wrapper class holds for both. */
.qa-a__icon {
  width: 1.4em;
  height: 1.4em;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-top: 0.08em;
  background: #344465;
  color: #fff;
  transition: background 0.45s, color 0.45s, transform 0.45s cubic-bezier(.34, 1.56, .64, 1),
              box-shadow 0.45s;
}

/* The built-in tick is a stroked path with no fill. */
.qa-a__icon > svg {
  width: 0.7em;
  height: 0.7em;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* An icon picked in the panel is a glyph or a filled path, not the stroked
   tick this component draws itself — it must not inherit the tick's rules. */
.qa-a__icon--custom > svg { width: 0.62em; height: 0.62em; fill: currentColor; stroke: none; stroke-width: 0; }
.qa-a__icon--custom > i   { font-size: 0.62em; line-height: 1; font-style: normal; }

.qa-a__text { font-size: 0.95em; color: var(--qa-ink-2); transition: color 0.45s; }

.qa-a__by {
  display: block;
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--qa-ink-3);
  margin-bottom: 0.6em;
  transition: color 0.45s;
}

.qa-a__by b { font-weight: 800; color: var(--qa-ink-2); transition: color 0.45s; }

/* =============== the lit state — hover and the loop share it ============== */
.qa-item:hover .qa-a,
.qa-item.is-lit .qa-a {
  background: var(--qa-brand-t);
  border-color: var(--qa-lit-border);
  border-inline-start-color: var(--qa-brand);
  box-shadow: 0 1.3em 2.2em -1.3em var(--qa-shadow);
  transform: translateX(0.2em);
}

.qa-item:hover .qa-a__icon,
.qa-item.is-lit .qa-a__icon {
  background: linear-gradient(150deg, var(--qa-brand), var(--qa-brand-d));
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0.35em 0.8em -0.35em var(--qa-brand);
}

.qa-item:hover .qa-a__by,   .qa-item.is-lit .qa-a__by   { color: var(--qa-brand); }
.qa-item:hover .qa-a__by b, .qa-item.is-lit .qa-a__by b { color: var(--qa-brand-d); }
.qa-item:hover .qa-a__text, .qa-item.is-lit .qa-a__text { color: var(--qa-ink); }

/* --------------------------- reveal on scroll ----------------------------
   .qa-anim is added by the script, so with no script nothing is hidden.    */
.qa-list.qa-anim .qa-item {
  opacity: 0;
  transform: translateY(1em);
  transition: opacity 0.6s cubic-bezier(.22, 1, .36, 1), transform 0.6s cubic-bezier(.22, 1, .36, 1);
  transition-delay: calc(var(--i, 0) * var(--qa-stagger));
}

.qa-list.qa-anim .qa-item.is-in { opacity: 1; transform: none; }

/* ------------------------------ accessibility ---------------------------- */
@media (prefers-reduced-motion: reduce) {
  .qa-list.qa-anim .qa-item { opacity: 1; transform: none; transition: none; }
  .qa-item::before { transition: none; }
}

/* -------------------------------- responsive ----------------------------- */
@media (max-width: 640px) {
  .qa-list { --qa-fs: 14px; --qa-item-pad: 1.4em; --qa-rail-offset: 0.7em; }
  .qa-item { grid-template-columns: minmax(0, 1fr); gap: 0.3em; padding-right: 0; }
  .qa-item::after { inset: -0.1em -0.4em; }
  .qa-num { font-size: 1.6em; }
  .qa-q { font-size: 1.1em; }
}
