:root {
    --wysiwyg-content-color-primary: #007F6F;
    --wysiwyg-content-color-secondary: #333;
    --wysiwyg-content-color-background: #fff;
    --wysiwyg-content-color-text: #000;
}

/* Estilos para contenido generado por el editor WYSIWYG */
.wysiwyg-content {
    line-height: 1.6;
    word-wrap: break-word;
    float: left;
    width: 100%;
}

/* --- ALINEACIONES (Los botones que acabamos de configurar) --- */

.wysiwyg-content .alignjustify {
    text-align: justify;
}

.wysiwyg-content .alignleft {
    text-align: left;
    float: left;
    margin: 0 20px 20px 0;
}

.wysiwyg-content .alignright {
    text-align: right;
    float: right;
    margin: 0 0 20px 20px;
}

.wysiwyg-content .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Limpiar floats para que el contenedor no se colapse */
.wysiwyg-content::after {
    content: "";
    display: table;
    clear: both;
}

/* --- ESTILOS DE TEXTO BÁSICOS --- */

.wysiwyg-content b,
.wysiwyg-content strong {
    font-weight: bold;
}

.wysiwyg-content i,
.wysiwyg-content em {
    font-style: italic;
}

.wysiwyg-content blockquote {
    border-left: 4px solid var(--wysiwyg-content-color-primary);
    padding-left: 20px;
    margin: 20px 0;
    color: var(--wysiwyg-content-color-secondary);
    font-style: italic;
}

/* --- LISTAS --- */

/* 1. Estilos base para las listas */
.wysiwyg-content ul,
.wysiwyg-content ol {
    margin: 0 0 20px 30px;
    padding: 0;
}

/* 2. Forzamos el estilo solo al LI que contiene texto directo */
.wysiwyg-content ul>li {
    list-style-type: disc !important;
}

.wysiwyg-content ol>li {
    list-style-type: decimal !important;
}

/* 3. EL TRUCO: Quitamos el número si el LI es solo un contenedor de otra lista (Sangría) */
.wysiwyg-content li:has(ul),
.wysiwyg-content li:has(ol) {
    list-style-type: none !important;
}

/* 4. Tu color personalizado para los puntos/números */
.wysiwyg-content li::marker {
    color: var(--wysiwyg-content-color-primary);
}

/* Color personalizado para los puntos de la lista desordenada */
.wysiwyg-content ul li::marker {
    color: var(--wysiwyg-content-color-primary);
    font-size: 1.1em;
}

/* Color personalizado para los números de la lista ordenada */
.wysiwyg-content ol li::marker {
    color: var(--wysiwyg-content-color-primary);
    font-weight: bold;
}

.wysiwyg-content li {
    margin-bottom: 5px;
    font-family: 'Poppins-Light', sans-serif;
}

/* --- ENLACES --- */

.wysiwyg-content a {
    text-decoration: underline;
    color: inherit;
    /* O el color de tu tema */
}

/* --- LÍNEA HORIZONTAL --- */

.wysiwyg-content hr {
    border: 0;
    border-top: 1px solid var(--wysiwyg-content-color-primary);
    margin: 30px 0;
}

/* Contenedor de contenido enriquecido */
.wysiwyg-content {
    /* Evita colapso de márgenes en el primer elemento */
    display: flow-root;
}

/* Tipografía Base */
.wysiwyg-content p {
    font-size: 16px;
    line-height: 26px;
    font-family: 'Poppins-Light', sans-serif;
    letter-spacing: -0.23px;
    margin-bottom: 20px;
    /* Incrementado ligeramente para mejor aireación */
}

/* Títulos con jerarquía visual descendente */
.wysiwyg-content h1,
.wysiwyg-content h2,
.wysiwyg-content h3,
.wysiwyg-content h4,
.wysiwyg-content h5,
.wysiwyg-content h6 {
    font-family: 'Poppins-SemiBold', sans-serif;
    color: #333333;
    margin-top: 1.5em;
    /* Espacio superior para separar secciones */
    margin-bottom: 0.5em;
    font-weight: 600;
}

/* Eliminar margen superior si es el primer elemento del contenedor */
.wysiwyg-content>*:first-child {
    margin-top: 0;
}

.wysiwyg-content h1 {
    font-size: 90px;
    line-height: 1;
    letter-spacing: -3.19px;
}

.wysiwyg-content h2 {
    font-size: 64px;
    line-height: 1.1;
    letter-spacing: -2.10px;
}

.wysiwyg-content h3 {
    font-size: 48px;
    line-height: 1.2;
    letter-spacing: -1.20px;
}

