/* =========================================================
   Estilos para contenido editado en WYSIWYG (Jodit) que se
   renderiza en la web pública (sobre mí, artículos del blog,
   FAQ, etc.). Conviven con cualquier tema sin romperlo.
   ========================================================= */

.wysiwyg {
    line-height: 1.65;
    word-wrap: break-word;
}

.wysiwyg p {
    margin: 0 0 1.4rem;
}

.wysiwyg h1,
.wysiwyg h2,
.wysiwyg h3,
.wysiwyg h4,
.wysiwyg h5,
.wysiwyg h6 {
    margin: 2.4rem 0 1rem;
    line-height: 1.25;
}

.wysiwyg h1 { font-size: 2.8rem; }
.wysiwyg h2 { font-size: 2.4rem; }
.wysiwyg h3 { font-size: 2rem; }
.wysiwyg h4 { font-size: 1.8rem; }
.wysiwyg h5 { font-size: 1.6rem; }
.wysiwyg h6 { font-size: 1.4rem; }

.wysiwyg strong,
.wysiwyg b { font-weight: 700; }

.wysiwyg em,
.wysiwyg i { font-style: italic; }

.wysiwyg u { text-decoration: underline; }

.wysiwyg s,
.wysiwyg strike,
.wysiwyg del { text-decoration: line-through; }

.wysiwyg ul,
.wysiwyg ol {
    margin: 0 0 1.6rem;
    padding-left: 2.4rem;
}

.wysiwyg ul { list-style: disc outside; }
.wysiwyg ol { list-style: decimal outside; }

.wysiwyg ul ul { list-style: circle outside; }
.wysiwyg ul ul ul { list-style: square outside; }
.wysiwyg ol ol { list-style: lower-alpha outside; }
.wysiwyg ol ol ol { list-style: lower-roman outside; }

.wysiwyg li {
    margin-bottom: 0.6rem;
    line-height: 1.6;
}

.wysiwyg li > ul,
.wysiwyg li > ol {
    margin-top: 0.6rem;
    margin-bottom: 0.6rem;
}

.wysiwyg blockquote {
    margin: 1.6rem 0;
    padding: 1.2rem 1.8rem;
    border-left: 0.4rem solid currentColor;
    opacity: 0.85;
    font-style: italic;
}

.wysiwyg a {
    text-decoration: underline;
}

.wysiwyg img {
    max-width: 100%;
    height: auto;
    border-radius: 0.6rem;
    margin: 1rem 0;
}

.wysiwyg table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6rem 0;
    font-size: 0.95em;
    overflow-x: auto;
    display: block;
}

@media (min-width: 768px) {
    .wysiwyg table {
        display: table;
    }
}

.wysiwyg table th,
.wysiwyg table td {
    border: 1px solid rgba(0, 0, 0, 0.15);
    padding: 0.8rem 1.2rem;
    text-align: left;
    vertical-align: top;
}

.wysiwyg table th {
    background: rgba(0, 0, 0, 0.04);
    font-weight: 600;
}

.wysiwyg table tr:nth-child(even) td {
    background: rgba(0, 0, 0, 0.02);
}

.wysiwyg hr {
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
    margin: 2rem 0;
}

.wysiwyg pre,
.wysiwyg code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 0.4rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.92em;
}

.wysiwyg pre {
    padding: 1.2rem 1.4rem;
    overflow-x: auto;
    margin: 1.4rem 0;
}

.wysiwyg pre code {
    background: transparent;
    padding: 0;
}

.wysiwyg figure {
    margin: 1.4rem 0;
}

.wysiwyg figure figcaption {
    font-size: 0.9em;
    opacity: 0.75;
    margin-top: 0.6rem;
    text-align: center;
}

/* =========================================================
   Reglas equivalentes DENTRO del editor Jodit
   (para que las listas/tablas se vean también al escribir)
   ========================================================= */

.jodit-wysiwyg ul,
.jodit-wysiwyg ol {
    margin: 0 0 1.2rem;
    padding-left: 2.4rem;
}

.jodit-wysiwyg ul { list-style: disc outside; }
.jodit-wysiwyg ol { list-style: decimal outside; }

.jodit-wysiwyg ul ul { list-style: circle outside; }
.jodit-wysiwyg ul ul ul { list-style: square outside; }
.jodit-wysiwyg ol ol { list-style: lower-alpha outside; }
.jodit-wysiwyg ol ol ol { list-style: lower-roman outside; }

.jodit-wysiwyg li {
    margin-bottom: 0.4rem;
}

.jodit-wysiwyg table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.jodit-wysiwyg table th,
.jodit-wysiwyg table td {
    border: 1px solid rgba(0, 0, 0, 0.2);
    padding: 0.6rem 0.9rem;
}

.jodit-wysiwyg table th {
    background: rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

.jodit-wysiwyg blockquote {
    border-left: 0.3rem solid #ccc;
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    opacity: 0.85;
}
