@charset "utf-8";

/* ==========================================================================
   Preguntas frecuentes (skill faqs-por-landing)
   Dos modos con el mismo acordeón: el bloque de FAQs de cada landing (faqs.xsl) y la landing de FAQs
   agrupadas (faqs-page.xsl). Solo se carga en las páginas que tienen preguntas.
   Diseño: cabecera a la izquierda (título manuscrito y texto) y acordeón a la derecha, como la maqueta de la tarea.
   ========================================================================== */

#faqsSec {
    /* Turquesa de la web oscurecido para el icono, los enlaces y los estados: el de la marca (#29b4b8)
       da 2,53:1 sobre blanco y no llega ni al 3:1 de un icono ni al 4,5:1 de un texto. Este da 4,76:1. */
    --faqs-accent: #1c7f82;
    padding-top: 80px;
    padding-bottom: 80px;
    background-color: #ffffff;
}

/* Landing de FAQs: el texto de introducción (only-text) ya deja su espacio encima */
#faqsSec.faqs-page {
    padding-top: 0;
}

/* En la home el bloque va tras la newsletter, cuyo cuadro sobresale 75px de su sección (.testimonials)
   desde 992px; en móvil no sobresale */
@media only screen and (min-width: 992px) {
    .testimonials ~ #faqsSec {
        padding-top: 155px;
    }
}

/* Índice de grupos (solo en la landing de FAQs) */
#faqsSec .faqs-index__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}
#faqsSec .faqs-index__link {
    display: inline-block;
    padding: 9px 20px;
    border: 1px solid #dcdcdc;
    border-radius: 30px;
    font-family: var(--font-style-text), sans-serif;
    font-size: 14px;
    color: var(--secondary-color);
    line-height: 20px;
    letter-spacing: 1px;
    text-decoration: none;
    transition: border-color .3s ease-in-out, color .3s ease-in-out;
}
#faqsSec .faqs-index__link:hover {
    border-color: var(--faqs-accent);
    color: var(--faqs-accent);
}
#faqsSec .faqs-index__link:focus-visible {
    outline: 2px solid var(--faqs-accent);
    outline-offset: 2px;
}

/* Grupo: cabecera a la izquierda y acordeón a la derecha */
#faqsSec .faqs {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    column-gap: 70px;
    align-items: start;
}
#faqsSec .faqs--no-header {
    grid-template-columns: minmax(0, 1fr);
}

/* En la landing, cada grupo deja el hueco con relleno y no con margen: así, al saltar a él desde el índice,
   el título queda por debajo de la barra de navegación fija (90px de alto) */
#faqsSec.faqs-page .faqs {
    padding-top: 110px;
}

#faqsSec .faqs__subtitle {
    margin: 0 0 10px 0;
    font-family: var(--font-style-text), sans-serif;
    font-size: 15px;
    color: var(--black-color);
    line-height: 22px;
    letter-spacing: 3px;
    text-transform: uppercase;
}
#faqsSec .faqs__title {
    margin: 0;
    font-family: var(--subtitle-font-family), serif;
    font-size: 38px;
    color: var(--secondary-color);
    font-weight: 600;
    line-height: 1.25em;
    text-wrap: balance;
}
#faqsSec .faqs__description {
    margin-top: 22px;
    font-family: var(--font-style-text), sans-serif;
    font-size: 15px;
    color: var(--black-color);
    line-height: 26px;
}
#faqsSec .faqs__description p {
    margin: 0 0 12px 0;
}
#faqsSec .faqs__description p:last-child {
    margin-bottom: 0;
}

/* Acordeón */
#faqsSec .faqs__list {
    border-top: 1px solid #e5e5e5;
}
#faqsSec .faqs__item {
    border-bottom: 1px solid #e5e5e5;
}
#faqsSec .faqs__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 24px;
    cursor: pointer;
    list-style: none;
}
#faqsSec .faqs__question::-webkit-details-marker {
    display: none;
}
#faqsSec .faqs__question:focus-visible {
    outline: 2px solid var(--faqs-accent);
    outline-offset: -2px;
}
#faqsSec .faqs__question-text {
    margin: 0;
    font-family: var(--font-style-text), sans-serif;
    font-size: 17px;
    color: var(--secondary-color);
    font-weight: 500;
    line-height: 26px;
    letter-spacing: normal;
    text-transform: none;
}

/* Icono +/×: dos barras dentro de un círculo; al abrir, el + gira y queda en ×.
   Mientras se cierra (faqs.js), el <details> sigue abierto con .is-closing y ya se ve como cerrado. */
#faqsSec .faqs__icon {
    position: relative;
    flex: none;
    box-sizing: border-box;
    width: 26px;
    height: 26px;
    border: 1px solid var(--faqs-accent);
    border-radius: 50%;
    transition: transform .3s ease-in-out, background-color .3s ease-in-out;
}
#faqsSec .faqs__icon:before,
#faqsSec .faqs__icon:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 1.5px;
    background-color: var(--faqs-accent);
    transform: translate(-50%, -50%);
    transition: background-color .3s ease-in-out;
}
#faqsSec .faqs__icon:after {
    transform: translate(-50%, -50%) rotate(90deg);
}
#faqsSec .faqs__question:hover .faqs__icon {
    background-color: var(--faqs-accent);
}
#faqsSec .faqs__question:hover .faqs__icon:before,
#faqsSec .faqs__question:hover .faqs__icon:after {
    background-color: #ffffff;
}
#faqsSec .faqs__item[open]:not(.is-closing) .faqs__icon {
    transform: rotate(45deg);
}

/* La respuesta no lleva relleno para que faqs.js pueda animar su altura desde 0; el relleno va dentro */
#faqsSec .faqs__answer-inner {
    padding: 0 74px 24px 24px;
}
#faqsSec .faqs__answer {
    font-family: var(--font-style-text), sans-serif;
    font-size: 15px;
    color: var(--black-color);
    line-height: 26px;
}
#faqsSec .faqs__answer p {
    margin: 0 0 12px 0;
}
#faqsSec .faqs__answer p:last-child {
    margin-bottom: 0;
}
#faqsSec .faqs__answer a,
#faqsSec .faqs__description a {
    color: var(--faqs-accent);
    text-decoration: underline;
    text-underline-position: under;
}

/* Sin animaciones si el usuario lo pide */
@media (prefers-reduced-motion: reduce) {
    #faqsSec .faqs-index__link,
    #faqsSec .faqs__icon,
    #faqsSec .faqs__icon:before,
    #faqsSec .faqs__icon:after {
        transition: none;
    }
}

/* Tablet / móvil */
@media only screen and (max-width: 991px) {
    #faqsSec {
        padding-top: 50px;
        padding-bottom: 50px;
    }
    #faqsSec.faqs-page {
        padding-top: 0;
    }
    #faqsSec .faqs-index__list {
        gap: 8px;
    }
    #faqsSec .faqs-index__link {
        padding: 12px 16px;
        font-size: 13px;
    }
    #faqsSec .faqs {
        display: block;
    }
    #faqsSec.faqs-page .faqs {
        padding-top: 90px;
    }
    #faqsSec .faqs__header {
        margin-bottom: 24px;
    }
    #faqsSec .faqs__title {
        font-size: 30px;
    }
    #faqsSec .faqs__description {
        margin-top: 14px;
    }
    #faqsSec .faqs__question {
        gap: 16px;
        padding: 16px 8px;
    }
    #faqsSec .faqs__question-text {
        font-size: 16px;
        line-height: 24px;
    }
    #faqsSec .faqs__answer-inner {
        padding: 0 8px 20px 8px;
    }
}
