/* ============================================================
   REPORTEROS DE INVESTIGACIÓN — CSS UNIFICADO v3.0
   WordPress + Newspaper/tagDiv + Elementor histórico
   SUSTITUIR todo el CSS personalizado anterior por este bloque.
   Verificar primero en el personalizador sin publicar.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Roboto:wght@400;500;700&family=Ultra&display=swap');

:root {
  --ri-ancho-general: 1400px;
  --ri-ancho-multimedia: 1200px;
  --ri-fondo: #ffffff;
  --ri-logo: #511014;
  --ri-ocre-oscuro: #490709;
  --ri-borgona: #770118;
  --ri-texto: #2a2a2a;
  --ri-enlace: #dd0000;
  --ri-meta: #757575;
  --ri-borde: #d3d3d3;
  --ri-dorado: #ffba12;
  --ri-fuente-titulos: 'Inter', Arial, sans-serif;
  --ri-fuente-cuerpo: 'Roboto', Arial, sans-serif;
  --ri-fuente-especial: 'Ultra', Georgia, serif;
  --ri-tamano-cuerpo: 25px;
}

/* Base: fondo blanco sin pintar sobre fondos de imágenes ni widgets. */
html, body, body.home, body.single-post, body.page {
  background-color: var(--ri-fondo) !important;
  color-scheme: light;
}
body { color: var(--ri-texto); }
:where(a, button, input, textarea, select):focus-visible {
  outline: 3px solid var(--ri-dorado);
  outline-offset: 3px;
}

/* Navegación y color de marca. */
.td-header-menu-wrap, .td-header-menu-wrap-full {
  background-color: var(--ri-logo);
}
.td-header-menu-wrap .sf-menu > li > a,
.td-header-menu-wrap-full .sf-menu > li > a {
  font-family: var(--ri-fuente-titulos);
}
.td-block-title > span, .td-block-title > a {
  background-color: var(--ri-logo);
  color: #fff;
}
.td-block-title-wrap { border-bottom-color: var(--ri-borde); }
.td-block-title { font-family: var(--ri-fuente-titulos); }

/* Categorías: quitar el verde que quedaba en el carrusel. */
.td-post-category, .td-module-meta-info .td-post-category,
body.home .td-category a, body.home .tdb-category a,
body.home .td-slide-meta .td-post-category,
body.home .td-big-grid-post .td-post-category,
body.home .tdb_module_slide .td-post-category,
body.home .tdb_module_featured_image .td-post-category {
  background-color: var(--ri-logo) !important;
  color: #fff !important;
  border-color: var(--ri-logo) !important;
  font-family: var(--ri-fuente-titulos);
}
body.home .td-post-category:hover,
body.home .td-category a:hover,
body.home .tdb-category a:hover {
  background-color: var(--ri-borgona) !important;
  color: #fff !important;
}

