
/* FAQ Styles - General for all themes */

.faq-container {
    max-width: 800px; /* Constrain width of FAQ list */
    margin: 0 auto;
}

.faq-item {
    background-color: var(--card-bg); /* Use theme variable */
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden; /* Important for the accordion effect */
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm); /* Subtle shadow */
}

.faq-question {
    position: relative;
    padding: 18px 50px 18px 20px; /* Adjusted padding, leave space for icon */
    cursor: pointer;
    font-weight: 500; /* Slightly bolder */
    color: var(--text-primary); /* Use theme variable */
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease; /* Transition for hover/active */
    font-size: 1.05rem;
}

.faq-question h3 { /* Assuming h3 is inside .faq-question for the text */
    margin: 0; /* Reset margin if h3 is used directly */
    font-size: inherit; /* Inherit font size from .faq-question */
    font-weight: inherit; /* Inherit font weight */
    flex: 1; /* Allow text to take available space */
}


.faq-question .faq-toggle { /* The icon itself */
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
    color: var(--primary); /* Accent color for icon */
    font-size: 1rem; /* Adjust icon size */
}

.faq-question:hover {
    background-color: rgba(0,0,0,0.03); /* Subtle hover for light mode */
}
[data-theme="dark"] .faq-question:hover {
    background-color: rgba(255,255,255,0.03); /* Subtle hover for dark mode */
}


.faq-question.active {
    background-color: rgba(240, 129, 15, 0.05); /* Primary color with low opacity */
    /* border-bottom: 1px solid var(--border-color); /* If answer is visually distinct */
}
[data-theme="dark"] .faq-question.active {
     background-color: rgba(240, 129, 15, 0.1);
}


.faq-question.active .faq-toggle {
    transform: translateY(-50%) rotate(180deg); /* Rotate icon when active */
}


.faq-answer {
    background-color: var(--bg-primary); /* Slightly different background for answer if desired */
    overflow: hidden;
    /* display: block !important; /* This can break transitions if not careful */
    max-height: 0;
    transition: max-height 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), padding 0.35s cubic-bezier(0.25, 0.8, 0.25, 1); /* Smooth transition */
    color: var(--text-secondary); /* Use theme variable */
    padding: 0 20px; /* Padding applied when shown */
    font-size: 0.95rem;
    line-height: 1.6;
}
[data-theme="dark"] .faq-answer {
    background-color: var(--bg-secondary); /* Or a slightly lighter dark shade than card-bg */
}

.faq-answer.show {
    padding: 20px 20px; /* Apply padding when visible */
    max-height: 1000px; /* Arbitrary large value to accommodate content */
    /* border-top: 1px solid var(--border-color); /* Separator if needed */
}

.faq-answer p {
    margin-bottom: 10px;
}
.faq-answer p:last-child {
    margin-bottom: 0;
}

/* FAQ Section Styling (the .faq-section container) */
/* .faq-section is styled in style.css */
/*
.faq-section .section-heading h2 {
    color: var(--text-primary);
}
.faq-section .section-heading p {
    color: var(--text-secondary);
}
.faq-section .separator {
    background-color: var(--primary);
}
*/

/* Responsive adjustments for FAQ */
@media (max-width: 768px) {
    .faq-question {
        padding: 15px 40px 15px 15px;
        font-size: 1rem;
    }
    .faq-question .faq-toggle {
        right: 15px;
    }
    .faq-answer {
        padding: 0 15px; /* Adjust padding for shown state */
        font-size: 0.9rem;
    }
    .faq-answer.show {
        padding: 15px 15px;
    }
}
