/* modules/faq.css */

.faq-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

.faq-search-box input {
    width: 100%;
    max-width: 400px;
    padding: 12px 20px;
    border-radius: 25px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    font-size: 1rem;
}

.faq-search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.2);
}

.faq-category-title {
    margin: 2rem 0 1rem;
    color: var(--primary-color);
    font-size: 1.2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.faq-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.faq-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.faq-item.active {
    border-color: var(--primary-color);
    background: var(--bg-color-alt, #f8fafc);
}

/* Dark mode override for active item bg */
[data-theme="dark"] .faq-item.active {
    background: #1e293b;
}

.faq-question {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-color);
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--primary-color);
    transition: transform 0.3s ease;
    width: 24px;
    text-align: center;
    line-height: 24px;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
}

.faq-answer.open {
    max-height: 500px;
    /* Suficiente para textos largos */
}

.faq-answer-content {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
    border-top: 1px solid transparent;
}

.faq-item.active .faq-answer-content {
    border-top-color: var(--border-color);
    padding-top: 1rem;
}

.faq-answer-content ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.faq-answer-content li {
    margin-bottom: 0.5rem;
}

@media (max-width: 600px) {
    .faq-question {
        padding: 1rem;
        font-size: 1rem;
    }
}