/**
 * FAQ Accordion CSS
 * Styles for the FAQ accordion functionality
 */

/* FAQ Answer visibility - Non-destructive approach */
/* Only hide answers if they don't already have display styles */
.schema-faq-answer:not([style*="display"]) {
    display: none;
    transition: all 0.3s ease-in-out;
}

.schema-faq-answer.show {
    display: block !important;
}

.schema-faq-answer.hide {
    display: none !important;
}

/* Support for other FAQ formats */
.faq-answer:not([style*="display"]) {
    display: none;
    transition: all 0.3s ease-in-out;
}

.faq-answer.show {
    display: block !important;
}

.faq-answer.hide {
    display: none !important;
}

/* Support for WordPress FAQ blocks */
.wp-block-faq .wp-block-faq-item .wp-block-faq-answer:not([style*="display"]) {
    display: none;
    transition: all 0.3s ease-in-out;
}

.wp-block-faq .wp-block-faq-item .wp-block-faq-answer.show {
    display: block !important;
}

.wp-block-faq .wp-block-faq-item .wp-block-faq-answer.hide {
    display: none !important;
}

/* Also support the original faq structure */
.faq .answer.collapse {
    display: none;
}

.faq .answer.collapse.show {
    display: block;
}

.faq .answer.collapse.hide {
    display: none;
}

/* Smooth transitions for FAQ answers */
.faq .answer {
    transition: all 0.3s ease-in-out;
}

/* FAQ button styling - Non-destructive approach */
/* Only add accordion styles if not already styled */
.schema-faq-question:not(.accordion-disabled) {
    cursor: pointer;
    position: relative;
}

.schema-faq-question:not(.accordion-disabled):hover {
    text-decoration: none;
    color: inherit;
}

.schema-faq-question:not(.accordion-disabled):focus {
    outline: none;
    box-shadow: none;
}

/* Add plus/minus icon to questions only if not already present */
.schema-faq-question:not(.accordion-disabled):not([data-accordion-icon])::after {
    content: '+';
    position: absolute;
    right: -15px;
    top: 75%;
    transform: translateY(-50%);
    font-size: 20px;
    font-weight: bold;
    color: #c6007e;
    transition: transform 0.3s ease;
}

.schema-faq-question:not(.accordion-disabled).expanded:not([data-accordion-icon])::after {
    content: '−';
    transform: translateY(-50%) rotate(0deg);
}

/* Support for other FAQ question formats */
.faq-question:not(.accordion-disabled) {
    cursor: pointer;
    position: relative;
}

.faq-question:not(.accordion-disabled):not([data-accordion-icon])::after {
    content: '+';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    font-weight: bold;
    color: #c6007e;
    transition: transform 0.3s ease;
}

.faq-question:not(.accordion-disabled).expanded:not([data-accordion-icon])::after {
    content: '−';
    transform: translateY(-50%) rotate(0deg);
}

/* WordPress FAQ block support */
.wp-block-faq .wp-block-faq-item .wp-block-faq-question:not(.accordion-disabled) {
    cursor: pointer;
    position: relative;
}

.wp-block-faq .wp-block-faq-item .wp-block-faq-question:not(.accordion-disabled):not([data-accordion-icon])::after {
    content: '+';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    font-weight: bold;
    color: #c6007e;
    transition: transform 0.3s ease;
}

.wp-block-faq .wp-block-faq-item .wp-block-faq-question:not(.accordion-disabled).expanded:not([data-accordion-icon])::after {
    content: '−';
    transform: translateY(-50%) rotate(0deg);
}

/* Also support the original faq structure */
.faq .btn-readmore {
    text-align: left;
    width: 100%;
    border: none;
    background: transparent;
    padding: 15px 0;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.faq .btn-readmore:hover {
    text-decoration: none;
    color: inherit;
}

.faq .btn-readmore:focus {
    outline: none;
    box-shadow: none;
}

/* FAQ question styling */
.faq .question {
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0;
}

.faq .question:last-child {
    border-bottom: none;
}

/* FAQ answer styling */
.faq .answer {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

/* Yoast FAQ styling */


.schema-faq-section:last-child {
    border-bottom: none;
}

.schema-faq-answer {
    padding: 15px 0;
    border-bottom: 1px solid #c6007e;
    margin-top: 10px;
}

/* Circle icon positioning */
.faq .btn-readmore i.circle {
    margin-right: 10px;
    float: left;
}

/* Ensure proper spacing */
.faq .faq {
    margin-bottom: 0;
}

i.circle {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: none !important;
    
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .faq .btn-readmore {
        padding: 12px 0;
        font-size: 14px;
    }
    
    .faq .answer {
        padding: 12px 0;
    }
}
