/* =========================================================
   FAQ — accordion

   Palette Sourcesense: accento #DA291C (era un blu #2563eb), testo #3D3935,
   bordi e ombre come alpha del dark di brand invece di neri neutri. Il font si
   eredita dal tema (soleil), non è dichiarato qui.
   ========================================================= */

.faq-module {
  background: var(--faq-bg, #f7f7f2);
  color: var(--faq-text, #3d3935);
  padding: 40px 32px;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(61, 57, 53, 0.10);
}

.faq-module__inner {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

/* ---- Titolo sezione ---- */
.faq-module__title {
  margin: 0 0 36px;
  font-size: clamp(1.5rem, 2.8vw, 2.25rem);
  line-height: 1.15;
  font-weight: 700;
  color: var(--faq-text, #3d3935);
}

/* ---- Lista FAQ ---- */
.faq-list {
  display: flex;
  flex-direction: column;
  /* Reset lista HubSpot */
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ---- Singolo item ---- */
.faq-item {
  border-bottom: 1.5px solid rgba(61, 57, 53, 0.14);
}

.faq-item:first-child {
  border-top: 1.5px solid rgba(61, 57, 53, 0.14);
}

/* ---- Pulsante trigger ---- */
.faq__trigger {
  all: unset;
  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  cursor: pointer;
  color: var(--faq-text, #3d3935);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  font-family: inherit;
}

/* css/theme-overrides.css applica a ogni <button> una regola
   button:hover, button:focus { color / background-color / border-radius }
   costruita dai settings del tema. Il trigger è un <button>, e button:hover
   (0,1,1) batte .faq__trigger (0,1,0): "all: unset" non basta a fermarla,
   perché agisce sullo stato normale e non su quello di hover.
   Questi selettori valgono (0,2,1) e la annullano. L'anello di focus resta:
   è un outline su :focus-visible, che qui non viene toccato. */

.faq-item .faq__trigger:hover,
.faq-item .faq__trigger:focus {
  background: none;
  background-color: transparent;
  border: none;
  border-radius: 0;
  color: var(--faq-text, #3d3935);
}

/* Domanda aperta: colore accento, anche sotto il puntatore */

.faq-item.is-open .faq__trigger,
.faq-item.is-open .faq__trigger:hover,
.faq-item.is-open .faq__trigger:focus {
  color: var(--faq-accent, #ae2116);
}

.faq__trigger:focus-visible {
  outline: 2px solid var(--faq-accent, #ae2116);
  outline-offset: 4px;
  border-radius: 4px;
}

.faq__question-text {
  flex: 1 1 auto;
  min-width: 0;
}

/* ---- Icona chevron ---- */
.faq__icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--faq-text, #3d3935);
  opacity: 0.4;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.faq-item.is-open .faq__icon {
  transform: rotate(180deg);
  opacity: 1;
  color: var(--faq-accent, #ae2116);
}

/* ---- Pannello risposta ---- */
.faq__panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item:not(.is-open) .faq__panel {
  max-height: 0 !important;
}

.faq__answer-inner {
  /* Indent leggero per distinguere visivamente domanda e risposta */
  padding: 0 48px 24px 0;
  font-size: 0.9875rem;
  line-height: 1.75;
  color: color-mix(in srgb, var(--faq-text, #3d3935) 85%, transparent);
  background: var(--faq-answer-bg, transparent);
}

/* Fallback per browser che non supportano color-mix */
@supports not (color: color-mix(in srgb, red, blue)) {
  .faq__answer-inner {
    color: #5a544e;
  }
}

/* Reset tipografici HubSpot */
.faq__answer-inner > *:first-child { margin-top: 0; }
.faq__answer-inner > *:last-child  { margin-bottom: 0; }

.faq__answer-inner p {
  margin: 0 0 12px;
}

.faq__answer-inner a {
  color: var(--faq-accent, #ae2116);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.faq__answer-inner a:hover {
  text-decoration: none;
}

.faq__answer-inner ul,
.faq__answer-inner ol {
  padding-left: 1.25em;
  margin: 8px 0 12px;
}

.faq__answer-inner li + li {
  margin-top: 6px;
}

.faq__answer-inner strong {
  font-weight: 600;
  color: var(--faq-text, #3d3935);
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .faq__panel,
  .faq__icon {
    transition: none;
  }
}

/* ---- Mobile ---- */
@media (max-width: 767px) {
  .faq-module {
    padding: 28px 20px;
    border-radius: 10px;
  }

  .faq-module__inner {
    padding: 0;
  }

  .faq__trigger {
    padding: 18px 0;
    font-size: 1rem;
  }

  .faq__answer-inner {
    padding-right: 32px;
    padding-bottom: 20px;
    font-size: 0.9375rem;
  }
}