/* FAQ (amf-faq) — ported from automediafasad theme-modern.css
 * Visual forms/effects match AMF (Yandex-style accordion).
 * Layout only: full .container width (no col-md-8 / max-width shrink).
 * AMF literal colors used so site industrial tokens do not restyle glyphs/borders.
 */

.section--faq .amf-faq {
  width: 100%;
}

.section--faq .amf-faq__item {
  background: #f2f3f5;
  border: none;
  border-radius: 18px;
  box-shadow: none;
  overflow: hidden;
}

.section--faq .amf-faq__item:hover {
  transform: none;
  box-shadow: none;
}

.section--faq .amf-faq__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: none;
  margin: 0;
}

.section--faq .amf-faq__trigger {
  width: 100%;
  margin: 0;
  padding: clamp(1.15rem, 1.35vw, 1.45rem) clamp(1.2rem, 1.45vw, 1.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.1rem;
  text-align: left;
  font: inherit;
  font-size: clamp(1.08rem, 1.12vw, 1.22rem);
  font-weight: 600;
  line-height: 1.35;
  color: #162434;
  background: transparent;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Без подсветки при hover/active — только :focus-visible для клавиатуры */
.section--faq .amf-faq__trigger:hover,
.section--faq .amf-faq__trigger:active {
  background: transparent;
  color: #162434;
}

.section--faq .amf-faq__trigger:focus-visible {
  outline: 2px solid #0f3d66;
  outline-offset: 2px;
}

.section--faq .amf-faq__question-text {
  flex: 1 1 auto;
  min-width: 0;
  color: #162434;
}

.section--faq .amf-faq__trigger:hover .amf-faq__question-text,
.section--faq .amf-faq__item--open .amf-faq__trigger .amf-faq__question-text {
  color: #162434;
}

/* Плюс → минус: переворот вокруг горизонтальной оси */
.section--faq .amf-faq__glyph {
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 12px;
  box-shadow: none;
  perspective: 700px;
}

.section--faq .amf-faq__glyph-flip {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: none;
  transition: transform 0.4s cubic-bezier(0.33, 1, 0.68, 1);
}

.section--faq .amf-faq__item--open .amf-faq__glyph-flip {
  transform: rotateX(180deg);
}

.section--faq .amf-faq__glyph-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.section--faq .amf-faq__glyph-face--minus {
  transform: rotateX(180deg);
}

.section--faq .amf-faq__glyph-face--plus::before,
.section--faq .amf-faq__glyph-face--plus::after,
.section--faq .amf-faq__glyph-face--minus::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: #2a2f36;
  border-radius: 1px;
}

.section--faq .amf-faq__glyph-face--plus::before,
.section--faq .amf-faq__glyph-face--minus::before {
  width: 1.1rem;
  height: 2px;
  transform: translate(-50%, -50%);
}

.section--faq .amf-faq__glyph-face--plus::after {
  width: 2px;
  height: 1.1rem;
  transform: translate(-50%, -50%);
}

.section--faq .amf-faq__panel {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 0.48s cubic-bezier(0.33, 1, 0.68, 1);
}

.section--faq .amf-faq__item--open .amf-faq__panel {
  grid-template-rows: 1fr;
}

.section--faq .amf-faq__panel-clip {
  min-height: 0;
  overflow: hidden;
}

.section--faq .amf-faq__body {
  padding: 0 clamp(1.2rem, 1.45vw, 1.5rem) clamp(1.1rem, 1.35vw, 1.4rem);
}

.section--faq .amf-faq__body p {
  margin: 0;
  max-width: none; /* layout: override site .section p max-width for full container */
  color: #162434;
  font-size: clamp(1rem, 1.05vw, 1.1rem);
  line-height: 1.65;
}

.section--faq .amf-faq__body p + p {
  margin-top: 0.65rem;
}

.section--faq .amf-faq__body a {
  color: #0f3d66;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

@media (prefers-reduced-motion: reduce) {
  .section--faq .amf-faq__panel {
    transition-duration: 0.01ms;
  }

  .section--faq .amf-faq__glyph-flip {
    transition-duration: 0.01ms;
  }
}
