/* ========================================
   FAQ Component Styles
   Shared FAQ styling for all pages
   ======================================== */

.faq-section,
.faq,
.ai-faq {
    padding: 120px 0 60px 0;
    background: var(--white);
}

.faq h2,
.ai-faq h2 {
    font-size: var(--text-4xl);
    text-align: center;
    margin-bottom: 48px;
    color: var(--gray-900);
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--blue-500);
}

.faq-item.active {
    border-color: var(--blue-500);
    box-shadow: var(--elevation-brand-strong);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    cursor: pointer;
    background: var(--white);
    transition: background 0.3s ease;

    /* partials/faq.php renders this as a <button> so the accordion is reachable
       by keyboard. These undo the user agent's button styling so it looks
       exactly like the <div> it replaced. */
    width: 100%;
    border: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    text-align: left;
}

.faq-question:focus-visible {
    outline: 2px solid var(--blue-500);
    outline-offset: -2px;
}

.faq-question:hover {
    background: var(--gray-50);
}

.faq-question h3 {
    font-size: var(--text-md);
    color: var(--gray-900);
    margin: 0;
    font-weight: 600;
    padding-right: 16px;
}

.faq-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-round);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.faq-icon svg {
    width: 16px;
    height: 16px;
    color: var(--black);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
}

.faq-item.active .faq-icon svg {
    color: var(--white);
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-content {
    padding: 0 24px 24px;
    color: var(--black);
    font-size: var(--text-sm);
    line-height: 1.7;
}

.faq-answer-content p {
    margin: 0;
}

.faq-answer-content p + p {
    margin-top: 12px;
}

.faq-answer-content a {
    color: var(--blue-500);
    text-decoration: underline;
}

.faq-answer-content a:hover {
    color: var(--blue-700);
}

/* Responsive */
@media (max-width: 768px) {
    .faq-section,
    .faq,
    .ai-faq {
        padding: 80px 0;
    }

    .faq h2,
    .ai-faq h2 {
        font-size: var(--text-2xl);
        margin-bottom: 32px;
    }

    .faq-question {
        padding: 20px;
    }

    .faq-question h3 {
        font-size: var(--text-sm);
    }

    .faq-answer-content {
        padding: 0 20px 20px;
    }
}
