/* ============================================================
   FAQs Page
   ============================================================ */


/* ---- SECCIÓN PRINCIPAL ---- */

.faqs-page {
    padding: var(--space-between-sections);
    background-color: var(--color-grey);
}


/* ---- MASTHEAD (título/descripción del bloque custom-faqs) ---- */

.faqs-page__masthead {
    padding-bottom: 40px;
}

.faqs-page__masthead-subtitle {
    display: block;
    font-family: var(--font-cursive-family);
    font-size: var(--font-subtitle-cursive-size);
    color: var(--color-primary);
    line-height: 1.3em;
    margin-bottom: 8px;
}

.faqs-page__masthead-title {
    font-family: var(--font-title-family);
    font-size: var(--font-title-size);
    font-weight: 400;
    color: var(--color-black);
    line-height: 1.2em;
    text-transform: uppercase;
    margin-bottom: 0;
}

.faqs-page__masthead-desc {
    margin-top: 16px;
    font-family: var(--font-text-family);
    font-size: var(--font-text-size);
    color: var(--color-black);
    opacity: 0.7;
    line-height: 1.75em;
}


/* ---- BOTÓN VER MÁS ---- */

.faqs-page__more {
    padding-top: 40px;
}



/* ---- GRUPO de FAQs ---- */

.faqs-group {
    margin-bottom: 48px;
}

.faqs-group:last-child {
    margin-bottom: 0;
}

.faqs-group.is-hidden {
    display: none;
}

.faqs-group__title {
    font-family: var(--font-title-family);
    font-size: var(--font-subtitle-size);
    font-weight: 400;
    color: var(--color-primary);
    line-height: 1.25em;
    margin-bottom: 0;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-primary);
}

.faqs-item__question:hover {
    background-color: transparent;
}


/* ---- ITEM FAQ ---- */

.faqs-item {
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.faqs-item:first-of-type {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* Fondo azul en hover y abierto */
.faqs-item {
    transition: background-color 0.2s ease;
}



/* ---- PREGUNTA (botón del acordeón) ---- */

.faqs-item__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    padding: 20px 16px;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    text-align: left;
    text-transform: unset;

}

.faqs-item__question:focus,
.faqs-item__question:focus-visible {
    outline: none;
}

.faqs-item__question-text {
    font-family: var(--font-text-family);
    font-size: var(--font-text-size);
    font-weight: 400;
    color: var(--color-black);
    line-height: 1.5;
    flex: 1;
}


/* ---- ICONO + que se transforma en — al abrir ---- */

.faqs-item__icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    position: relative;
    color: var(--color-black);
}

.faqs-item__icon-bar {
    display: block;
    position: absolute;
    background-color: currentColor;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.faqs-item__icon-bar--h {
    width: 16px;
    height: 1px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.faqs-item__icon-bar--v {
    width: 1px;
    height: 16px;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

.faqs-item__question.is-open .faqs-item__icon-bar--v {
    transform: translateX(-50%) rotate(90deg);
    opacity: 0;
}


/* ---- RESPUESTA (contenido del acordeón) ---- */

.faqs-item__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.faqs-item__answer.is-open {
    max-height: 400px;
    transition: max-height 0.4s cubic-bezier(0.55, 0.06, 0.75, 0.54);
}

.faqs-item__answer-inner {
    padding: 0 24px 22px 22px;
    font-family: var(--font-text-family);
    font-size: var(--font-text-size);
    font-weight: 400;
    color: var(--color-black);
    line-height: 1.75em;
}

.faqs-item__answer-inner p {
    margin-bottom: 12px;
    color: var(--color-black);
    font-size: var(--font-text-size);
}

.faqs-item__answer-inner p:last-child {
    margin-bottom: 0;
}

.faqs-item__answer-inner a {
    color: var(--color-primary);
    text-decoration: underline;
}

.faqs-item__answer-inner a:hover {
    color: var(--color-primary-hover);
}


/* ============================================================
   RESPONSIVE ≤ 992px
   ============================================================ */

@media (max-width: 992px) {
    .faqs-page {
        padding-inline: unset;
    }

    .faqs-group {
        margin-bottom: 36px;
    }

    .faqs-group__title {
        font-size: 20px;
    }

    .faqs-item__question {
        padding: 16px 12px;
    }

    .faqs-item__answer-inner {
        padding: 0 12px 18px 12px;
    }

}


/* ============================================================
   Animaciones reducidas (accesibilidad)
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    .faqs-item::before,
    .faqs-item__question,
    .faqs-item__answer,
    .faqs-item__icon-bar {
        transition: none;
    }
}
