/* ==========================================================================
   Al Iman Quran Academy - Courses FAQ Accordion Section Widget CSS
   ========================================================================== */

.sbw-faq-section * {
    font-family: 'Philosopher', sans-serif;
    box-sizing: border-box;
}

.sbw-faq-section {
    position: relative;
    padding: 100px 0;
    background-color: #f7faf8;
    overflow: hidden;
}

.sbw-faq-container {
    position: relative;
    z-index: 5;
    max-width: 1320px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

.sbw-faq-row {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

/* Left Column: Info & Support Box */
.sbw-faq-left {
    flex: 1;
    position: sticky;
    top: 100px;
}

.sbw-faq-subtitle {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--sbw-primary, #058349);
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.sbw-faq-main-title {
    font-size: 40px;
    font-weight: 700;
    color: #1a2923;
    line-height: 1.2;
    margin: 0 0 16px 0;
}

.sbw-faq-main-title span {
    color: var(--sbw-primary, #058349);
}

.sbw-faq-desc {
    font-size: 16.5px;
    color: #55635d;
    line-height: 1.6;
    margin: 0 0 32px 0;
}

/* Support Help Card */
.sbw-faq-support-card {
    background-color: #091D17;
    color: #ffffff;
    border-radius: 20px;
    padding: 30px;
    border: 2px solid var(--sbw-secondary, #FFB606);
    box-shadow: 0 12px 30px rgba(9, 29, 23, 0.25);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sbw-faq-support-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--sbw-secondary, #FFB606);
    margin: 0;
}

.sbw-faq-support-desc {
    font-size: 14.5px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    margin: 0;
}

.sbw-faq-support-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 28px;
    background-color: var(--sbw-secondary, #FFB606);
    color: var(--sbw-dark, #222222);
    font-size: 14.5px;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    overflow: hidden;
    z-index: 1;
    transition: color 0.4s ease, box-shadow 0.4s ease, transform 0.3s ease;
    align-self: flex-start;
}

.sbw-faq-support-btn::before,
.sbw-faq-support-btn::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 51%;
    background-color: var(--sbw-primary, #058349);
    z-index: -1;
    transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

.sbw-faq-support-btn::before {
    left: 0;
    transform: translateX(-100%);
}

.sbw-faq-support-btn::after {
    right: 0;
    transform: translateX(100%);
}

.sbw-faq-support-btn:hover::before,
.sbw-faq-support-btn:hover::after {
    transform: translateX(0);
}

.sbw-faq-support-btn:hover {
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(5, 131, 73, 0.45);
}

.sbw-faq-support-btn .sbw-btn-text {
    position: relative;
    z-index: 2;
}

/* Right Column: Accordion List */
.sbw-faq-right {
    flex: 1.3;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sbw-faq-item {
    background-color: #ffffff;
    border: 1.5px solid rgba(5, 131, 73, 0.15);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.sbw-faq-item.active {
    border-color: var(--sbw-primary, #058349);
    box-shadow: 0 8px 24px rgba(5, 131, 73, 0.12);
}

.sbw-faq-question {
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    color: #1a2923;
    user-select: none;
    transition: color 0.3s ease;
}

.sbw-faq-item.active .sbw-faq-question {
    color: var(--sbw-primary, #058349);
}

/* Animated Plus (+) to Minus (−) Morphing Icon */
.sbw-faq-toggle-icon {
    position: relative;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: rgba(5, 131, 73, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.4s ease, transform 0.4s ease;
}

/* Horizontal Bar */
.sbw-faq-toggle-icon::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 2.5px;
    background-color: var(--sbw-primary, #058349);
    border-radius: 2px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s ease;
}

/* Vertical Bar (Makes Plus Icon) */
.sbw-faq-toggle-icon::after {
    content: '';
    position: absolute;
    width: 2.5px;
    height: 14px;
    background-color: var(--sbw-primary, #058349);
    border-radius: 2px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease, background-color 0.4s ease;
}

/* Active State: Vertical bar rotates 90deg and fades into Minus (-) */
.sbw-faq-item.active .sbw-faq-toggle-icon {
    background-color: var(--sbw-primary, #058349);
}

.sbw-faq-item.active .sbw-faq-toggle-icon::before {
    background-color: #ffffff;
    transform: rotate(180deg);
}

.sbw-faq-item.active .sbw-faq-toggle-icon::after {
    background-color: #ffffff;
    transform: rotate(90deg) scale(0);
    opacity: 0;
}

.sbw-faq-answer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease, padding 0.35s ease;
    padding: 0 24px;
    font-size: 15.5px;
    color: #55635d;
    line-height: 1.65;
}

.sbw-faq-item.active .sbw-faq-answer {
    max-height: 300px;
    opacity: 1;
    padding: 0 24px 22px 24px;
}

/* Responsive Queries */
@media (max-width: 991px) {
    .sbw-faq-row {
        flex-direction: column;
        gap: 40px;
    }
    .sbw-faq-left {
        position: static;
    }
}

@media (max-width: 576px) {
    .sbw-faq-section {
        padding: 70px 0;
    }
    .sbw-faq-main-title {
        font-size: 30px;
    }
    .sbw-faq-question {
        font-size: 16px;
        padding: 18px 18px;
    }
    .sbw-faq-answer {
        font-size: 14.5px;
    }
}