/* PORTADA: tarjetas normales oscuras, titulares sobre foto blancos. */
body.home :is(.td-module-title, .entry-title, .post-title),
body.home :is(.td-module-title, .entry-title, .post-title) a {
  font-family: var(--ri-fuente-titulos);
  color: var(--ri-texto);
  font-weight: 800;
  line-height: 1.22;
  overflow-wrap: break-word;
  text-decoration: none;
}
body.home :is(.td-module-title, .entry-title, .post-title) a:hover {
  color: var(--ri-borgona);
}
body.home .td-big-grid-post :is(.entry-title, .td-module-title, .td-big-grid-post-title),
body.home .td-big-grid-post :is(.entry-title, .td-module-title, .td-big-grid-post-title) a,
body.home .td-big-grid-post-title,
body.home .td-big-grid-post-title a,
body.home .tdb_module_featured_image .td-module-title,
body.home .tdb_module_featured_image .td-module-title a,
body.home .ri-portada-overlay :is(h1, h2, .entry-title, .td-module-title),
body.home .ri-portada-overlay :is(.entry-title, .td-module-title) a {
  color: #fff !important;
  font-family: var(--ri-fuente-titulos);
  font-weight: 900;
  line-height: 1.15;
  text-shadow: 0 2px 6px rgba(0,0,0,.65);
}
body.home .td-big-grid-post :is(.entry-title, .td-module-title, .td-big-grid-post-title) a:hover,
body.home .td-big-grid-post-title a:hover,
body.home .tdb_module_featured_image .td-module-title a:hover {
  color: #fff !important;
}
/* Opcional: asignar clase ri-portada-overlay SOLO a contenedores con foto de fondo. */
.ri-portada-overlay { position: relative; isolation: isolate; }
.ri-portada-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, transparent 15%, rgba(0,0,0,.7) 100%);
  pointer-events: none;
}
.ri-portada-overlay > * { position: relative; z-index: 1; }
body.home :is(.td-excerpt, .td-module-excerpt) {
  font: 400 16px/1.65 var(--ri-fuente-cuerpo);
  color: var(--ri-texto);
}
body.home :is(.td-post-date, .td-post-author-name) {
  font-family: var(--ri-fuente-titulos);
  color: var(--ri-meta);
}
body.home :is(.td_module_wrap, .tdb_module_loop) { margin-bottom: 28px; }
body.home .td-module-thumb { overflow: hidden; }
body.home .td-module-thumb img { transition: transform .3s ease; }
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  body.home .td-module-thumb:hover img { transform: scale(1.025); }
}

/* INTERIORES: blanco en superficies editoriales, no en overlays. */
body.single-post :is(.td-main-page-wrap, .td-main-content-wrap, .td-main-content,
.td-container, .td-post-content, .entry-content),
body.page :is(.td-post-content, .entry-content) {
  background-color: #fff !important;
}

