/* Sección «Preguntas frecuentes» (tema hijo) — prefijo exclusivo .rys-faq para no chocar con Elementor ni el tema. */
.rys-faq {
    --rys-faq-blue: #00329b;
    --rys-faq-navy: #0a1633;
    --rys-faq-closed: #f1f3f7;
    --rys-faq-ink: #111111;
    position: relative;
    isolation: isolate;
    background-color: var(--rys-faq-navy);
    background-image: var(--rys-faq-bg, none);
    background-size: cover;
    background-position: var(--rys-faq-pos, center);
    background-repeat: no-repeat;
    color: #ffffff;
    font-family: 'Chivo', 'Helvetica Neue', Arial, sans-serif;
    padding: clamp(64px, 8vw, 112px) 0;
    box-sizing: border-box;
    overflow: hidden;
}

/* Overlay azul oscuro: garantiza la legibilidad sobre cualquier foto. */
.rys-faq::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(rgba(0, 22, 74, 0.84), rgba(0, 22, 74, 0.84));
}

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

.rys-faq__inner {
    max-width: 848px; /* 800px de contenido + padding */
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Encabezado ---------- */
.rys-faq__header {
    margin-bottom: clamp(32px, 4vw, 48px);
    text-align: center;
}

.rys-faq .rys-faq__eyebrow {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.72);
}

.rys-faq .rys-faq__title {
    margin: 0 0 16px;
    padding: 0;
    font-family: inherit;
    font-size: clamp(30px, 4.4vw, 52px);
    font-weight: 900;
    line-height: 1.05;
    text-transform: uppercase;
    color: #ffffff;
}

.rys-faq .rys-faq__subtitle {
    margin: 0 auto;
    max-width: 520px;
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
}

/* ---------- Acordeón ---------- */
.rys-faq__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rys-faq__item {
    border-radius: 12px;
    background: var(--rys-faq-closed);
    color: var(--rys-faq-ink);
    overflow: hidden;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.rys-faq .rys-faq__q {
    margin: 0;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

.rys-faq .rys-faq__btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    margin: 0;
    padding: 20px 24px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    text-align: left;
    white-space: normal; /* el reset de Hello pone nowrap en los botones */
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.rys-faq .rys-faq__btn:hover { background: rgba(0, 50, 155, 0.06); color: inherit; }
.rys-faq .rys-faq__btn:focus { background: transparent; color: inherit; }

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

.rys-faq .rys-faq__btn > span { min-width: 0; overflow-wrap: anywhere; }

.rys-faq .rys-faq__chevron {
    display: block;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

/* Abierto: fondo oscuro, texto blanco, chevron hacia arriba. */
.rys-faq__item.is-open {
    background: var(--rys-faq-navy);
    color: #ffffff;
}

.rys-faq .rys-faq__item.is-open .rys-faq__btn:hover { background: rgba(255, 255, 255, 0.05); }
.rys-faq .rys-faq__item.is-open .rys-faq__btn:focus-visible { outline-color: #ffffff; }
.rys-faq .rys-faq__item.is-open .rys-faq__chevron { transform: rotate(180deg); }

/* Panel: grid 0fr → 1fr anima la altura real sin saltos ni medidas en JS. */
.rys-faq__panel {
    display: grid;
    grid-template-rows: 1fr;
}

.rys-faq.is-js .rys-faq__panel {
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows 0.3s ease, visibility 0s linear 0.3s;
}

.rys-faq.is-js .rys-faq__item.is-open .rys-faq__panel {
    grid-template-rows: 1fr;
    visibility: visible;
    transition: grid-template-rows 0.3s ease, visibility 0s linear 0s;
}

.rys-faq__panel-inner {
    min-height: 0;
    overflow: hidden;
}

.rys-faq .rys-faq__a {
    margin: 0;
    padding: 0 24px 22px;
    font-size: 15px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.84);
}

/* Sin JS el panel queda abierto sobre fondo claro: texto oscuro. */
.rys-faq:not(.is-js) .rys-faq__a { color: #3d4250; }

.rys-faq .rys-faq__a a {
    color: #ffffff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.rys-faq:not(.is-js) .rys-faq__a a { color: var(--rys-faq-blue); }
.rys-faq .rys-faq__a a:hover { color: #51bae7; }

/* ---------- Responsivo ---------- */
@media (max-width: 1024px) {
    .rys-faq__inner { max-width: 760px; }
}

@media (max-width: 767px) {
    .rys-faq {
        padding: 56px 0;
        background-position: var(--rys-faq-pos-m, center);
    }
    .rys-faq__inner { padding: 0 16px; }
    .rys-faq .rys-faq__subtitle { font-size: 15px; }
    .rys-faq__list { gap: 10px; }
    .rys-faq .rys-faq__btn { padding: 18px 18px; font-size: 15px; }
    .rys-faq .rys-faq__a { padding: 0 18px 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .rys-faq__item,
    .rys-faq .rys-faq__btn,
    .rys-faq .rys-faq__chevron,
    .rys-faq.is-js .rys-faq__panel,
    .rys-faq.is-js .rys-faq__item.is-open .rys-faq__panel { transition: none; }
}
