/* KS LP – FAQ Block Styles
 * @package KS_LP_Blocks
 */

/* ─── Section wrapper ─────────────────────────────────────────────────────── */
.kslp-faq-block {
    position: relative;
    padding: 80px 20px;
    box-sizing: border-box;
    overflow: hidden;
}

.kslp-faq-block--full {
    position: relative;
    left: auto !important;
    right: auto !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
}

/* ─── Inner container ─────────────────────────────────────────────────────── */
.kslp-faq-inner {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* ─── Header ──────────────────────────────────────────────────────────────── */
.kslp-faq-header {
    margin-bottom: 48px;
    text-align: center;
}

.kslp-faq-sub {
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 12px;
    margin-top: 0;
}

.kslp-faq-title {
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 16px;
    margin-top: 0;
}

.kslp-faq-desc {
    margin: 0;
    line-height: 1.7;
}

/* ─── FAQ list ────────────────────────────────────────────────────────────── */
.kslp-faq-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

/* ─── FAQ item ────────────────────────────────────────────────────────────── */
.kslp-faq-item {
    overflow: hidden;
    /* border-radius & border come from inline styles */
}

/* ─── Question row ────────────────────────────────────────────────────────── */
.kslp-faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    cursor: pointer;
    user-select: none;
    transition: filter 0.2s ease;
    gap: 12px;
}

.kslp-faq-question:hover {
    filter: brightness(1.08);
}

.kslp-faq-question-text {
    flex: 1;
    font-weight: 600;
    line-height: 1.4;
}

.kslp-faq-question-icon {
    font-size: 20px;
    flex-shrink: 0;
    transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.kslp-faq-item.is-open .kslp-faq-question-icon {
    transform: rotate(180deg);
}

/* ─── Answer panel ────────────────────────────────────────────────────────── */
.kslp-faq-answer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition:
        max-height 0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
        opacity    0.3s ease;
}

.kslp-faq-item.is-open .kslp-faq-answer {
    max-height: 2000px;
    opacity: 1;
}

.kslp-faq-answer-inner {
    padding: 20px 24px;
    line-height: 1.7;
    box-shadow: inset 0 -8px 12px -6px rgba(0, 0, 0, 0.15);
}

.kslp-faq-number {
    font-weight: 700;
    margin-right: 6px;
    opacity: 0.95;
}

/* ─── Editor Fixes ────────────────────────────────────────────────────────── */
.block-editor-block-list__layout [class^="components-"] {
    width: 100%;
}

/* ─── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .kslp-faq-question {
        padding: 12px 16px;
    }

    .kslp-faq-answer-inner {
        padding: 12px 16px;
    }

    .kslp-faq-question-icon {
        font-size: 16px;
    }
}

/* ─── Light Theme (Mockup Card Style) ─────────────────────────────────────── */
.kslp-faq-theme-light .kslp-faq-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.kslp-faq-theme-light .kslp-faq-item:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    border-color: #d1d5db;
}

.kslp-faq-theme-light .kslp-faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    gap: 14px;
    background: transparent;
    cursor: pointer;
    user-select: none;
    transition: filter 0.2s ease;
}

.kslp-faq-theme-light .kslp-faq-badge-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #e0ece4;
    color: #083e2f;
    font-weight: 800;
    font-size: 15px;
    padding: 6px 14px;
    border-radius: 10px;
    line-height: 1.2;
    flex-shrink: 0;
}

.kslp-faq-theme-light .kslp-faq-question-text {
    flex: 1;
    color: #0f261e;
    font-weight: 700;
    line-height: 1.4;
}

.kslp-faq-theme-light .kslp-faq-toggle-circle {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 50%;
    background-color: #083e2f;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), background-color 0.2s ease;
}

.kslp-faq-theme-light .kslp-faq-item.is-open .kslp-faq-toggle-circle {
    transform: rotate(45deg);
}

.kslp-faq-theme-light .kslp-faq-answer-inner {
    background: transparent;
    color: #475569;
    padding: 0 24px 20px 24px;
    box-shadow: none;
    line-height: 1.7;
}

@media (max-width: 767px) {
    .kslp-faq-theme-light .kslp-faq-question {
        padding: 14px 16px;
        gap: 12px;
    }
    .kslp-faq-theme-light .kslp-faq-badge-num {
        font-size: 13px;
        padding: 5px 10px;
        border-radius: 8px;
    }
    .kslp-faq-theme-light .kslp-faq-toggle-circle {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }
    .kslp-faq-theme-light .kslp-faq-answer-inner {
        padding: 0 16px 16px 16px;
    }
}

