/* Traducción de strings hardcodeados del template */
/* "By" -> "Por" en autor de artículo */
.tdb_single_author .tdb-author-name-wrap .tdb-author-by,
.tdb-author-name-wrap .tdb-author-by,
span.tdb-author-by { 
  font-size: 0px !important;
  letter-spacing: 0 !important;
}
.tdb_single_author .tdb-author-name-wrap .tdb-author-by::before,
.tdb-author-name-wrap .tdb-author-by::before,
span.tdb-author-by::before { 
  content: "Por" !important;
  font-size: 14px !important;
  font-weight: inherit;
  letter-spacing: 1px;
  color: inherit;
  text-transform: inherit;
}


/* ============================================
   BANNERS RESPONSIVOS PARA MOBILE
   Adaptación de banners del home y entradas
   ============================================ */

@media (max-width: 767px) {

  /* === BANNERS GENERALES (code-block) === */
  /* Asegurar que todos los code-blocks sean responsivos */
  .code-block {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-align: center !important;
  }
  
  /* Imágenes dentro de banners: escalar al ancho disponible */
  .code-block img,
  .code-block a img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* === BANNER HOME (bloque lateral con anuncios 300x250) === */
  /* El bloque flex que contiene los banners 300x250 en el home */
  .td_flex_block_1 .code-block,
  .code-block-3 {
    max-width: 100% !important;
    padding: 5px 0 !important;
  }

  /* === BANNER EN ENTRADAS (dentro del contenido) === */
  /* Banners dentro del contenido de entradas individuales */
  .tdb_single_content .code-block,
  .td-post-content .code-block,
  .tdb-block-inner .code-block {
    margin: 10px auto !important;
    display: block !important;
    max-width: 100% !important;
  }
  
  .tdb_single_content .code-block img,
  .td-post-content .code-block img,
  .tdb-block-inner .code-block img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    margin: 0 auto !important;
  }

  /* === CONTENEDORES DE BANNERS - HOME === */
  /* Columnas que contienen banners en el home */
  .tdc-column .code-block,
  .wpb_wrapper .code-block {
    overflow: hidden !important;
  }

  /* === BANNERS TIPO LEADERBOARD (728x90, 970x90) === */
  /* Adaptar banners horizontales anchos */
  .code-block-1 img,
  .code-block-2 img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* === MODALES CON BANNERS === */
  .tdm-popup-modal .code-block {
    max-width: 100% !important;
  }
  
  .tdm-popup-modal .code-block img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* === EVITAR DESBORDAMIENTO HORIZONTAL EN TODA LA PÁGINA === */
  body {
    overflow-x: hidden !important;
  }
  
  /* Contenedor principal */
  .td-outer-wrap,
  .td-main-content-wrap,
  .td-container {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

}

/* Breakpoint para tablets pequeñas */
@media (max-width: 479px) {

  /* Banners aún más pequeños en pantallas muy pequeñas */
  .code-block img {
    max-width: 100% !important;
    height: auto !important;
  }
  
  /* Ocultar banners de formato leaderboard muy ancho en mobile muy pequeño
     si resultan problemáticos (se puede quitar este bloque si se prefiere mostrarlos) */
  /* .code-block-1 { display: none !important; } */
  
  /* Centrar banners verticales 300x250 */
  .code-block-3 {
    text-align: center !important;
  }
  
  .code-block-3 img {
    display: inline-block !important;
    max-width: 280px !important;
  }

}
