/*
 * Faqs Normon IA - SEO
 * Colores muestreados de la imagen de referencia facilitada:
 * texto #303030, borde/iconos #1c9cd9, blanco #fff.
 * Hover solicitado: #0693e3 (sin subrayado).
 * Los ajustes en Gutenberg sobrescriben estas variables por bloque.
 */
.wp-block-mfaq-accordion.mfaq,
.mfaq {
    --mfaq-text: #303030;
    --mfaq-heading: #303030;
    --mfaq-accent: #1c9cd9;
    --mfaq-border: #1c9cd9;
    --mfaq-hover: #0693e3;
    --mfaq-background: #ffffff;
    --mfaq-card-background: #ffffff;
    --mfaq-font-title: "Arial Nova Cond", "Arial Narrow", Arial, sans-serif;
    --mfaq-font-body: "Arial Nova", Arial, sans-serif;

    position: relative;
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 1200px !important;
    margin: 36px auto;
    padding: 0;
    color: var(--mfaq-text);
    font-family: var(--mfaq-font-body);
    line-height: 1.5;
    overflow: visible;
}

/* El ancho máximo se mantiene también cuando el tema aplica alignwide/alignfull. */
.wp-block-mfaq-accordion.mfaq.alignwide,
.wp-block-mfaq-accordion.mfaq.alignfull {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.mfaq,
.mfaq *,
.mfaq *::before,
.mfaq *::after { box-sizing: border-box; }

.mfaq--solid { background-color: var(--mfaq-background); }
.mfaq--transparent { background-color: transparent; }
.mfaq--gradient {
    padding: clamp(20px, 3vw, 40px);
    border-radius: 38px;
    background-color: var(--mfaq-background);
    background-image: linear-gradient(90deg, #ffffff 20%, #edf8ff 80%);
}

.mfaq__intro {
    margin: 0 0 clamp(22px, 3vw, 38px);
}
.mfaq__title {
    margin: 0;
    padding: 0;
    color: var(--mfaq-heading);
    font-family: var(--mfaq-font-title);
    font-weight: 300;
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.25;
    letter-spacing: normal;
    text-align: left;
    text-transform: none;
}
.mfaq__title strong,
.mfaq__title b { font-weight: 700; }
.mfaq__description {
    margin-top: 14px;
    font-family: var(--mfaq-font-body);
    font-size: clamp(16px, 1.45vw, 19px);
    font-weight: 400;
    line-height: 1.5;
}
.mfaq__description p { margin: 0 0 12px; }
.mfaq__description p:last-child { margin-bottom: 0; }

/* Cada columna es independiente: al expandir, no se estira la columna vecina. */
.mfaq__columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0 36px;
}
.mfaq__column {
    display: grid;
    min-width: 0;
    align-content: start;
    gap: 32px;
}
.mfaq__item {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 1px solid var(--mfaq-border);
    border-radius: 999px;
    background: var(--mfaq-card-background);
    color: var(--mfaq-text);
    overflow: hidden;
    transition: border-color .18s ease;
}
.mfaq__item[open] { border-radius: clamp(26px, 3vw, 42px); }

.mfaq__question {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(14px, 2vw, 28px);
    width: 100%;
    min-height: 116px;
    margin: 0;
    padding: 26px 32px;
    border: 0;
    background: transparent;
    color: var(--mfaq-text);
    cursor: pointer;
    list-style: none;
    font-family: var(--mfaq-font-title);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: 0;
    text-align: left;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
}
.mfaq__question::-webkit-details-marker { display: none; }
.mfaq__question::marker { content: ""; }
.mfaq__question-text {
    display: block;
    flex: 1;
    min-width: 0;
    color: inherit;
    text-decoration: none !important;
    transition: color .18s ease;
}
.mfaq__question:hover,
.mfaq__question:hover .mfaq__question-text {
    color: var(--mfaq-hover);
    text-decoration: none !important;
}
.mfaq__question:hover .mfaq__toggle {
    color: var(--mfaq-hover);
    border-color: var(--mfaq-hover);
}
.mfaq__item:hover { border-color: var(--mfaq-hover); }
.mfaq__question:focus-visible {
    outline: 2px solid var(--mfaq-hover);
    outline-offset: -4px;
    border-radius: 999px;
}
.mfaq__item[open] .mfaq__question:focus-visible { border-radius: 40px; }

/* Chevron circular como el de la captura; gira al abrir la respuesta. */
.mfaq__toggle {
    position: relative;
    display: block;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border: 1px solid var(--mfaq-accent);
    border-radius: 50%;
    color: var(--mfaq-accent);
    transition: color .18s ease, border-color .18s ease;
}
.mfaq__toggle::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 13px;
    height: 13px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translate(-50%, -70%) rotate(45deg);
    transition: transform .18s ease;
}
.mfaq__item[open] .mfaq__toggle::after {
    transform: translate(-50%, -30%) rotate(225deg);
}