/* Ampliación clásica de Newspaper: evita columna de 2/3 vacía. */
body.single-post .td-main-content-wrap {
  width: 100% !important;
  max-width: var(--ri-ancho-general) !important;
  margin-inline: auto !important;
  box-sizing: border-box !important;
  padding-inline: 40px !important;
}
body.single-post .td-main-content-wrap > .td-container,
body.single-post .td-main-content-wrap .td-pb-row {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
body.single-post .td-main-content-wrap .td-pb-span8 {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  box-sizing: border-box !important;
}
/* Coincide con el diseño ancho validado en la captura; se oculta
   la barra lateral CLÁSICA únicamente en entradas. */
body.single-post .td-main-content-wrap .td-main-sidebar {
  display: none !important;
}

/* Ancho completo de lectura dentro de la columna disponible. */
body.single-post :is(.td-post-content, .entry-content),
body.page :is(.td-post-content, .entry-content) {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  box-sizing: border-box;
  font-family: var(--ri-fuente-cuerpo);
  color: var(--ri-texto) !important;
  overflow-wrap: break-word;
}
body.single-post :is(.td-post-content, .entry-content) :is(p, ul, ol, blockquote, h2, h3, h4, h5, h6),
body.page :is(.td-post-content, .entry-content) :is(p, ul, ol, blockquote, h2, h3, h4, h5, h6) {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}
body.single-post :is(.td-post-content, .entry-content) :is(p, li),
body.page :is(.td-post-content, .entry-content) :is(p, li),
body.single-post .elementor-widget-text-editor :is(p, li),
body.page .elementor-widget-text-editor :is(p, li) {
  font-family: var(--ri-fuente-cuerpo) !important;
  font-size: var(--ri-tamano-cuerpo) !important;
  line-height: 1.65 !important;
  font-weight: 400;
  color: var(--ri-texto) !important;
  text-align: justify !important;
  text-justify: inter-word;
  hyphens: auto;
  overflow-wrap: break-word;
}
body.single-post :is(.td-post-content, .entry-content) p,
body.page :is(.td-post-content, .entry-content) p {
  margin-top: 0;
  margin-bottom: 1.3em;
}
body.single-post :is(.td-post-content, .entry-content) :is(ul, ol),
body.page :is(.td-post-content, .entry-content) :is(ul, ol) {
  padding-left: 1.5em;
}
body.single-post :is(.td-post-content, .entry-content) a:not(.td-post-category):not(.elementor-button),
body.page :is(.td-post-content, .entry-content) a:not(.td-post-category):not(.elementor-button) {
  color: var(--ri-enlace);
  text-decoration: underline;
  text-underline-offset: 3px;
}
body.single-post :is(.td-post-content, .entry-content) a:hover,
body.page :is(.td-post-content, .entry-content) a:hover {
  color: var(--ri-logo);
}

/* Títulos principales CENTRADOS en todas las entradas, no en portada. */
body.single-post .td-post-title h1,
body.single-post .td-post-title .entry-title,
body.single-post h1.entry-title,
body.single-post .tdb-title-text,
body.single-post .tdb_single_post_title h1 {
  font-family: var(--ri-fuente-titulos) !important;
  font-weight: 900 !important;
  font-size: clamp(32px, 4.2vw, 60px) !important;
  line-height: 1.1 !important;
  letter-spacing: -.025em;
  color: var(--ri-texto) !important;
  text-align: center !important;
  width: 100% !important;
  max-width: 1100px !important;
  margin-inline: auto !important;
  overflow-wrap: break-word;
}
body.page h1.entry-title {
  font-family: var(--ri-fuente-titulos);
  color: var(--ri-texto);
  text-align: center;
}
body.single-post :is(.td-post-content, .entry-content) :is(h2, h3, h4, h5, h6),
body.page :is(.td-post-content, .entry-content) :is(h2, h3, h4, h5, h6) {
  font-family: var(--ri-fuente-titulos) !important;
  color: var(--ri-texto);
  text-align: left;
  line-height: 1.22;
}
body.single-post :is(.td-post-content, .entry-content) h2,
body.page :is(.td-post-content, .entry-content) h2 {
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 800;
  margin-block: 2em .7em;
}
body.single-post :is(.td-post-content, .entry-content) h3,
body.page :is(.td-post-content, .entry-content) h3 {
  font-size: clamp(26px, 2.5vw, 32px);
  font-weight: 800;
  margin-block: 1.7em .65em;
}
body.single-post :is(.td-post-content, .entry-content) h4,
body.page :is(.td-post-content, .entry-content) h4 {
  font-size: 24px;
  font-weight: 700;
}
.ri-titulo-especial, .ri-titulo-especial :is(h1, h2, h3),
h1.ri-titulo-especial, h2.ri-titulo-especial {
  font-family: var(--ri-fuente-especial) !important;
  font-weight: 400 !important;
}
body.single-post :is(.td-post-date, .td-post-author-name, .tdb-author-name, .tdb-post-date) {
  font-family: var(--ri-fuente-titulos);
  color: var(--ri-meta);
}
body.single-post :is(.td-post-content, .entry-content) blockquote:not(.twitter-tweet) {
  font: 500 clamp(21px, 2.2vw, 24px)/1.55 var(--ri-fuente-cuerpo);
  color: var(--ri-texto);
  border-left: 4px solid var(--ri-logo);
  padding: 12px 0 12px 22px;
  background: transparent;
}

/* Multimedia: conservar imágenes nativas, embeds y Elementor histórico. */
body.single-post :is(.td-post-content, .entry-content) :is(figure, .wp-block-embed, .wp-block-image) {
  max-width: min(100%, var(--ri-ancho-multimedia));
  margin-inline: auto;
  box-sizing: border-box;
}
body.single-post :is(.td-post-content, .entry-content) img,
body.page :is(.td-post-content, .entry-content) img {
  max-width: 100% !important;
  height: auto !important;
}
body.single-post :is(.td-post-content, .entry-content) figcaption {
  font: 400 14px/1.5 var(--ri-fuente-cuerpo);
  color: var(--ri-meta);
  text-align: left;
  margin-top: 9px;
}
body.single-post :is(.td-post-content, .entry-content) video {
  max-width: min(100%, var(--ri-ancho-multimedia));
  height: auto;
}
body.single-post iframe:is([src*="youtube.com"], [src*="youtube-nocookie.com"], [src*="player.vimeo.com"]) {
  display: block;
  width: 100%;
  max-width: var(--ri-ancho-multimedia);
  aspect-ratio: 16/9;
  height: auto;
  border: 0;
  margin: 32px auto;
}
body.single-post iframe:is([src*="google.com/maps"], [src*="maps.google"]) {
  display: block;
  width: 100%;
  max-width: var(--ri-ancho-multimedia);
  height: 560px;
  border: 0;
  margin: 32px auto;
}
body.single-post iframe:is([src*="datawrapper"], [src*="flourish"], [src*="infogram"], [src*="tableau"], [src*="arcgis"]) {
  display: block;
  width: 100%;
  max-width: var(--ri-ancho-multimedia);
  min-height: 500px;
  border: 0;
  margin: 32px auto;
}
body.single-post .twitter-tweet,
body.single-post iframe[id^="twitter-widget"] {
  max-width: min(100%, 550px);
  margin-inline: auto;
}
/* Elementor: ampliar solo el editor de texto, no filas/columnas/widgets especiales. */
body.single-post .elementor-widget-text-editor > .elementor-widget-container,
body.page .elementor-widget-text-editor > .elementor-widget-container {
  max-width: 100% !important;
}
body.single-post .elementor-heading-title,
body.page .elementor-heading-title { font-family: var(--ri-fuente-titulos); }
body.single-post .elementor-widget-image img { max-width: 100%; height: auto; }
.elementor-button, input[type="submit"] {
  font-family: var(--ri-fuente-titulos);
  background-color: var(--ri-logo);
  color: #fff;
}
.elementor-button:hover, input[type="submit"]:hover {
  background-color: var(--ri-borgona);
}

/* Responsive: márgenes interiores proporcionados. */
@media (max-width: 1024px) {
  body.single-post .td-main-content-wrap { padding-inline: 26px !important; }
  body.single-post iframe:is([src*="google.com/maps"], [src*="maps.google"]) { height: 500px; }
}
@media (max-width: 767px) {
  body.single-post .td-main-content-wrap { padding-inline: 18px !important; }
  body.single-post :is(.td-post-title h1, .td-post-title .entry-title, h1.entry-title, .tdb-title-text, .tdb_single_post_title h1) {
    font-size: 32px !important;
    line-height: 1.15 !important;
    max-width: 100% !important;
  }
  body.single-post :is(.td-post-content, .entry-content) h2 { font-size: 30px; }
  body.single-post :is(.td-post-content, .entry-content) h3 { font-size: 26px; }
  body.home :is(.td-big-grid-post-title, .td-big-grid-post .td-module-title) { font-size: 25px; }
  body.home :is(.td-excerpt, .td-module-excerpt) { font-size: 15px; }
  body.single-post iframe:is([src*="google.com/maps"], [src*="maps.google"]) { height: 430px; }
  body.single-post iframe:is([src*="datawrapper"], [src*="flourish"], [src*="infogram"], [src*="tableau"], [src*="arcgis"]) { min-height: 420px; }
}
@media (max-width: 480px) {
  body.single-post .td-main-content-wrap { padding-inline: 15px !important; }
  body.single-post iframe:is([src*="google.com/maps"], [src*="maps.google"]) { height: 390px; }
}
@media (prefers-reduced-motion: reduce) {
  body.home .td-module-thumb img { transition: none; transform: none; }
}

/* MENÚ MÓVIL - REPORTEROS DE INVESTIGACIÓN */

@media (max-width: 767px) {

  /* Fondo gris claro */
  .td-mobile-header,
  .td-header-mobile-wrap,
  .td-header-menu-wrap {
    background-color: #D3D3D3 !important;
  }

  /* Letras color ocre */
  .td-mobile-menu-button,
  .td-mobile-menu-button a,
  .td-mobile-menu-button span,
  .td-mobile-menu-button i {
    color: #511014 !important;
  }

  /* Icono de tres rayas */
  .td-mobile-menu-button svg {
    color: #511014 !important;
    fill: #511014 !important;
  }

  /* Líneas construidas con CSS */
  .td-mobile-menu-button .tdm-menu-icon span {
    background-color: #511014 !important;
  }
}