/* ============================================================
   FaqCategoryCards.css — Estilos propios del widget FaqCategoryCards
   Bticino Mx · Sitefinity Renderer
   ============================================================

   Tarjetas de preguntas frecuentes por categoría, cada una desplegable. Nodos de Figma:
   4031:61522 (PC), 4031:61617 (tablet) y 4031:61712 (mobile).

   NO se declara font-family: la resuelve site.css reasignando --bs-body-font-family en :root.

   PC y tablet son iguales (imagen e ítems a la izquierda, preguntas a la derecha); solo cambia el
   relleno lateral. En mobile el cuerpo se apila en una columna. El color de acento llega como
   custom property desde la vista.

   Breakpoints del @media propio: mobile hasta 500px, tablet hasta 1024px, laptop hasta 1200px
   (hereda desktop), desktop de 1201px en adelante sin @media.
   ============================================================ */

.FaqCategoryCards {
    --FaqCategoryCards-accent: #429cde; /* Respaldo; la vista lo reemplaza con el color elegido. */
    width: 100%;
    box-sizing: border-box;
    padding: 30px 0; /* Aire arriba y abajo para que no quede pegado a los widgets vecinos. */
    background-color: #ffffff;
}

.FaqCategoryCards-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-sizing: border-box;
    max-width: var(--container-max-width);
    margin-inline: auto;
    padding-inline: 48px;
}

/* ------------------------------------------------------------
   Encabezado opcional de la sección (BTCN-371): título y descripción arriba de las tarjetas,
   alineados con su borde izquierdo. SIN DESBORDES: un texto largo sin espacios envuelve.
   ------------------------------------------------------------ */
.FaqCategoryCards-intro {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 100%;
    margin-bottom: 12px; /* Con el gap de 20px de la columna, 32px hasta la primera tarjeta. */
}

.FaqCategoryCards-intro-title {
    margin: 0;
    color: #0f0f12;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.FaqCategoryCards-intro-text {
    margin: 0;
    color: rgba(15, 15, 18, 0.65); /* Gris del texto secundario. */
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
    white-space: pre-line; /* Respeta los saltos de línea del campo de texto. */
}

/* ------------------------------------------------------------
   Tarjeta
   ------------------------------------------------------------ */
.FaqCategoryCards-card {
    overflow: hidden;
    border: 1px solid #e5e3de;
    border-radius: 10px;
    background-color: #ffffff;
}

.FaqCategoryCards-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
    padding: 18px 24px;
    border: 0;
    background-color: #f8f7f5;
    color: #0f0f12;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.FaqCategoryCards-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.FaqCategoryCards-header-bar {
    flex: 0 0 auto;
    width: 4px;
    height: 22px;
    background-color: var(--FaqCategoryCards-accent);
}

.FaqCategoryCards-header-text {
    font-size: 20px;
    font-weight: 700;
    line-height: normal;
    overflow-wrap: anywhere;
}

/* Símbolo: "−" con la tarjeta abierta y "+" cerrada. */
.FaqCategoryCards-header-icon {
    flex: 0 0 auto;
    color: #5c5e63;
    font-size: 22px;
    font-weight: 700;
    line-height: normal;
}

.FaqCategoryCards-header-icon::before {
    content: "\2212";
}

.FaqCategoryCards-card.is-closed .FaqCategoryCards-header-icon::before {
    content: "+";
}

.FaqCategoryCards-header:focus-visible {
    outline: 2px solid var(--FaqCategoryCards-accent);
    outline-offset: -2px;
}

/* ------------------------------------------------------------
   Panel desplegable: la fila de la grilla anima de 1fr a 0fr.
   ------------------------------------------------------------ */
.FaqCategoryCards-panel {
    display: grid;
    grid-template-rows: 1fr;
    visibility: visible;
    transition: grid-template-rows 0.35s ease, visibility 0s linear 0s;
}

.FaqCategoryCards-card.is-closed .FaqCategoryCards-panel {
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows 0.35s ease, visibility 0s linear 0.35s;
}

.FaqCategoryCards-panel-clip {
    min-height: 0;
    overflow: hidden;
}

.FaqCategoryCards-body {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    box-sizing: border-box;
    padding: 24px;
}

/* ------------------------------------------------------------
   Columna izquierda: imagen e ítems
   ------------------------------------------------------------ */
.FaqCategoryCards-aside {
    display: flex;
    flex: 0 0 280px;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.FaqCategoryCards-media {
    height: 130px;
    overflow: hidden;
    border-radius: 8px;
    background-color: #e5e7ea;
}

.FaqCategoryCards-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.FaqCategoryCards-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.FaqCategoryCards-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #243746;
    font-size: 13px;
    font-weight: 600;
    line-height: normal;
}

.FaqCategoryCards-item-dot {
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    background-color: var(--FaqCategoryCards-accent);
}

/* ------------------------------------------------------------
   Columna derecha: preguntas y respuestas
   ------------------------------------------------------------ */
.FaqCategoryCards-questions {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.FaqCategoryCards-qa {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.FaqCategoryCards-question,
.FaqCategoryCards-answer {
    margin: 0;
    line-height: normal;
    overflow-wrap: anywhere;
}

.FaqCategoryCards-question {
    color: var(--FaqCategoryCards-accent);
    font-size: 15px;
    font-weight: 700;
}

.FaqCategoryCards-answer {
    color: #5c5e63;
    font-size: 14px;
    font-weight: 400;
    white-space: pre-line; /* Respeta los saltos de línea del texto plano. */
}

/* ------------------------------------------------------------
   Tablet: mismo diseño que PC, con 40px de relleno lateral.
   ------------------------------------------------------------ */
@media (max-width: 1024px) {
    .FaqCategoryCards-inner {
        padding-inline: 40px;
    }

    .FaqCategoryCards-intro-title {
        font-size: 24px;
    }

    .FaqCategoryCards-intro-text {
        font-size: 13px;
    }
}

/* ------------------------------------------------------------
   Mobile: el cuerpo se apila en una columna.
   ------------------------------------------------------------ */
@media (max-width: 500px) {
    .FaqCategoryCards-inner {
        padding-inline: 20px;
    }

    .FaqCategoryCards-intro-title {
        font-size: 22px;
    }

    .FaqCategoryCards-body {
        flex-direction: column;
        align-items: stretch;
    }

    .FaqCategoryCards-aside {
        flex: 0 0 auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .FaqCategoryCards-panel,
    .FaqCategoryCards-card.is-closed .FaqCategoryCards-panel {
        transition: none;
    }
}
