/* FAQ Section */
.faq-section {
    /* Default background will be var(--bg-primary) or var(--bg-secondary) based on nth-child in layout.css */
    text-align: center; /* Center the toggle button */
}
.faq-section h2 {
    text-align: center;
    margin-bottom: 1rem; /* Reduced margin to accommodate button */
}

#toggle-faq-visibility-btn {
    margin-bottom: 2rem; /* Space between button and FAQ items */
    display: inline-block; /* Allow centering */
}

#toggle-faq-visibility-btn.faq-open {
    display: none;
}

.faq-content-hidden {
    display: none;
}

.faq-content-shown {
    display: block; /* Or other appropriate display type */
    margin-top: 1.5rem; /* Add some space when shown */
}

.faq-item {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px var(--shadow-color-light);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

html[data-theme="dark"] .faq-item.active {
    box-shadow: 0 2px 4px var(--shadow-color), 0 0 15px var(--accent-main), 0 0 10px var(--card-glow-color);
}

.faq-item.active {
    box-shadow: 0 2px 4px var(--accent-main), 0 0 15px var(--accent-main), 0 0 10px var(--card-glow-color);
}

.faq-question {
    background-color: transparent;
    border: none;
    width: 100%;
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.faq-question:hover,
.faq-question:focus {
    color: var(--accent-secondary);
    outline: none;
}

.faq-icon {
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    transition: transform 0.3s ease;
    position: relative; /* For pseudo-elements */
}

.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    background-color: currentColor; /* Inherits color from .faq-question */
    border-radius: 1px;
    transition: transform 0.3s ease;
}

.faq-icon::before { /* Horizontal bar */
    width: 100%;
    height: 2px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}
.faq-icon::after { /* Vertical bar */
    width: 2px;
    height: 100%;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(135deg); 
}

.faq-answer {
    padding: 0 1.5rem; 
    color: var(--text-secondary);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-item.active .faq-answer {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.faq-actions-container {
    margin-top: 2.5rem; /* Space above the action buttons */
    padding-top: 1.5rem; /* Additional padding if needed */
    border-top: 1px solid var(--border-color); /* Separator line */
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center; /* Center buttons in the column */
}

.faq-actions-container .btn {
    min-width: 280px; /* Ensure buttons have a decent minimum width */
    text-align: center;
}

@media (min-width: 600px) {
    .faq-actions-container {
        flex-direction: row; /* Buttons side-by-side on larger screens */
        justify-content: center; /* Center buttons in the row */
    }
     .faq-actions-container .btn {
        min-width: auto; /* Reset min-width for row layout */
    }
}