/**
 * Post-FAQ Styling
 *
 * Stylet die FAQ-Section (Klasse .section-faq) in Blog-Posts (z.B. Template 402092)
 * als 2-spaltiges Akkordeon im Mannheim-Style auf Basis des GB-Pro Accordion-Blocks.
 *
 * Conditional enqueued in functions.php nur wenn is_singular('post') UND
 * post_content "section-faq" enthält.
 */

/* Outer FAQ-Section (Klasse vom Template-Container 7fc9c2dd) */
.section-faq {
    padding: 60px 0;
    background: #fff;
    /* Auf Content-Breite (1280px) kappen und zentrieren, damit der FAQ-Block mit
       der 1280px-Content-Spalte / dem Header fluchtet. Nötig, weil ein
       wp:group{constrained} INNERHALB eines GB-isDynamic-Containers seine
       is-layout-constrained-Klasse verliert (GB-Bug) → der Inhalt würde sonst
       breiter laufen. Das umgebende full-width-Band liefert die seitlichen Gutter. */
    max-width: var(--wp--style--global--content-size, 1280px);
    margin-inline: auto;
}

.section-faq > h2 {
    margin: 0 0 40px;
    font-size: 32px;
    color: #1a2b49;
    font-weight: 400;
}

/* Die Post-Typografie (:is(.wp-block-post-content,.entry-content) h2:not(.gb-headline)
   → margin-top:3.5rem) überschrieb sonst das hier gewollte margin-top:0 und stapelte
   sich mit dem Section-Padding, sodass der FAQ-Titel deutlich mehr Abstand nach oben
   hatte als die übrigen Überschriften. Gleiche Spezifität (0,2,1), aber post-faq.css
   lädt nach style.css → diese Regel gewinnt und der Abstand passt sich an. */
:is(.wp-block-post-content, .entry-content) .section-faq > h2 { margin-top: 0; }

/* 2-Spalten-Grid auf dem äußeren Accordion-Container.
   align-items:start verhindert, dass benachbarte Items in derselben Row
   beim Öffnen mit-gestreckt werden. */
.section-faq .gb-accordion {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
    max-width: 1280px;
    margin: 0 auto;
}

/* Item-Card. .section-faq .gb-accordion__item hat Specificity 0,2,0 und schlägt
   GB-Pros 0,1,0 ".gb-container-XXX{margin-top:17px;margin-bottom:17px;...}". */
.section-faq .gb-accordion__item {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    margin: 0;
}

/* Toggle-Button (Frage). GB-Pro generiert per-Button .gb-button-XXX{padding:23px 30px}
   mit Specificity 0,1,1 (Element+Class), das schlagen 0,2,0 nicht — daher !important. */
.section-faq .gb-accordion__toggle {
    width: 100%;
    padding: 20px 24px !important;
    /* Kill the native <button> border. Blocks whose toggle attrs lack a border
       reset (e.g. NTLM, Datensicherheit) otherwise show the dark UA button
       border around each FAQ box ("schwarzer Rand"); blocks built from the cis
       template carry an inline border:0 and don't. This unifies all of them. */
    border: 0 !important;
    /* <button> does not inherit the page font by default; force it so the
       question font is identical on every FAQ, regardless of per-block attrs
       (some blocks carry an inline font-family:poppins that is not loaded). */
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #1a2b49;
    text-align: left;
    transition: background 0.2s ease;
}

.section-faq .gb-accordion__toggle:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* GB-Pro switched beim Open zwei SVG-Klassen: .gb-accordion__icon (closed)
   und .gb-accordion__icon-open (open). Wir geben nur Farbe. */
.section-faq .gb-accordion__icon,
.section-faq .gb-accordion__icon-open {
    color: #666;
}

/* Content-Wrapper: die äußere div mit Klasse .gb-accordion__content.
   GB-Pro setzt darauf transition:max-height 0.25s ease + max-height:0 (geschlossen)
   und auf .gb-accordion__item-open > .gb-accordion__content max-height:inherit.
   Wir mischen uns NICHT in die Animation ein — nur Typographie. */
.section-faq .gb-accordion__content {
    line-height: 1.7;
    color: #666;
    font-size: 14px;
}

/* Padding sitzt im echten Output auf der inneren .gb-container, nicht auf
   .gb-accordion__content. GB-Pro Default ist padding:2rem auf der inneren Klasse —
   wir überschreiben mit Mannheim-Werten. */
.section-faq .gb-accordion__content > .gb-container {
    padding: 12px 24px 20px !important;
}

.section-faq .gb-accordion__content p {
    margin: 0 0 8px;
}

.section-faq .gb-accordion__content p:last-child {
    margin-bottom: 0;
}

.section-faq .gb-accordion__content ul,
.section-faq .gb-accordion__content ol {
    margin: 8px 0 12px;
    padding-left: 22px;
}

.section-faq .gb-accordion__content li {
    margin-bottom: 4px;
    line-height: 1.6;
}

.section-faq .gb-accordion__content strong {
    color: #1a2b49;
}
