/* =========================================================
   JUBAG Yoast FAQ Accordion
   Für Yoast SEO FAQ Block:
   .wp-block-yoast-faq-block
   .schema-faq-section
   .schema-faq-question
   .schema-faq-answer
========================================================= */

:root {
    --jubag-blue: #0878bd;
    --jubag-blue-dark: #005a95;
    --jubag-lime: #dbe100;
    --jubag-text: #1f2933;
    --jubag-muted: #5d6b78;
    --jubag-light: #f3f8fb;
    --jubag-white: #ffffff;
    --jubag-radius: 22px;
    --jubag-shadow: 0 14px 34px rgba(0, 90, 149, 0.12);
}

/* Wrapper */
.wp-block-yoast-faq-block,
.schema-faq {
    width: min(980px, 100%);
    margin: 36px auto;
    display: grid;
    gap: 16px;
}

/* Einzelne FAQ-Karte */
.wp-block-yoast-faq-block .schema-faq-section,
.schema-faq .schema-faq-section {
    position: relative;
    overflow: hidden;
    border-radius: var(--jubag-radius);
    background: var(--jubag-white);
    box-shadow: var(--jubag-shadow);
    border: 2px solid transparent;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.wp-block-yoast-faq-block .schema-faq-section:hover,
.schema-faq .schema-faq-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(0, 90, 149, 0.16);
}

/* Aktive offene Karte */
.wp-block-yoast-faq-block .schema-faq-section.is-open,
.schema-faq .schema-faq-section.is-open {
    border-color: rgba(219, 225, 0, 0.85);
}

/* Lime-Akzent links */
.wp-block-yoast-faq-block .schema-faq-section::before,
.schema-faq .schema-faq-section::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 7px;
    background: var(--jubag-lime);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.wp-block-yoast-faq-block .schema-faq-section.is-open::before,
.schema-faq .schema-faq-section.is-open::before {
    opacity: 1;
}

/* Frage wird per JS zu Button */
.jubag-faq-question-button {
    appearance: none;
    border: 0;
    background: transparent;
    width: 100%;
    min-height: 72px;
    padding: 22px 70px 22px 28px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    color: var(--jubag-blue);
    font-family: inherit;
    font-size: clamp(1.95rem, 1.5vw, 1.35rem);
    font-weight: 900;
    line-height: 1.25;
}

/* kleines # Icon */
.jubag-faq-question-button::before {
    content: "#";
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: var(--jubag-lime);
    color: var(--jubag-blue-dark);
    font-weight: 900;
    line-height: 1;
}

/* Plus/Minus Icon rechts */
.jubag-faq-question-button::after {
    content: "+";
    position: absolute;
    right: 24px;
    top: 50%;
    translate: 0 -50%;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: var(--jubag-blue);
    color: var(--jubag-white);
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.schema-faq-section.is-open .jubag-faq-question-button::after {
    content: "–";
    background: var(--jubag-lime);
    color: var(--jubag-blue-dark);
    transform: rotate(180deg);
}

/* Fokus für Barrierefreiheit */
.jubag-faq-question-button:focus-visible {
    outline: 4px solid rgba(219, 225, 0, 0.9);
    outline-offset: -6px;
    border-radius: var(--jubag-radius);
}

/* Antwort */
.wp-block-yoast-faq-block .schema-faq-answer,
.schema-faq .schema-faq-answer {
    margin: 0;
    padding: 0 28px 26px 78px;
    color: var(--jubag-text);
       font-size: 1.8rem;
    line-height: 1.7;
}

.wp-block-yoast-faq-block .schema-faq-answer p,
.schema-faq .schema-faq-answer p {
    margin-top: 0;
    margin-bottom: 1em;
}

.wp-block-yoast-faq-block .schema-faq-answer p:last-child,
.schema-faq .schema-faq-answer p:last-child {
    margin-bottom: 0;
}

.wp-block-yoast-faq-block .schema-faq-answer a,
.schema-faq .schema-faq-answer a {
    color: var(--jubag-blue);
    font-weight: 800;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

/* Hidden-Zustand über JS */
.schema-faq-section:not(.is-open) .schema-faq-answer {
    display: none;
}

/* Intro-Variante, falls du über dem FAQ eine Überschrift nutzt */
.jubag-faq-head {
    width: min(980px, 100%);
    margin: 56px auto 20px;
}

.jubag-faq-head .jubag-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--jubag-blue-dark);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.jubag-faq-head .jubag-kicker::before {
    content: "#";
    color: var(--jubag-lime);
    font-size: 1.4em;
}

.jubag-faq-head h2 {
    margin: 8px 0 12px;
    color: var(--jubag-blue);
    font-size: clamp(2rem, 3vw, 3.2rem);
    line-height: 1.05;
}

.jubag-faq-head p {
    max-width: 720px;
    color: var(--jubag-muted);
    font-size: 1.1rem;
    line-height: 1.65;
}

/* Mobile */
@media (max-width: 720px) {
    .wp-block-yoast-faq-block,
    .schema-faq {
        gap: 12px;
        margin: 28px auto;
    }

    .jubag-faq-question-button {
        min-height: 64px;
        padding: 18px 58px 18px 18px;
        gap: 10px;
    }

    .jubag-faq-question-button::before {
        width: 30px;
        height: 30px;
        font-size: 0.95rem;
    }

    .jubag-faq-question-button::after {
        right: 16px;
        width: 34px;
        height: 34px;
    }

    .wp-block-yoast-faq-block .schema-faq-answer,
    .schema-faq .schema-faq-answer {
        padding: 0 18px 22px 58px;
        font-size: 0.98rem;
    }
}