.wysiwyg-content h4 {
    font-size: 36px;
    line-height: 1.3;
    letter-spacing: -0.80px;
}

.wysiwyg-content h5 {
    font-size: 24px;
    line-height: 1.4;
    letter-spacing: -0.40px;
}

.wysiwyg-content h6 {
    font-size: 18px;
    line-height: 1.5;
    letter-spacing: -0.20px;
    text-transform: uppercase;
}

/* Ajustes para enlaces dentro del contenido */
.wysiwyg-content a {
    color: inherit;
    text-decoration: underline;
    transition: opacity 0.2s;
}

.wysiwyg-content a:hover {
    opacity: 0.7;
}

/* ==========================================================================
   ESTILOS WYSIWYG - TIPOGRAFÍA Y TABLAS
   ========================================================================== */

/* 1. CONTENEDOR GENERAL */
.wysiwyg-content {
    display: flow-root;
    /* Evita colapso de márgenes */
}

/* 2. TÍTULOS (H1 - H6) */
.wysiwyg-content h1,
.wysiwyg-content h2,
.wysiwyg-content h3,
.wysiwyg-content h4,
.wysiwyg-content h5,
.wysiwyg-content h6 {
    font-family: 'Poppins-SemiBold', sans-serif;
    color: #333333;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
}

.wysiwyg-content>*:first-child {
    margin-top: 0 !important;
}

.wysiwyg-content h1 {
    font-size: 90px;
    line-height: 1;
    letter-spacing: -3.19px;
}

.wysiwyg-content h2 {
    font-size: 64px;
    line-height: 1.1;
    letter-spacing: -2.10px;
}

.wysiwyg-content h3 {
    font-size: 48px;
    line-height: 1.2;
    letter-spacing: -1.20px;
}

.wysiwyg-content h4 {
    font-size: 36px;
    line-height: 1.3;
    letter-spacing: -0.80px;
}

.wysiwyg-content h5 {
    font-size: 24px;
    line-height: 1.4;
    letter-spacing: -0.40px;
}

.wysiwyg-content h6 {
    font-size: 18px;
    line-height: 1.5;
    letter-spacing: -0.20px;
    text-transform: uppercase;
}

/* 3. PÁRRAFOS */
.wysiwyg-content p {
    font-size: 16px;
    line-height: 26px;
    font-family: 'Poppins-Light', sans-serif;
    letter-spacing: -0.23px;
    margin-bottom: 20px;
}

/* 4. TABLAS (.bordered) */
.wysiwyg-content table.bordered {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-family: 'Poppins-Light', sans-serif;
    font-size: 14px;
    /* Texto más pequeño que el <p> */
    line-height: 1.5;
    color: #444444;
    border-top: 2px solid #333333;
}

/* Limpieza de celdas del Encabezado */
.wysiwyg-content table.bordered thead th,
.wysiwyg-content table.bordered tr:first-child td {
    font-family: 'Poppins-SemiBold', sans-serif;
    color: #333333;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 20px 10px;
    border-bottom: 1px solid #333333;
    text-align: left;
    vertical-align: middle;
}

/* Celdas del Cuerpo */
.wysiwyg-content table.bordered tbody td {
    padding: 15px 10px;
    border-bottom: 1px solid #eeeeee;
    vertical-align: top;
}

/* Reset de elementos internos en tablas (Evita saltos de línea extra) */
.wysiwyg-content table.bordered td p,
.wysiwyg-content table.bordered th p,
.wysiwyg-content table.bordered td strong {
    margin: 0 !important;
    padding: 0 !important;
    font-size: inherit;
    line-height: inherit;
}

.wysiwyg-content table.bordered td strong {
    font-family: 'Poppins-SemiBold', sans-serif;
    color: #333333;
    display: inline-block;
    /* Para que respete el flujo del texto */
}

/* Zebra striping sutil */
.wysiwyg-content table.bordered tbody tr:nth-child(even) {
    background-color: #fcfcfc;
}

/* 5. ENLACES Y OTROS */
.wysiwyg-content a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s;
}

.wysiwyg-content a:hover {
    opacity: 0.7;
}

/* 6. RESPONSIVIDAD */
@media screen and (max-width: 768px) {
    .wysiwyg-content {
        overflow-x: auto;
    }

    .wysiwyg-content table.bordered {
        min-width: 600px;
    }

    .wysiwyg-content h1 {
        font-size: 48px;
        letter-spacing: -1.5px;
    }

    .wysiwyg-content h2 {
        font-size: 38px;
    }
}