/* Smart FAQ Manager — Soft Pastel Theme for chieucaoviet.com */

.sfm-faq-section {
    margin: 50px 0 40px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.sfm-faq-title {
    font-size: 26px;
    font-weight: 600;
    margin: 0 0 30px;
    padding: 0;
    border-bottom: none;
    color: #5b8fa8;
    text-align: center;
    letter-spacing: -0.2px;
    position: relative;
}

.sfm-faq-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #a8d4e3, #c8e6f0);
    border-radius: 99px;
    margin: 14px auto 0;
}

/* Accordion Container */
.sfm-faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: none;
    border-radius: 0;
    overflow: visible;
    background: transparent;
}

/* FAQ Item - card mềm mại */
.sfm-faq-item {
    background: #fff;
    border: 1px solid #e8f1f5;
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(91, 143, 168, 0.03);
}

.sfm-faq-item:hover {
    border-color: #c8e0eb;
    box-shadow: 0 4px 14px rgba(91, 143, 168, 0.07);
}

.sfm-faq-item:last-child {
    border-bottom: 1px solid #e8f1f5;
}

.sfm-faq-item.open {
    border-color: #c8e0eb;
    box-shadow: 0 4px 16px rgba(91, 143, 168, 0.08);
}

/* Question Button */
.sfm-faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    text-align: left;
    padding: 20px 24px;
    background: #fff;
    border: none;
    cursor: pointer;
    font-size: 15.5px;
    font-weight: 500;
    color: #4a6675;
    line-height: 1.6;
    gap: 16px;
    transition: background 0.3s ease, color 0.3s ease;
    font-family: inherit;
}

.sfm-faq-question:hover {
    background: #fafdfe;
    color: #5b8fa8;
}

.sfm-faq-item.open .sfm-faq-question {
    background: #f4fafc;
    color: #5b8fa8;
    font-weight: 600;
}

/* Plus/Minus Icon - mềm mại */
.sfm-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #f0f7fa;
    flex-shrink: 0;
    position: relative;
    transition: background 0.3s ease, transform 0.3s ease;
}

.sfm-icon::before,
.sfm-icon::after {
    content: '';
    position: absolute;
    background: #8ab4c8;
    border-radius: 2px;
    transition: background 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

.sfm-icon::before {
    width: 11px;
    height: 2px;
}

.sfm-icon::after {
    width: 2px;
    height: 11px;
}

/* Open state */
.sfm-faq-item.open .sfm-icon {
    background: #a8d4e3;
    transform: rotate(45deg);
}

.sfm-faq-item.open .sfm-icon::before,
.sfm-faq-item.open .sfm-icon::after {
    background: #fff;
}

/* Hover effect on icon */
.sfm-faq-question:hover .sfm-icon {
    background: #e3f0f5;
}

.sfm-faq-item.open .sfm-faq-question:hover .sfm-icon {
    background: #95c5d8;
}

/* Answer */
.sfm-faq-answer {
    overflow: hidden;
}

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

.sfm-faq-answer-inner {
    padding: 18px 24px 22px;
    color: #6b7e89;
    font-size: 14.5px;
    line-height: 1.8;
    border-top: 1px solid #f0f5f7;
    background: #fbfdfe;
}

.sfm-faq-answer-inner p:first-child {
    margin-top: 0;
}

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

.sfm-faq-answer-inner p {
    margin: 10px 0;
}

.sfm-faq-answer-inner strong {
    color: #5b8fa8;
    font-weight: 600;
}

.sfm-faq-answer-inner a {
    color: #7aaec3;
    text-decoration: none;
    border-bottom: 1px solid rgba(122, 174, 195, 0.3);
    transition: all 0.25s ease;
}

.sfm-faq-answer-inner a:hover {
    color: #5b8fa8;
    border-bottom-color: #5b8fa8;
}

.sfm-faq-answer-inner ul,
.sfm-faq-answer-inner ol {
    margin: 10px 0;
    padding-left: 22px;
}

.sfm-faq-answer-inner li {
    margin: 6px 0;
}

/* Animation */
@keyframes sfm-slide-down {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sfm-faq-answer:not([hidden]) .sfm-faq-answer-inner {
    animation: sfm-slide-down 0.3s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .sfm-faq-section {
        margin: 35px 0 25px;
    }

    .sfm-faq-title {
        font-size: 21px;
        margin-bottom: 22px;
    }

    .sfm-faq-title::after {
        width: 40px;
        margin-top: 12px;
    }

    .sfm-faq-accordion {
        gap: 10px;
    }

    .sfm-faq-question {
        padding: 16px 18px;
        font-size: 14.5px;
        gap: 12px;
    }

    .sfm-icon {
        width: 26px;
        height: 26px;
    }

    .sfm-icon::before {
        width: 10px;
    }

    .sfm-icon::after {
        height: 10px;
    }

    .sfm-faq-answer-inner {
        padding: 15px 18px 18px;
        font-size: 14px;
        line-height: 1.75;
    }
}

@media (max-width: 480px) {
    .sfm-faq-title {
        font-size: 19px;
    }

    .sfm-faq-question {
        padding: 14px 16px;
        font-size: 14px;
    }

    .sfm-faq-answer-inner {
        padding: 14px 16px 16px;
        font-size: 13.5px;
    }
}

/* Disable dark mode override */
@media (prefers-color-scheme: dark) {
    .sfm-faq-item {
        background: #fff;
        border-color: #e8f1f5;
    }

    .sfm-faq-question {
        background: #fff;
        color: #4a6675;
    }

    .sfm-faq-question:hover {
        background: #fafdfe;
    }

    .sfm-faq-item.open .sfm-faq-question {
        background: #f4fafc;
        color: #5b8fa8;
    }

    .sfm-faq-answer-inner {
        color: #6b7e89;
        background: #fbfdfe;
        border-top-color: #f0f5f7;
    }

    .sfm-icon {
        background: #f0f7fa;
        border-color: transparent;
    }

    .sfm-icon::before,
    .sfm-icon::after {
        background: #8ab4c8;
    }

    .sfm-faq-item.open .sfm-icon {
        background: #a8d4e3;
    }

    .sfm-faq-item.open .sfm-icon::before,
    .sfm-faq-item.open .sfm-icon::after {
        background: #fff;
    }

    .sfm-faq-title {
        color: #5b8fa8;
    }
}
