/* FAQ Accordion Block — Frontend Styles */

.wp-block-myblocks-faq-accordion.faq-section {
    position: relative;
    padding: 80px 40px;
    transition: background-color 0.3s ease;
}

/* ── INNER ─────────────────────────────────────────────── */
.faq-section .faq-inner {
    max-width: 780px;
    margin: 0 auto;
}

/* ── BADGE ─────────────────────────────────────────────── */
.faq-section .faq-badge-wrap {
    text-align: center;
    margin-bottom: 20px;
}

.faq-section .faq-badge {
    display: inline-block;
    background: #2AB591;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 7px 20px;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

/* ── HEADING ───────────────────────────────────────────── */
.faq-section .faq-heading {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    color: #1a202c;
    text-align: center;
    margin: 0 0 48px 0;
    letter-spacing: -0.02em;
}

.faq-section .faq-heading--light {
    color: #ffffff;
}

/* ── FAQ LIST ──────────────────────────────────────────── */
.faq-section .faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── FAQ ITEM ──────────────────────────────────────────── */
.faq-section .faq-item {
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.faq-section .faq-item:hover {
    border-color: #2AB591;
    box-shadow: 0 4px 20px rgba(42, 181, 145, 0.12);
}

.faq-section .faq-item--open {
    border-color: #2AB591;
    box-shadow: 0 4px 20px rgba(42, 181, 145, 0.12);
    background: linear-gradient(to bottom, rgba(42, 181, 145, 0.06), rgba(42, 181, 145, 0.02));
}

/* ── QUESTION BUTTON ───────────────────────────────────── */
.faq-section .faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease;
}

.faq-section .faq-question:hover {
    background: rgba(42, 181, 145, 0.04);
}

/* Number */
.faq-section .faq-num {
    font-size: 1rem;
    font-weight: 800;
    color: #1a202c;
    flex-shrink: 0;
    min-width: 32px;
    font-variant-numeric: tabular-nums;
}

/* Question text */
.faq-section .faq-question-text {
    flex: 1;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.4;
}

/* Icon circle */
.faq-section .faq-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #000000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #1a202c;
    transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.3s ease;
}

.faq-section .faq-icon svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

/* Open state icon */
.faq-section .faq-item--open .faq-icon {
    background: #2AB591;
    border-color: #2AB591;
    color: #ffffff;
}

.faq-section .faq-item--open .faq-icon svg {
    transform: rotate(180deg);
}

/* ── ANSWER ────────────────────────────────────────────── */
.faq-section .faq-answer {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
}

.faq-section .faq-item--open .faq-answer {
    max-height: 600px;
}

.faq-section .faq-answer[hidden] {
    display: block !important; /* override hidden so CSS animation works */
    max-height: 0;
}

.faq-section .faq-answer-inner {
    padding: 0 24px 22px calc(24px + 32px + 16px); /* indent under number */
    font-size: 0.95rem;
    line-height: 1.75;
    color: #4a5568;
}

/* ── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 768px) {
    .faq-section {
        padding: 60px 20px;
    }

    .faq-section .faq-question {
        padding: 18px 18px;
        gap: 12px;
    }

    .faq-section .faq-answer-inner {
        padding: 0 18px 18px 18px;
    }

    .faq-section .faq-heading {
        font-size: 1.8rem;
        margin-bottom: 32px;
    }
}
