/* ================= FAQ ================= */

.faq {
    padding-block: var(--gap-8);
    background: var(--color-surface);
}

.faq__container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.faq__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    text-align: center;

    margin-bottom: var(--gap-3);
}

.faq__title {
    margin: 0 0 var(--gap-2) 0;
    font-size: var(--fs-6);
    line-height: 1.2;
    font-weight: 900;
    color: var(--color-text);
}

.faq__lead {
    margin: 0;
    max-width: 70ch;
    font-size: var(--fs-3);
    line-height: var(--lh-body);
    color: var(--color-text);
    opacity: 0.9;
}

.faq__list {
    width: 100%;
    max-width: 1220px;
    display: flex;
    flex-direction: column;
    gap: var(--gap-2);
    margin: var(--gap-4) 0 0;
    padding: 0;
    list-style: none;
}

.faq__item {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.faq__question {
    width: 100%;
    text-align: right;
    padding: 1rem 3rem 1rem 1rem;
    font-family: inherit;
    font-size: var(--fs-3);
    line-height: var(--lh-body);
    font-weight: 900;
    color: var(--color-text);

    background: linear-gradient(
        180deg,
        rgba(36, 75, 129, 0.08) 0%,
        rgba(255, 255, 255, 1) 100%
    );

    border: 0;
    cursor: pointer;
    position: relative;

    transition:
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.faq__question:hover {
    box-shadow: 0 0 0 3px rgba(36, 75, 129, 0.12);
}

.faq__question:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.faq__icon {
    display: inline-block;
    position: absolute;
    right: 1rem;
    top: 50%;
    width: 1.25rem;
    height: 1.25rem;
    transform: translateY(-50%);
    z-index: 1;
    pointer-events: none;
}

.faq__icon::before,
.faq__icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 2px;
    background: var(--color-accent);
    border-radius: 2px;
    transition:
        transform 220ms ease,
        opacity 220ms ease;
    transform-origin: center;
}

/* horizontal line */
.faq__icon::before {
    transform: translate(-50%, -50%) scaleX(1);
}

/* vertical line */
.faq__icon::after {
    transform: translate(-50%, -50%) rotate(90deg) scaleX(1);
}

/* Open: plus -> minus */
.faq__question[aria-expanded="true"] .faq__icon::after {
    transform: translate(-50%, -50%) rotate(90deg) scaleX(0);
    opacity: 0;
}

/* .faq__question[aria-expanded="true"] {
    background: linear-gradient(
        180deg,
        rgba(218, 101, 36, 0.12) 0%,
        rgba(255, 255, 255, 1) 100%
    );
} */

.faq__answer-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    will-change: max-height;

    background: radial-gradient(
        120% 120% at 100% 0%,
        rgba(218, 101, 36, 0.08) 0%,
        rgba(255, 255, 255, 1) 70%
    );

    border-top: 1px dashed rgba(36, 75, 129, 0.25);
}

.faq__answer {
    padding: 0 1.25rem 1.25rem 1.25rem;
    font-size: var(--fs-2);
    line-height: var(--lh-body);
    color: var(--color-text);
}

.faq__actions {
    width: 100%;
    max-width: 980px;
    margin-top: var(--gap-4);
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-2);
    justify-content: center;
}

@media (max-width: 980px) {
    .faq__question {
        padding: 0.95rem 2.75rem 0.95rem 0.95rem;
        font-size: var(--fs-2);
    }
}
