/* 
Theme Name: Duplika
Theme URI: https://duplika.com/
Description: Child theme de Elementor
Author: Duplika
Author URI: https://duplika.com/
Template: hello-elementor
Version: 1.0.0
Text Domain: duplika
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* Add your custom styles here */

/* Duplika: legibilidad del contenido de los posts.
   Agregar al final del CSS existente, no reemplazar el archivo del tema.
   No modifica páginas, archivos del blog, navegación ni comentarios. */

/* Párrafos y listas: interlineado y separación. */
body.single-post .elementor-widget-theme-post-content :where(p, li) {
  line-height: 1.7;
}

body.single-post .elementor-widget-theme-post-content :where(p, ul, ol) {
  margin-block: 0 1.15em;
}

body.single-post .elementor-widget-theme-post-content li + li {
  margin-block-start: 0.35em;
}

body.single-post .elementor-widget-theme-post-content :where(ul, ol) :where(ul, ol) {
  margin-block: 0.35em 0;
}

/* Más espacio antes de una sección que después del título. */
body.single-post .elementor-widget-theme-post-content h2 {
  margin-block: 2.5rem 1rem;
  line-height: 1.3;
}

body.single-post .elementor-widget-theme-post-content h3 {
  margin-block: 1.8rem 0.75rem;
  line-height: 1.35;
}

/* No sumar un margen grande a los separadores manuales antiguos. */
body.single-post .elementor-widget-theme-post-content .wp-block-spacer + :where(h2, h3) {
  margin-block-start: 0.5rem;
}

body.single-post .elementor-widget-theme-post-content > :where(h2, h3):first-child {
  margin-block-start: 0;
}

/* Separación de imágenes, tablas y contenido incrustado. */
body.single-post .elementor-widget-theme-post-content :where(.wp-block-image, .wp-block-table, .wp-block-embed) {
  margin-block: 1.75rem;
}

/* El espacio con el pie de tabla se controla desde figcaption. */
body.single-post .elementor-widget-theme-post-content .wp-block-table table {
  margin-block-end: 0;
}

/* Pies legibles: heredar el color del contenido, no el gris de Hello. */
body.single-post .elementor-widget-theme-post-content figcaption {
  margin-block: 0.75rem 0;
  color: inherit;
  font-size: 1rem;
  line-height: 1.6;
  font-style: normal;
  text-align: start;
}

/* Complemento opcional. Agregar al final de style.css, sin reemplazarlo.
   En Gutenberg, agregar tabla-comparativa a las tablas que lo necesiten.
   No cambia otras tablas ni las páginas comerciales. */
@media (max-width: 767px) {
  body.single-post .elementor-widget-theme-post-content .wp-block-table.tabla-comparativa {
    max-width: 100%;
    overflow-x: auto;
  }

  body.single-post .elementor-widget-theme-post-content .wp-block-table.tabla-comparativa > table {
    min-width: 40rem;
  }
}

/* Opcional: enlaces editoriales reconocibles, sin oscurecerlos al pasar el mouse. */
body.single-post .elementor-widget-theme-post-content :where(p, li, td, th, figcaption) a:not(.wp-element-button):not(.wp-block-button__link) {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

body.single-post .elementor-widget-theme-post-content :where(p, li, td, th, figcaption) a:not(.wp-element-button):not(.wp-block-button__link):is(:hover, :focus-visible) {
  color: inherit;
}