/**
 * ExamBlaze Accordion Styles
 * FAQ accordion component with smooth animations
 *
 * @package ExamBlaze
 * @version 2.0
 * FIXED: Enhanced styling with smooth animations, better hover effects
 */

/* ========================================
   FAQ ACCORDION CONTAINER
   ======================================== */

.faq-accordion,
.faq-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
}

/* ========================================
   FAQ ACCORDION ITEMS
   ======================================== */

.faq-item {
    background: var(--bg-white);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-card);
    position: relative;
}

.faq-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(180deg, var(--primary-blue), var(--accent-gold));
    transform: scaleY(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top;
}

.faq-item:hover::before,
.faq-item.active::before {
    transform: scaleY(1);
}

.faq-item:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-blue);
    transform: translateX(8px);
}

.faq-item.active {
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.3);
    border-color: #f59e0b;
    transform: translateX(8px);
}

/* ========================================
   FAQ QUESTION (CLICKABLE HEADER)
   ======================================== */

.faq-question {
    width: 100%;
    background: var(--bg-white);
    border: none;
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    text-align: left;
    font-size: 18px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s ease;
    position: relative;
}

.faq-question::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(180deg, #0f766e, #f59e0b);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.faq-item.active .faq-question::before {
    opacity: 1;
}

.faq-question:hover {
    color: var(--primary-blue-light);
    background: rgba(255, 255, 255, 0.03);
}

.faq-item.active .faq-question {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.faq-question h3 {
    flex: 1;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
}

.faq-question span {
    flex: 1;
}

/* ========================================
   FAQ ICON (CHEVRON)
   ======================================== */

.faq-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(15, 118, 110, 0.1);
    transition: all 0.3s ease;
}

.faq-item.active .faq-icon {
    background: rgba(245, 158, 11, 0.15);
}

.faq-question i,
.faq-icon i {
    font-size: 16px;
    color: var(--primary-blue);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease;
    display: inline-block;
}

.faq-item.active .faq-question i,
.faq-item.active .faq-icon i {
    transform: rotate(180deg);
    color: #f59e0b;
}

/* ========================================
   FAQ ANSWER (COLLAPSIBLE CONTENT)
   ======================================== */

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    background: var(--bg-white);
}

.faq-item.active .faq-answer {
    max-height: 500px;
    opacity: 1;
    padding-bottom: 8px;
}

.faq-answer p {
    padding: 0 28px 20px 28px;
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

.faq-answer ul,
.faq-answer ol {
    padding: 0 28px 20px 48px;
    margin: 0;
    color: var(--text-muted);
    line-height: 1.7;
}

.faq-answer li {
    margin-bottom: 8px;
}

/* ========================================
   ALTERNATIVE FAQ STYLES
   ======================================== */

/* For sections with different color schemes */
.wgu-faq .faq-item,
.certifications-faq .faq-item,
.ged-faq .faq-item {
    background: var(--bg-white);
}

.wgu-faq .faq-item.active,
.certifications-faq .faq-item.active,
.ged-faq .faq-item.active {
    border-color: #f59e0b;
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */

@media (max-width: 1024px) {
    .faq-question {
        padding: 20px 24px;
        font-size: 17px;
    }

    .faq-question h3 {
        font-size: 17px;
    }

    .faq-answer p {
        padding: 0 24px 16px 24px;
        font-size: 15px;
    }

    .faq-icon {
        width: 30px;
        height: 30px;
    }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */

@media (max-width: 768px) {

    .faq-accordion,
    .faq-container {
        padding: 0 10px;
    }

    .faq-item {
        margin-bottom: 16px;
        border-radius: 10px;
    }

    .faq-question {
        padding: 18px 20px;
        font-size: 16px;
        gap: 16px;
    }

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

    .faq-question::before {
        width: 3px;
    }

    .faq-answer p {
        padding: 0 20px 16px 20px;
        font-size: 14px;
    }

    .faq-answer ul,
    .faq-answer ol {
        padding: 0 20px 16px 36px;
    }

    .faq-icon {
        width: 28px;
        height: 28px;
    }

    .faq-question i,
    .faq-icon i {
        font-size: 14px;
    }
}

/* ========================================
   RESPONSIVE - SMALL MOBILE
   ======================================== */

@media (max-width: 480px) {
    .faq-question {
        padding: 16px 18px;
        font-size: 15px;
    }

    .faq-question h3 {
        font-size: 15px;
    }

    .faq-answer p {
        padding: 0 18px 14px 18px;
        font-size: 14px;
    }

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