/* FAQ Schema 2.0 Frontend Styles */

/* -----------------------------------------------------------------------------
   Base (mobile, and any single FAQ items left over from 1.x)
   Questions stack with their answer underneath, accordion-style.
   -------------------------------------------------------------------------- */

.faq-item {
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    display:grid;
    grid-template-columns: auto 35px;
    gap:30px;
    cursor:pointer;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #000;
    user-select: none;
    font-weight: 500;
    line-height: 1.5;
}

.faq-question:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
    border-radius: 4px;
}

.faq-question:after {
    content: url("data:image/svg+xml,%3Csvg width='35' height='35' viewBox='0 0 35 35' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.11328 17.6523L25.0583 17.6523' stroke='white' stroke-linecap='round'/%3E%3Cpath d='M17.0859 9.67969V25.6247' stroke='white' stroke-linecap='round'/%3E%3Ccircle cx='17.084' cy='17.084' r='16.584' stroke='white'/%3E%3C/svg%3E%0A");
    height:35px;
}
.faq-question.active:after {
    content: url("data:image/svg+xml,%3Csvg width='35' height='35' viewBox='0 0 35 35' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.11328 17.6523L25.0583 17.6523' stroke='white' stroke-linecap='round'/%3E%3Ccircle cx='17.084' cy='17.084' r='16.584' stroke='white'/%3E%3C/svg%3E%0A");
}

/* Answer slides open/closed (animates to the answer's real height) */
.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
    transition: grid-template-rows 0.3s ease;
}

.faq-answer.open {
    grid-template-rows: 1fr;
}

.faq-answer > * {
    min-height: 0;
}

.faq-answer-text {
    margin: 0;
    color: #000;
    font-weight: 200;
    width:90%;
}
@media screen and (min-width:1000px){
    .faq-answer-text {
        width:75%;
    }
}

.faq-answer-text a {
    text-decoration: underline;
    transition: color 0.2s ease;
}

.faq-answer-text a:hover {
    text-decoration: underline;
}

/* -----------------------------------------------------------------------------
   FAQ Group — desktop 50/50 layout
   Questions down the left half; the selected answer in the right half.
   Clicking another question swaps the answer.

   The HTML (and so the Schema.org markup) is exactly the same as on mobile:
   each .faq-item still wraps its own question and answer. `display: contents`
   lets the question and answer join the group's grid without moving them.

   To change the breakpoint, edit the 1000px below (the script follows the CSS
   automatically).
   -------------------------------------------------------------------------- */

@media screen and (min-width:1000px){
    .faq-group {
        --faq-column-gap: 60px;
        --faq-question-spacing: 24px;

        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        /* one row per question, then a spare row that absorbs a long answer
           so the questions never get pushed apart */
        grid-template-rows: repeat(var(--faq-count, 1), auto) 1fr;
        column-gap: var(--faq-column-gap);
        align-items: start;
    }

    .faq-group .faq-item {
        display: contents;
    }

    .faq-group .faq-question {
        grid-column: 1;
        padding-bottom: var(--faq-question-spacing);
    }

    /* All answers share the right-hand cell; only the open one is visible.
       The column is as tall as the longest answer, so nothing jumps when
       switching between questions. */
    .faq-group .faq-answer {
        grid-column: 2;
        grid-row: 1 / -1;
        display: block;
        overflow: visible;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0s linear 0.3s;
    }

    .faq-group .faq-answer.open {
        opacity: 1;
        visibility: visible;
        transition: opacity 0.3s ease, visibility 0s linear 0s;
    }

    .faq-group .faq-answer-text {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .faq-answer,
    .faq-group .faq-answer,
    .faq-group .faq-answer.open {
        transition: none;
    }
}
