/* Product FAQs Frontend Styles */

/* Main FAQs Section */
.product-faqs-section {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    clear: both;
    font-family: inherit;
}

/* Section Title */
.product-faqs-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
    color: #333;
    font-family: inherit;
}

/* Accordion Container */
.product-faqs-accordion {
    width: 100%;
    max-width: 100%;
}

/* Individual FAQ Item */
.faq-accordion-item {
    margin-bottom: 12px;
    border: 1px solid #94695A;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: all 0.3s ease;
}

.faq-accordion-item:hover {
    border-color: #7d5849;
}

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

/* FAQ Header (Question) */
.faq-accordion-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    background: #fff;
    transition: background-color 0.3s ease;
    position: relative;
    border-bottom: 1px solid transparent;
}

.faq-accordion-header:hover {
    background-color: #fafafa;
}

.faq-accordion-item.active .faq-accordion-header {
    border-bottom-color: #d4bfb8;
}

/* RTL Support */
[dir="rtl"] .faq-accordion-header,
body.rtl .faq-accordion-header {
    flex-direction: row-reverse;
    text-align: right;
}

/* Toggle Icon */
.faq-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 12px;
    font-size: 18px;
    font-weight: 400;
    color: #58382c;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    line-height: 1;
}

[dir="rtl"] .faq-toggle-icon,
body.rtl .faq-toggle-icon {
    margin-left: 0;
    margin-right: 12px;
}

.faq-accordion-item.active .faq-toggle-icon {
    transform: rotate(45deg);
    color: #58382c;
}

/* Question Text */
.faq-question {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: #58382c;
    flex: 1;
    line-height: 1.6;
}

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

/* Accordion Content (Answer) */
.faq-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #fff;
}

.faq-accordion-item.active .faq-accordion-content {
    max-height: 1000px;
}

/* Answer Text */
.faq-answer {
    padding: 0 20px 18px 52px;
    color: #000000;
    font-size: 17px;
    line-height: 1.8;
}

[dir="rtl"] .faq-answer,
body.rtl .faq-answer {
    padding: 0 52px 18px 20px;
    text-align: right;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .product-faqs-section {
        margin: 30px auto;
        padding: 0 15px;
    }
    
    .product-faqs-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .faq-accordion-header {
        padding: 14px 15px;
    }
    
    .faq-toggle-icon {
        margin-left: 10px;
        width: 18px;
        height: 18px;
        font-size: 16px;
    }
    
    [dir="rtl"] .faq-toggle-icon,
    body.rtl .faq-toggle-icon {
        margin-left: 0;
        margin-right: 10px;
    }
    
    .faq-question {
        font-size: 16pt;
    }
    
    .faq-answer {
        padding: 0 15px 15px 43px;
        font-size: 14pt;
    }
    
    [dir="rtl"] .faq-answer,
    body.rtl .faq-answer {
        padding: 0 43px 15px 15px;
    }
}

@media (max-width: 480px) {
    .product-faqs-section {
        padding: 0 10px;
    }
    
    .faq-question {
        font-size: 15pt;
    }
    
    .faq-answer {
        font-size: 13pt;
    }
}

/* Animation for smooth opening */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-accordion-item.active .faq-answer {
    animation: slideDown 0.3s ease;
}

/* Elessi Theme Compatibility */
.product-faqs-section * {
    box-sizing: border-box;
}

/* Ensure proper spacing in Elessi theme */
.woocommerce-tabs + .product-faqs-section,
.woocommerce-Tabs-panel + .product-faqs-section {
    margin-top: 50px;
}

/* Container adjustments for different screen sizes */
@media (min-width: 1400px) {
    .product-faqs-section {
        max-width: 1140px;
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .product-faqs-section {
        max-width: 1000px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .product-faqs-section {
        max-width: 900px;
    }
}
/* Question Text */
.faq-question {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: #58382c;
    flex: 1;
    line-height: 1.6;
}

/* Answer Text */
.faq-answer {
    padding: 0 20px 18px 52px;
    color: #000000;
    font-size: 17px;
    line-height: 1.8;
}

[dir="rtl"] .faq-answer,
body.rtl .faq-answer {
    padding: 0 52px 18px 20px;
    text-align: right;
}

/* إزالة البوردر تحت السؤال */
.faq-accordion-header {
    border-bottom: none !important;
}

.faq-accordion-item.active .faq-accordion-header {
    border-bottom: none !important;
}