/**
 * Woo FAQ Frontend Styles
 */

/* Grid layout */
.wew-faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    align-items: start;
}

/* Each FAQ item */
.wew-faq-item {
    background-color: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #E0E0E0;
}

/* Header (Question) */
.wew-faq-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    background-color: #1a3a6b;
    cursor: default;
    user-select: none;
}

/* Interactive header (when accordion is active) */
[data-accordion="yes"] .wew-faq-header {
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

[data-accordion="yes"] .wew-faq-header:hover {
    opacity: 0.92;
}

/* Question text */
.wew-faq-question {
    flex: 1;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.4;
    color: #ffffff;
}

/* Accordion arrow */
.wew-faq-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #ffffff;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
}

.wew-faq-item.wew-faq-open .wew-faq-arrow {
    transform: rotate(180deg);
}

/* Body (Answer) — Accordion: hidden by default */
.wew-faq-body {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #ffffff;
}

/* When open — large max-height to cover content */
.wew-faq-item.wew-faq-open>.wew-faq-body {
    max-height: 2000px;
}

.wew-faq-body-inner {
    padding: 20px;
}

.wew-faq-answer {
    font-size: 14px;
    line-height: 1.7;
    color: #555;
}

/* Normalizar contenido del WYSIWYG */
.wew-faq-answer p:last-child {
    margin-bottom: 0;
}

.wew-faq-answer ul,
.wew-faq-answer ol {
    padding-left: 20px;
    margin: 8px 0;
}

.wew-faq-answer a {
    color: inherit;
    text-decoration: underline;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .wew-faq-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .wew-faq-grid {
        grid-template-columns: 1fr;
    }
}