/* ============================================================
   AI FAQ Builder — Built-in Frontend Styles
   Matches the design shown in the screenshot:
   - Left column: label + heading + still-questions + button
   - Right column: accordion cards with chevron/circle icon
   Colours driven by CSS variables set inline from ACF Options.
   ============================================================ */

/* ── Section wrapper ─────────────────────────────────────── */
.aifaq-section {
    background-color: var(--aifaq-bg, #ffffff);
    padding: 72px 24px;
    font-family: inherit;
}

.aifaq-inner {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 48px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
}

/* ── Left column ─────────────────────────────────────────── */
.aifaq-left {
    position: sticky;
    top: 32px;
}

.aifaq-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--aifaq-primary, #e91e63);
    margin-bottom: 12px;
}

.aifaq-heading {
    font-size: clamp(24px, 3vw, 38px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--aifaq-heading, #1a1a1a);
    margin: 0 0 16px;
}

.aifaq-sub {
    font-size: 15px;
    color: var(--aifaq-text, #374151);
    line-height: 1.6;
    margin-bottom: 24px;
}

.aifaq-still {
    font-size: 16px;
    font-weight: 600;
    color: var(--aifaq-heading, #1a1a1a);
    margin: 0 0 16px;
}

.aifaq-btn {
    display: inline-block;
    background-color: var(--aifaq-primary, #e91e63);
    color: var(--aifaq-btn-text, #ffffff);
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.aifaq-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    color: var(--aifaq-btn-text, #ffffff);
    text-decoration: none;
}

/* ── Right column: accordion ─────────────────────────────── */
.aifaq-right {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.aifaq-item {
    border: 1px solid var(--aifaq-border, #e5e7eb);
    border-radius: 10px;
    background: var(--aifaq-card-bg, #ffffff);
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.aifaq-item--open {
    border-color: var(--aifaq-primary, #e91e63);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* ── Question button ─────────────────────────────────────── */
.aifaq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: var(--aifaq-heading, #1a1a1a);
    text-align: left;
    gap: 16px;
    line-height: 1.4;
}

.aifaq-question:hover {
    color: var(--aifaq-primary, #e91e63);
}

/* ── Icon: circle with chevron ───────────────────────────── */
.aifaq-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--aifaq-border, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.25s ease;
    position: relative;
}

.aifaq-icon::after {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--aifaq-heading, #1a1a1a);
    border-bottom: 2px solid var(--aifaq-heading, #1a1a1a);
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform 0.25s ease, border-color 0.2s ease;
}

/* Open state icon */
.aifaq-item--open .aifaq-icon {
    background-color: var(--aifaq-primary, #e91e63);
    transform: rotate(180deg);
}

.aifaq-item--open .aifaq-icon::after {
    border-color: #ffffff;
}

/* ── Answer ──────────────────────────────────────────────── */
.aifaq-answer {
    overflow: hidden;
}

.aifaq-answer[hidden] {
    display: none;
}

.aifaq-answer-inner {
    padding: 0 20px 20px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--aifaq-text, #374151);
}

.aifaq-answer-inner p {
    margin: 0 0 12px;
}

.aifaq-answer-inner p:last-child {
    margin-bottom: 0;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
    .aifaq-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .aifaq-left {
        position: static;
        text-align: center;
    }

    .aifaq-section {
        padding: 48px 20px;
    }
}

@media (max-width: 480px) {
    .aifaq-question {
        font-size: 14px;
        padding: 14px 16px;
    }

    .aifaq-answer-inner {
        padding: 0 16px 16px;
    }
}