/* Respuestas con HTML seguro: párrafos, enlaces, listas, tablas, imágenes... */
.mfaq__answer {
    padding: 0 32px 30px;
    font-family: var(--mfaq-font-body);
    font-size: clamp(15px, 1.4vw, 18px);
    font-weight: 400;
    line-height: 1.55;
    color: var(--mfaq-text);
    overflow-wrap: anywhere;
}
.mfaq__answer p { margin: 0 0 14px; }
.mfaq__answer p:last-child { margin-bottom: 0; }
.mfaq__answer a { color: var(--mfaq-accent); text-decoration: underline; text-underline-offset: 2px; }
.mfaq__answer a:hover { color: var(--mfaq-hover); }
.mfaq__answer ul,
.mfaq__answer ol { margin: 0 0 16px 1.5em; padding: 0; }
.mfaq__answer li { margin: 0 0 6px; }
.mfaq__answer img { display: inline-block; max-width: 100%; height: auto; }
.mfaq__answer figure { max-width: 100%; margin: 0 0 16px; }
.mfaq__answer blockquote { margin: 14px 0; padding-left: 18px; border-left: 3px solid var(--mfaq-border); }
.mfaq__answer :is(h2, h3, h4, h5, h6) { margin: 16px 0 10px; color: var(--mfaq-heading); line-height: 1.3; }
.mfaq__answer :is(h2, h3, h4, h5, h6):first-child { margin-top: 0; }
.mfaq__answer table { display: block; width: 100%; max-width: 100%; border-collapse: collapse; overflow-x: auto; margin: 0 0 16px; }
.mfaq__answer th,
.mfaq__answer td { border: 1px solid #d4e9f3; padding: 8px 12px; text-align: left; }
.mfaq__answer pre { max-width: 100%; overflow-x: auto; }

@media (min-width: 1024px) {
    .mfaq--cols-2 .mfaq__columns {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
    .mfaq--cols-2 .mfaq__question {
        padding: 24px 26px;
        font-size: clamp(18px, 1.8vw, 22px);
        min-height: 106px;
    }
    .mfaq--cols-2 .mfaq__answer { padding: 0 26px 28px; }
}
@media (max-width: 1023px) {
    .mfaq__column + .mfaq__column { margin-top: 32px; }
}
@media (max-width: 600px) {
    .mfaq__column { gap: 20px; }
    .mfaq__column + .mfaq__column { margin-top: 20px; }
    .mfaq__question { min-height: 84px; padding: 18px 22px; font-size: 19px; }
    .mfaq__toggle { flex-basis: 34px; width: 34px; height: 34px; }
    .mfaq__toggle::after { width: 11px; height: 11px; }
    .mfaq__answer { padding: 0 22px 24px; }
}
@media (prefers-reduced-motion: reduce) {
    .mfaq__item,
    .mfaq__question-text,
    .mfaq__toggle,
    .mfaq__toggle::after { transition: none; }
}
