/* ==========================================================================
   E.K.E. — extra-pages.css
   Styles for components added on top of the existing style.css:
   FAQ accordion, testimonials, route pages, ratgeber articles, legal pages.
   Reuses the same CSS variables (--black-base, --red, --hairline, etc.)
   defined in style.css — load this file AFTER style.css.
   MOBILE-FIRST, same convention as style.css: base rules are for phones,
   `@media (min-width: 900px)` adds the desktop layout.
   ========================================================================== */

/* ---------- FAQ accordion ---------- */
.faq {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 100px 5vw 120px;
  /* Full-bleed light background without disturbing the centered max-width
     content box — same trick as .services/.pricing in style.css. */
  box-shadow: 0 0 0 100vmax var(--surface-light);
  clip-path: inset(0 -100vmax);
}
/* Same faint grain as .services/.pricing in style.css — negative z-index,
   see the comment on .pricing::before there for why. */
.faq::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.025;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
/* Diagonal red band marking the FAQ -> Footer transition (the second of
   the two accents — see .pricing::after in style.css for the first and the
   reasoning). Mirrored diagonal direction and sits at the bottom edge. */
.faq::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 32px;
  background: var(--red);
  opacity: 0.5;
  clip-path: polygon(0 30%, 100% 0, 100% 70%, 0 100%);
  pointer-events: none;
}
.faq .section-head { max-width: 640px; margin-bottom: 56px; }
.faq .section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }

.faq-item {
  border-top: 1px solid var(--hairline);
}
.faq-item:last-child { border-bottom: 1px solid var(--hairline); }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: none;
  border: none;
  color: var(--off-white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  text-align: left;
  padding: 26px 4px;
  cursor: pointer;
}
.faq-question .icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.25s ease, background 0.2s ease;
}
.faq-question .icon::before,
.faq-question .icon::after {
  content: "";
  position: absolute;
  background: var(--off-white);
}
.faq-question .icon::before { width: 10px; height: 1.6px; }
.faq-question .icon::after { width: 1.6px; height: 10px; transition: transform 0.25s ease; }
.faq-item.is-open .faq-question .icon { background: var(--red); border-color: var(--red); }
.faq-item.is-open .faq-question .icon::after { transform: scaleY(0); }

/* max-height is set inline by script.js from the answer's real scrollHeight
   (not a hardcoded guess), so this always matches the actual content height
   — no clipping on long answers, no dead space animated on short ones. */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-answer p {
  color: var(--silver);
  font-size: 0.98rem;
  line-height: 1.65;
  padding: 0 4px 26px;
  max-width: 68ch;
}

/* FAQPage JSON-LD lives in the <head> of the page — see comment in index.html */

/* ---------- Testimonials ---------- */
.testimonials {
  background: var(--black-panel);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 100px 0 110px;
}
.testimonials .section-head {
  max-width: var(--container);
  margin: 0 auto 56px;
  padding: 0 5vw;
}
.testimonial-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 5vw;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.testimonial-card {
  min-width: 0;
  background: var(--black-base);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 20px 44px -26px rgba(20, 22, 26, 0.16);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 52px -24px rgba(20, 22, 26, 0.22);
}
.testimonial-quote {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--off-white);
}
.testimonial-quote::before { content: "\201C"; color: var(--red); font-weight: 800; }
.testimonial-quote::after { content: "\201D"; color: var(--red); font-weight: 800; }
.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.85rem;
}
.testimonial-author strong { font-family: var(--font-display); font-weight: 700; }
.testimonial-author span { color: var(--silver-dim); }

/* Asymmetric instead of the generic "3 equal cards in a row" pattern: the
   real quote gets visual weight (spans both rows), the trust-numbers panel
   fills the second column beside it. */
@media (min-width: 900px) {
  .testimonial-grid {
    grid-template-columns: 1.6fr 1fr;
    grid-template-rows: repeat(2, 1fr);
    gap: 24px;
  }
  .testimonial-card {
    grid-row: 1 / 3;
    padding: 40px 36px;
  }
  .testimonial-card .testimonial-quote {
    font-size: 1.15rem;
  }
}

/* .trust-numbers reused here as the second grid cell (real, verifiable
   numbers instead of empty "quote coming soon" placeholder cards) — this
   overrides its standalone full-width section styling (see further below)
   to fit as one bordered panel matching the testimonial card's treatment. */
