/* Noosfera · FAQ (Accordion) */

.noosfera-pattern--faq {
  overflow: hidden;
}

.noosfera-pattern--faq.nf-faq {
  position: relative;
  padding-inline: clamp(16px, 4vw, 40px);
  padding-block: clamp(12px, 2.4vw, 24px);
}

.noosfera-pattern--faq .nf-faq__wrap {
  width: 100%;
  max-width: 997px;
  margin-inline: auto;
}

.nf-faq__title {
  color: var(--wp--preset--color--blue-700, #467FF7);
  margin: 0 0 18px;
  line-height: 1.06;
}

.noosfera-pattern--faq.nf-faq::after {
  content: "";
  position: absolute;
  right: clamp(-40px, -3vw, -16px);
  top: 38%;
  transform: translateY(-50%);
  width: clamp(220px, 26vw, 360px);
  height: clamp(220px, 26vw, 360px);
  background: url("../../assets/img/spirale.png") no-repeat center / contain;
  opacity: 0.3;
  pointer-events: none;
  filter: drop-shadow(0 12px 20px rgba(22, 53, 120, 0.1));
  z-index: 0;
}

.nf-faq__list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.nf-faq__item {
  position: relative;
  margin: 0;
  width: 100%;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--wp--preset--color--border, #E6E8EF) 92%, transparent);
  /*background: var(--wp--preset--color--surface, #FFFFFF);*/
  box-shadow: 0 6px 14px rgba(22, 53, 120, 0.07);
  overflow: clip;
  transition: background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.nf-faq__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: transparent;
  transition: background-color 0.22s ease;
}

.nf-faq__item > summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  line-height: 1.45;
  /*color: var(--wp--preset--color--blue-900, #163578);*/
  color: #596480;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.nf-faq__item > summary::-webkit-details-marker {
  display: none;
}

.nf-faq__item > summary .nf-faq__icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--wp--preset--color--border, #E6E8EF) 84%, transparent);
  background: #F9F8FB;
  color:  #596480;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.nf-faq__item > summary .nf-faq__icon .noosfera-lucide,
.nf-faq__item > summary .nf-faq__icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

.nf-faq__item[open] {
  background: color-mix(in srgb, var(--wp--preset--color--surface-accent-1, #F4F2FE) 92%, #FFFFFF 8%);
  border-color: color-mix(in srgb, var(--wp--preset--color--blue-700, #467FF7) 26%, transparent);
  box-shadow: 0 10px 24px rgba(22, 53, 120, 0.09);
}

.nf-faq__item[open]::before {
  background: var(--wp--preset--color--blue-700, #467FF7);
}

.nf-faq__item[open] > summary {
  border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--blue-700, #467FF7) 30%, transparent);
}

.nf-faq__item[open] > summary .nf-faq__icon {
  transform: rotate(180deg);
  color: var(--wp--preset--color--blue-700, #467FF7);
  border-color: color-mix(in srgb, var(--wp--preset--color--blue-700, #467FF7) 35%, transparent);
  background: color-mix(in srgb, var(--wp--preset--color--blue-700, #467FF7) 12%, #FFFFFF);
}

.nf-faq__item > :where(:not(summary)) {
  margin: 0;
  padding-inline: 22px;
  line-height: 1.7;
  color: #252831;
}

.nf-faq__item > :where(:not(summary)):first-of-type {
  padding-top: 14px;
}

.nf-faq__item > :where(:not(summary)):not(:first-of-type) {
  padding-top: 10px;
}

.nf-faq__item > :where(:not(summary)):last-of-type {
  padding-bottom: 20px;
}

.nf-faq__item > :where(:not(summary)) ul,
.nf-faq__item > :where(:not(summary)) ol,
.nf-faq__item > :where(:not(summary)).wp-block-list {
  margin: 0;
  padding-left: 1.2em;
}

.nf-faq__item > :where(:not(summary)) li {
  margin: 0;
}

.nf-faq__item > :where(:not(summary)) li + li {
  margin-top: 8px;
}

.nf-faq__item > summary:focus-visible {
  outline: 2px solid var(--wp--preset--color--blue-700, #467FF7);
  outline-offset: 2px;
}

@media (max-width: 782px) {
  .noosfera-pattern--faq.nf-faq::after {
    display: none;
  }

  .nf-faq__item > summary {
    padding: 16px;
    gap: 10px;
  }

  .nf-faq__item > :where(:not(summary)) {
    padding-inline: 16px;
  }

  .nf-faq__item > :where(:not(summary)):first-of-type {
    padding-top: 10px;
  }

  .nf-faq__item > :where(:not(summary)):not(:first-of-type) {
    padding-top: 8px;
  }

  .nf-faq__item > :where(:not(summary)):last-of-type {
    padding-bottom: 16px;
  }

  .nf-faq__item > :where(:not(summary)) li + li {
    margin-top: 6px;
  }
}
