/**
 * FAQ Styles
 *
 * Styles for FAQ accordion and list display
 *
 * @package Estanar
 */

/* ==========================================================================
   FAQ Container
   ========================================================================== */

.estanar-faq-container {
    max-width: 900px;
    margin: 0 -16px;
}

/* ==========================================================================
   FAQ Item
   ========================================================================== */

.faq-item {
    background-color: #ffffff;
    border-radius: 0;
    margin-bottom: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.faq-item:first-child {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.faq-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.faq-item.active {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   FAQ Question (Button)
   ========================================================================== */

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background-color 0.2s ease;
}

.faq-question:hover {
    background-color: rgba(0, 0, 0, 0.01);
}

.faq-question-text {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.5;
    padding-right: 12px;
}

.faq-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #1a1a2e;
    transition: transform 0.3s ease;
}

.faq-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

/* ==========================================================================
   FAQ Answer
   ========================================================================== */

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-item.active .faq-answer {
    max-height: 1000px;
    transition: max-height 0.5s ease-in;
}

.faq-answer-content {
    padding: 0 20px 18px;
    font-size: 14px;
    color: #4a5568;
    line-height: 1.8;
}

.faq-answer-content p {
    margin-bottom: 16px;
}

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

.faq-answer-content a {
    color: #2563eb;
    text-decoration: underline;
}

.faq-answer-content a:hover {
    color: #1d4ed8;
}

.faq-answer-content strong {
    color: #1a1a2e;
}

.faq-answer-content ul,
.faq-answer-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

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

/* ==========================================================================
   List Style (Alternative)
   ========================================================================== */

.estanar-faq-container.style-list .faq-item {
    border-radius: 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0;
    box-shadow: none;
}

.estanar-faq-container.style-list .faq-item:first-child {
    border-top: 1px solid #e5e7eb;
}

.estanar-faq-container.style-list .faq-item:hover {
    box-shadow: none;
    background-color: rgba(0, 0, 0, 0.01);
}

.estanar-faq-container.style-list .faq-item.active {
    box-shadow: none;
}

/* ==========================================================================
   No FAQs Found
   ========================================================================== */

.no-faqs {
    text-align: center;
    padding: 40px;
    color: #6b7280;
    font-size: 16px;
}

/* ==========================================================================
   RTL Support (Arabic)
   ========================================================================== */

[dir="rtl"] .faq-question {
    text-align: right;
}

[dir="rtl"] .faq-question-text {
    padding-right: 0;
    padding-left: 24px;
}

[dir="rtl"] .faq-answer-content {
    text-align: right;
}

[dir="rtl"] .faq-answer-content ul,
[dir="rtl"] .faq-answer-content ol {
    padding-left: 0;
    padding-right: 24px;
}

/* ==========================================================================
   Dark Theme Support (for dark background sections)
   ========================================================================== */

.estanar-theme-dark .faq-item,
.assessment-faq .faq-item,
section[class*="dark"] .faq-item {
    background-color: #ffffff;
}

.estanar-theme-dark .faq-question-text,
.assessment-faq .faq-question-text,
section[class*="dark"] .faq-question-text {
    color: #1a1a2e;
}

.estanar-theme-dark .faq-icon,
.assessment-faq .faq-icon,
section[class*="dark"] .faq-icon {
    color: #1a1a2e;
}

.estanar-theme-dark .faq-answer-content,
.assessment-faq .faq-answer-content,
section[class*="dark"] .faq-answer-content {
    color: #4a5568;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (min-width: 576px) {
    .estanar-faq-container {
        margin: 0 auto;
    }

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

    .faq-item:first-child {
        border-top: none;
    }

    .faq-question {
        padding: 20px 24px;
    }

    .faq-question-text {
        font-size: 15px;
        padding-right: 16px;
    }

    .faq-answer-content {
        padding: 0 24px 20px;
    }
}

@media (min-width: 768px) {
    .faq-question {
        padding: 24px 32px;
    }

    .faq-question-text {
        font-size: 16px;
        padding-right: 24px;
    }

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

    .faq-icon svg {
        width: 24px;
        height: 24px;
    }

    .faq-answer-content {
        padding: 0 32px 24px;
        font-size: 15px;
    }
}
