/* Контейнеры L1/L2 — колонки, для row-gap */
.fr-acc .fr-acc-l1 { display: flex; flex-direction: column; }
.fr-acc .fr-acc-l2 { display: flex; flex-direction: column; }

/* L3: всегда flex-колонка, но "свернута" max-height:0 + opacity:0 */
.fr-acc .fr-acc-l3 {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  /* добавили плавную анимацию margin, чтобы не было «скачка» в конце */
  transition: max-height .22s ease, opacity .22s ease, margin .22s ease;
}

/* открытое состояние */
.fr-acc .fr-acc-l3.is-open {
  opacity: 1;
  pointer-events: auto;
  /* max-height выставляет JS по контенту; тут не фиксируем */
}

/* во время закрытия — держим is-open (отступы были заданы через .is-open),
   но гасим прозрачность и анимируем отступы к нулю */
.fr-acc .fr-acc-l3.is-open.closing {
  opacity: 0;
  pointer-events: none;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  margin-left: 0 !important;
}

/* Переносы длинных заголовков */
.fr-acc .fr-acc-l1-title,
.fr-acc .fr-acc-l2-title,
.fr-acc .fr-acc-l3 a {
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

/* 2-й уровень — без внутренних/внешних отступов у "кнопки" */
.fr-acc .fr-acc-l2-toggle {
  background: transparent;
  border: 0;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
  width: 100%;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0 !important;
  margin: 0 !important;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* Иконка справа: видимость — только hover/expanded */
.fr-acc .fr-acc-ic {
  margin-left: 8px; /* переопределяется через Elementor (arrow_gap) */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}
.fr-acc .fr-acc-ic svg { display: block; }
.fr-acc .fr-acc-l2-toggle:hover .fr-acc-ic,
.fr-acc .fr-acc-l2-toggle[aria-expanded="true"] .fr-acc-ic {
  opacity: 1;
}

/* Сбросы списков */
.fr-acc .fr-acc-l2-item,
.fr-acc .fr-acc-l3-item { margin: 0; padding: 0; }

/* Фокус клавиатуры: рамка только для таб-навигации */
.fr-acc .fr-acc-l2-toggle:focus { outline: none; }
.fr-acc .fr-acc-l2-toggle:focus-visible {
  outline: 2px solid rgba(0,0,0,.25);
  outline-offset: 2px;
}