.testimonial-grid .trust-numbers {
  max-width: none;
  margin: 0;
  padding: 32px 28px;
  background: var(--surface-light);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  grid-template-columns: 1fr;
  gap: 24px;
  align-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.testimonial-grid .trust-numbers:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 52px -24px rgba(20, 22, 26, 0.16);
}
.testimonial-grid .trust-number:not(:last-child) {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--hairline);
}

/* ---------- Trust numbers strip (reuses .stat pattern from hero) ---------- */
.trust-numbers {
  max-width: var(--container);
  margin: 0 auto;
  padding: 70px 5vw;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  text-align: center;
}
.trust-number .value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--red);
}
.trust-number .label {
  color: var(--silver);
  font-size: 0.9rem;
  margin-top: 6px;
}
@media (min-width: 900px) {
  .trust-numbers { grid-template-columns: repeat(3, 1fr); gap: 40px; }
}

/* ---------- Sub-page hero (route pages, ratgeber, legal) ---------- */
.subpage-hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: 120px 6vw 30px;
}
@media (min-width: 900px) {
  .subpage-hero { padding: 150px 5vw 40px; }
}
.subpage-hero .breadcrumb {
  font-size: 0.85rem;
  color: var(--silver-dim);
  margin-bottom: 18px;
}
.subpage-hero .breadcrumb a:hover { color: var(--red); }
.subpage-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  max-width: 20ch;
  /* Long unbroken German compound words (e.g. "Geschäftsbedingungen" on
     agb.html) can exceed the viewport width on narrow phones with no
     natural break point otherwise, causing a few px of horizontal
     scroll. */
  overflow-wrap: break-word;
}
.subpage-hero .lede {
  color: var(--silver);
  font-size: 1.05rem;
  max-width: 62ch;
  margin-top: 20px;
}

/* ---------- Route page specific ---------- */
.route-facts {
  max-width: var(--container);
  margin: 40px auto 0;
  padding: 0 5vw;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  overflow: hidden;
}
.route-fact {
  background: var(--black-panel);
  padding: 26px 24px;
}
.route-fact .label { font-size: 0.8rem; color: var(--silver-dim); margin-bottom: 6px; }
.route-fact .value { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
@media (min-width: 900px) { .route-facts { grid-template-columns: repeat(3, 1fr); } }

.route-body {
  max-width: 760px;
  margin: 56px auto 0;
  padding: 0 5vw 100px;
}
.route-body p {
  color: var(--silver);
  font-size: 1.02rem;
  line-height: 1.7;
  margin-bottom: 22px;
}
.route-body h2 {
  font-size: 1.4rem;
  margin: 40px 0 16px;
}

/* ---------- Ratgeber article ---------- */
.article-body {
  max-width: 720px;
  margin: 56px auto 0;
  padding: 0 5vw 110px;
}
.article-body p {
  color: var(--silver);
  font-size: 1.03rem;
  line-height: 1.75;
  margin-bottom: 24px;
}
.article-body h2 {
  font-size: 1.5rem;
  margin: 44px 0 16px;
}
.article-body ul {
  margin-bottom: 24px;
}
.article-body li {
  color: var(--off-white);
  opacity: 0.9;
  font-size: 1rem;
  line-height: 1.6;
  padding-left: 22px;
  position: relative;
  margin-bottom: 10px;
}
.article-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
}

/* ---------- Legal pages (Impressum / Datenschutz) ---------- */
.legal-body {
  max-width: 760px;
  margin: 40px auto 0;
  padding: 0 5vw 120px;
}
.legal-body h2 {
  font-size: 1.25rem;
  margin: 38px 0 12px;
}
.legal-body p, .legal-body li {
  color: var(--silver);
  font-size: 0.97rem;
  line-height: 1.7;
  margin-bottom: 14px;
}
.legal-body a { color: var(--red); }
.legal-body a:hover { text-decoration: underline; }
.legal-body .placeholder {
  background: rgba(200,30,44,0.12);
  border: 1px dashed var(--red);
  border-radius: 8px;
  padding: 2px 8px;
  color: var(--off-white);
  font-style: normal;
}

/* ---------- Simple content nav back to home (used on all sub-pages) ---------- */
.subpage-back {
  max-width: var(--container);
  margin: 0 auto;
  padding: 100px 5vw 0;
}
