/**
 * FAQ Accordion Component
 *
 * Migrated from: section-de-faq-other-pages code snippet.
 * 2-column grid with expand/collapse cards.
 *
 * @package Timelapse
 * @since 1.0.0
 */

/* ── Wrapper ── */
.tl-faq-preview {
    background-color: var(--tl-bg-base);
    color: var(--tl-white);
    font-family: var(--tl-font-primary);
    padding: var(--tl-space-2xl) var(--tl-space-lg);
    max-width: 1000px;
    margin: 0 auto;
}

/* ── Header ── */
.tl-faq-preview__header {
    margin-bottom: 30px;
    text-align: center;
}

.tl-faq-preview__title {
    font-family: var(--tl-font-primary);
    font-weight: var(--tl-weight-extrabold);
    text-transform: uppercase;
    font-size: 28px;
    color: var(--tl-white);
    margin: 0;
}

/* ── Grid ── */
.tl-faq-preview__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

/* ── Card ── */
.tl-faq-preview__card {
    background: var(--tl-gray-950);
    border: 1px solid var(--tl-surface);
    border-radius: var(--tl-radius-sm);
    overflow: hidden;
    transition: border-color var(--tl-duration-normal) ease;
}

.tl-faq-preview__card:hover {
    border-color: var(--tl-gray-800);
}

/* ── Trigger (Question) ── */
.tl-faq-preview__trigger {
    width: 100%;
    padding: 18px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    text-align: left;
    color: var(--tl-white);
    font-family: var(--tl-font-primary);
}

.tl-faq-preview__question {
    font-weight: var(--tl-weight-extrabold);
    text-transform: uppercase;
    font-size: 13px;
    line-height: var(--tl-leading-normal);
    flex: 1;
    padding-right: var(--tl-space-sm);
}

.tl-faq-preview__icon {
    flex-shrink: 0;
    position: relative;
    width: 18px;
    height: 18px;
}

.tl-faq-preview__icon::before,
.tl-faq-preview__icon::after {
    content: '';
    position: absolute;
    background: var(--tl-neon);
    transition: transform var(--tl-duration-normal) ease;
}

/* Horizontal bar */
.tl-faq-preview__icon::before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    transform: translateY(-50%);
}

/* Vertical bar (becomes minus on active) */
.tl-faq-preview__icon::after {
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    transform: translateX(-50%);
}

.tl-faq-preview__card.is-active .tl-faq-preview__icon::after {
    transform: translateX(-50%) rotate(90deg);
}

.tl-faq-preview__card.is-active .tl-faq-preview__trigger {
    background: var(--tl-gray-900);
}

/* ── Content (Answer) ── */
.tl-faq-preview__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--tl-duration-normal) ease-out,
                padding var(--tl-duration-normal) ease-out;
    padding: 0 20px;
}

.tl-faq-preview__answer {
    color: var(--tl-gray-300);
    font-size: var(--tl-text-small);
    line-height: var(--tl-leading-relaxed);
}

.tl-faq-preview__card.is-active .tl-faq-preview__content {
    padding: 20px;
    max-height: 300px;
    border-top: 1px solid var(--tl-gray-900);
}

/* ── CTA Button ── */
.tl-faq-preview__cta {
    text-align: center;
    margin-top: 10px;
}

.tl-faq-preview__btn {
    display: inline-block;
    background-color: var(--tl-neon);
    color: var(--tl-bg-base);
    font-family: var(--tl-font-primary);
    font-weight: var(--tl-weight-extrabold);
    text-transform: uppercase;
    padding: 14px 32px;
    border-radius: var(--tl-radius-pill);
    text-decoration: none;
    transition: var(--tl-transition-default);
    font-size: var(--tl-text-small);
    border: 2px solid var(--tl-neon);
}

.tl-faq-preview__btn:hover {
    background-color: transparent;
    color: var(--tl-white);
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .tl-faq-preview__grid {
        grid-template-columns: 1fr;
    }

    .tl-faq-preview__title {
        font-size: 22px;
    }

    .tl-faq-preview {
        padding: var(--tl-space-xl) var(--tl-space-md);
    }
}
