/* Shared FAQ: the existing Referenzen layout, reused on Home and Lösungen. */
.ev2-faq {
  position: relative;
  --g: var(--ogency-base);
  --g-rgb: var(--ogency-base-rgb);
  --ink: #050506;
  --ink2: #111214;
  --line: rgba(var(--ogency-white-rgb), .12);
  --line-strong: rgba(var(--ogency-white-rgb), .22);
  --muted: rgba(var(--ogency-white-rgb), .72);
  --ease: cubic-bezier(.22, 1, .36, 1);
  color: var(--ogency-white);
}

/* FAQ --------------------------------------------------------------------- */
.ev2-faq {
  padding: clamp(100px, 12vw, 160px) 0;
  border-top: 1px solid var(--line);
  background: var(--ink);
}

/* FAQ mit Foto-Hintergrund (Lösungen): Bild unscharf, abgedunkelt, mit Akzent-Schimmer.
   Stärke des Weichzeichners über --faq-blur anpassen. overflow: clip, damit die Karte sticky bleibt. */
.ev2-faq--photo {
  --faq-blur: 18px;
  isolation: isolate;
  overflow: clip;
}

.ev2-faq--photo::before {
  content: "";
  position: absolute;
  inset: -48px;
  z-index: -2;
  background: url("../images/backgrounds/faq-loesungen-1400.webp") center / cover no-repeat;
  filter: blur(var(--faq-blur)) saturate(.95);
  opacity: .9;
  pointer-events: none;
}

.ev2-faq--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(70% 60% at 88% 8%, rgba(var(--ogency-second-rgb), .16), transparent 70%),
    linear-gradient(90deg, rgba(5, 5, 6, 0) 0%, rgba(5, 5, 6, .3) 45%, rgba(5, 5, 6, .42) 100%),
    linear-gradient(180deg, rgba(5, 5, 6, .9) 0%, rgba(5, 5, 6, .46) 38%, rgba(5, 5, 6, .5) 62%, rgba(5, 5, 6, .92) 100%);
  pointer-events: none;
}

.ev2-faq--photo .ev2-faq__card {
  background: rgba(17, 18, 20, .72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

@media (max-width: 767px) {
  .ev2-faq--photo {
    --faq-blur: 14px;
  }

  .ev2-faq--photo::before {
    background-image: url("../images/backgrounds/faq-loesungen-760.webp");
  }

  .ev2-faq--photo::after {
    background:
      radial-gradient(70% 40% at 88% 4%, rgba(var(--ogency-second-rgb), .16), transparent 70%),
      linear-gradient(180deg, rgba(5, 5, 6, .86) 0%, rgba(5, 5, 6, .66) 40%, rgba(5, 5, 6, .66) 60%, rgba(5, 5, 6, .92) 100%);
  }
}

/* Keep the reference surface when the FAQ is a direct main section. */
#main-content > .ev2-faq {
  background: var(--ink);
}

.ev2-faq__grid {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  align-items: start;
  gap: 50px clamp(48px, 7vw, 110px);
}

.ev2-faq__title {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
}

.ev2-acc {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.ev2-faq__card {
  position: sticky;
  top: 120px;
  grid-column: 1;
  grid-row: 2;
  padding: 28px 28px 30px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--g);
  background: var(--ink2);
}

.ev2-faq__card-title {
  margin: 0 0 8px;
  color: var(--ogency-white);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
}

.ev2-faq__card p:not(.ev2-faq__card-title) {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.7;
}

.ev2-faq__card .ev2-link {
  display: table;
  margin-top: 20px;
}

.ev2-acc__item {
  border-bottom: 1px solid var(--line-strong);
}

.ev2-acc__item:first-child {
  border-top: 1px solid var(--line-strong);
}

.ev2-acc h3 {
  margin: 0;
}

.ev2-acc button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 26px 0;
  border: 0;
  background: transparent;
  color: var(--ogency-white);
  font: 700 clamp(18px, 1.6vw, 21px) / 1.4 var(--ogency-font);
  letter-spacing: -.015em;
  text-align: left;
  cursor: pointer;
  transition: color .3s ease;
}

.ev2-acc button:hover {
  color: var(--g);
}

.ev2-acc__icon {
  position: relative;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  transition: border-color .3s ease, background-color .3s ease;
}

.ev2-acc__icon::before,
.ev2-acc__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  margin: -1px 0 0 -6px;
  background: var(--g);
  transition: transform 500ms var(--ease);
}

.ev2-acc__icon::after {
  transform: rotate(90deg);
}

.ev2-acc button:hover .ev2-acc__icon,
.ev2-acc button:focus-visible .ev2-acc__icon {
  border-color: var(--g);
}

.ev2-acc button[aria-expanded="true"] .ev2-acc__icon {
  border-color: var(--g);
  background: rgba(var(--g-rgb), .12);
}

.ev2-acc button[aria-expanded="true"] .ev2-acc__icon::after {
  transform: rotate(0deg);
}

.ev2-acc__panel {
  display: grid;
  grid-template-rows: 1fr;
}

.ev2-acc__panel > div {
  min-height: 0;
  overflow: hidden;
}

.ev2-acc__panel p {
  max-width: 62ch;
  margin: 0;
  padding: 0 60px 28px 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.ev2-acc.is-live .ev2-acc__panel {
  transition: grid-template-rows 550ms var(--ease);
}

.ev2-acc.is-live .ev2-acc__item:not(.is-open) .ev2-acc__panel {
  grid-template-rows: 0fr;
}

.ev2-acc.is-live .ev2-acc__item:not(.is-open) .ev2-acc__panel > div {
  visibility: hidden;
  transition: visibility 0s linear 550ms;
}


.ev2-faq__title {
  max-width: 17ch;
  font-size: clamp(32px, 3.5vw, 52px);
  line-height: 1.06;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.ev2-faq__card .ev2-link {
  padding-bottom: 3px;
  border-bottom: 1px solid var(--g);
  color: var(--ogency-white);
  font-weight: 700;
  transition: color .3s ease;
  overflow-wrap: anywhere;
}

.ev2-faq__card .ev2-link:hover,
.ev2-faq__card .ev2-link:focus-visible {
  color: var(--g);
}

.ev2-acc button:focus-visible {
  outline: 2px solid var(--g);
  outline-offset: 4px;
}

.ev2-acc button:active {
  color: var(--g);
}

@media (max-width: 991px) {
  .ev2-faq__grid { grid-template-columns: minmax(0, 1fr); }
  .ev2-faq__title,
  .ev2-acc,
  .ev2-faq__card { grid-column: auto; grid-row: auto; }
  .ev2-faq__card { position: static; }
}

@media (max-width: 767px) {
  .ev2-faq { padding-top: 76px; padding-bottom: 76px; }
  .ev2-faq__title { font-size: clamp(28px, 8vw, 36px); }
  .ev2-acc button { padding: 20px 0; font-size: 17px; }
  .ev2-faq__grid { gap: 32px; }
  .ev2-acc__panel p { padding-right: 0; }
  .ev2-faq__card { padding: 24px 22px 26px; }
}


@media (prefers-reduced-motion: reduce) {
  .ev2-faq *,
  .ev2-faq *::before,
  .ev2-faq *::after {
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
  }
}
