/* Custom CSS for FAQ Accordion (Simple Block) - Updated */

/* Main container for the whole FAQ section */
.faq-section-container {
    width: 100%;
    max-width: 1358px;
    /* From original main container */
    margin: 0 auto;
    font-family: 'Vazirmatn', var(--default-font-family), sans-serif;
    padding: 20px;
    /* Added some padding for better spacing */
    box-sizing: border-box;
}

/* Main title for the FAQ section */
.faq-main-title {
    font-family: 'Vazirmatn', var(--default-font-family), sans-serif;
    font-size: 48px;
    font-weight: 700;
    line-height: 59px;
    color: #152e39;
    text-align: center;
    margin-bottom: 40px;
    /* Original margin was 76px to first item, adjusted for overall section */
    /* display:flex, justify-content:center, align-items:center, position:relative, white-space:nowrap are for specific layout in original, text-align:center is simpler for an h2 */
}

/* Container for all FAQ items */
.faq-accordion-container {
    width: 100%;
}

/* Individual FAQ Item */
.faq-item {
    background-color: #ffffff;
    border: 2px solid rgba(21, 46, 57, 0.3);
    border-radius: 25px;
    margin-bottom: 24px;
    overflow: hidden;
}

.faq-item:last-child {
    margin-bottom: 0;
}

/* Question Button */
.faq-question {
    display: flex;
    /* justify-content: space-between; /* Let arrow icon and text handle spacing */
    align-items: center;
    width: 100%;
    padding: 24px;
    background-color: #ffffff;
    border: none;
    cursor: pointer;
    text-align: right;
    /* RTL */
    font-family: inherit;
    font-size: 32px;
    font-weight: 700;
    color: #152e39;
    position: relative;
}

.faq-question:hover,
.faq-question:focus {
    background-color: #f8f9fa;
}

/* Arrow Icon for each question */
.faq-arrow-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    margin-left: 15px;
    /* RTL: space between icon and text, adjust as needed */
    background-image: url('https://static.codia.ai/image/2025-03-23/d10dfa7a-1746-4213-a2f0-579c3471cefa.svg');
    background-position: center;
    background-size: cover;
    /* or contain, depending on icon aspect ratio */
    background-repeat: no-repeat;
    transition: transform 0.3s ease-in-out;
}

.faq-question[aria-expanded="true"] .faq-arrow-icon {
    transform: rotate(180deg);
    /* Rotate icon when expanded, or use a different icon */
}

.faq-question-text {
    flex-grow: 1;
    text-align: right;
    /* Ensure text is right-aligned within its container */
    /* If you need the mixed font-weight like "SD ACADEMY" being normal weight, */
    /* you'd need to wrap that part in another span and style it separately. */
    /* Example: <span class="faq-question-text">ماهي منصّة <span style="font-weight:400;">SD ACADEMY</span> ؟</span> */
}

/* Answer Panel */
.faq-answer {
    padding: 0 24px 24px 24px;
    background-color: #ffffff;
    font-size: 18px;
    line-height: 1.8;
    color: #333333;
    text-align: right;
    /* RTL */
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, padding-bottom 0.4s ease-in-out, opacity 0.3s ease-in-out 0.1s;
    max-height: 0;
    opacity: 0;
}

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

.faq-question[aria-expanded="true"]+.faq-answer {
    max-height: 1000px;
    opacity: 1;
    padding-bottom: 24px;
}

.faq-answer p {
    margin-top: 0;
    margin-bottom: 1em;
}

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

/* Focus outline for accessibility */
.faq-question:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}