/* =========================================
   SHARED CASE STUDY FAQ SECTION
   Override --faq-accent in your case study
   wrapper class to change the theme colour.
   ========================================= */

.cs-faq-section {
    background: #f2f2f2;
    padding: 90px 0 100px;
    position: relative;
}

.cs-faq-section .section-tag {
    text-transform: none;
}

.cs-faq-section::before,
.cs-faq-section::after {
    display: none;
}

/* Search bar */
.cs-faq-section .faq-search-wrap {
    position: relative;
    max-width: 420px;
    margin: 28px auto 48px;
}

.cs-faq-section .faq-search-wrap i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 0.85rem;
    pointer-events: none;
}

.cs-faq-section .faq-search {
    width: 100%;
    padding: 13px 20px 13px 44px;
    border: 1.5px solid #e0e0e0;
    border-radius: 50px;
    font-size: 0.92rem;
    color: #333;
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.cs-faq-section .faq-search::placeholder {
    color: #bbb;
}

.cs-faq-section .faq-search:focus {
    border-color: var(--faq-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--faq-accent) 8%, transparent);
}

/* FAQ list */
.cs-faq-section .faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* FAQ item card */
.cs-faq-section .faq-item {
    background: #ffffff;
    border: 1.5px solid #e8e8e8;
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
}

.cs-faq-section .faq-item::before,
.cs-faq-section .faq-item::after {
    display: none;
}

.cs-faq-section .faq-item:hover {
    box-shadow: 0 6px 24px color-mix(in srgb, var(--faq-accent) 8%, transparent);
    border-color: color-mix(in srgb, var(--faq-accent) 30%, transparent);
}

.cs-faq-section .faq-item.open {
    box-shadow: 0 8px 28px color-mix(in srgb, var(--faq-accent) 12%, transparent);
    border-color: color-mix(in srgb, var(--faq-accent) 45%, transparent);
}

/* Question button */
.cs-faq-section .faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.5;
    transition: none;
}

.cs-faq-section .faq-question::before {
    display: none;
    content: none;
}

.cs-faq-section .faq-item.open .faq-question {
    color: #1a1a1a;
}

.cs-faq-section .faq-item.open .faq-question::before {
    display: none;
}

/* + / × icon */
.cs-faq-section .faq-question i {
    flex-shrink: 0;
    font-size: 0.85rem;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1.5px solid #d5d5d5;
    color: #555;
    background: #fff;
    margin-left: auto;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
    box-shadow: none;
}

.cs-faq-section .faq-item.open .faq-question i {
    transform: rotate(45deg);
    background: var(--faq-accent);
    border-color: var(--faq-accent);
    color: #fff;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--faq-accent) 30%, transparent);
}

/* Answer */
.cs-faq-section .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

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

/* Detailed answer */
.cs-faq-section .faq-short-answer {
    margin: 0 24px 12px;
    padding: 0;
    background: transparent;
    border: none;
    font-weight: 400;
    color: #444;
    font-size: 0.93rem;
    line-height: 1.75;
}

.cs-faq-section .faq-detailed-answer {
    padding: 0 24px 26px;
}

.cs-faq-section .faq-detailed-answer p {
    font-size: 0.92rem;
    color: #666;
    line-height: 1.8;
    margin-bottom: 12px;
}

.cs-faq-section .faq-detailed-answer p:last-child {
    margin-bottom: 0;
}

.cs-faq-section .faq-detailed-answer ol {
    padding-left: 20px;
    margin: 8px 0 12px;
}

.cs-faq-section .faq-detailed-answer li {
    margin-bottom: 8px;
    line-height: 1.75;
    font-size: 0.92rem;
    color: #666;
}

/* No-results message */
.cs-faq-section .faq-no-results {
    text-align: center;
    color: #999;
    font-size: 0.95rem;
    padding: 32px 0;
    display: none;
}

@media (max-width: 768px) {
    .cs-faq-section .faq-question {
        padding: 18px;
        font-size: 0.95rem;
    }

    .cs-faq-section .faq-short-answer {
        margin: 0 18px 10px;
    }

    .cs-faq-section .faq-detailed-answer {
        padding: 0 18px 22px;
    }

    .cs-faq-section .faq-question i {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
}
