/*
 * Ajustes visuales de los cambios de SEO.
 * Mantienen el mismo aspecto que tenían los títulos antes de cambiar sus etiquetas.
 */

/* Número "24" decorativo (antes era un <h2>) */
.num__24 {
  display: block;
  font-family: 'Conv_Metropolis-Bold';
  font-weight: normal;
  font-style: normal;
  font-size: 40px;
  line-height: 40px;
  margin: 0;
}

/* Slides 2 y siguientes del banner de inicio (antes <h1>) */
.wrap__left__banner h2.banner__title {
  font-size: 48px;
  line-height: 48px;
  margin: 0 0 32px;
  color: white;
  position: relative;
}

/* Bloque del mapa en "Nosotros" (antes <h1>) */
.wrap__america h2.title__america {
  font-size: 48px;
  line-height: 48px;
  text-align: center;
}
.wrap__america h2.title__america span {
  color: #369952;
}

/* Título principal de Contacto y páginas legales (antes <h3>) */
.wrap__sub__title h1.title__page {
  font-size: 32px;
  line-height: 32px;
}

/* Imágenes del blog: ahora son <img> reales con texto alternativo */
/* (La miniatura de "Artículos recientes" mantiene su position: absolute original:
   ocupa toda la tarjeta y hace de fondo de la primera y del hover.) */
.block__news__image__bg,
.blog__detail__wrap__item__img {
  position: relative;
  overflow: hidden;
}
.block__news__trending__img {
  overflow: hidden;
}
/* El velo oscuro de "anterior/siguiente" debe quedar encima de la foto. */
.blog__detail__wrap__item__img:before {
  z-index: 1;
}
.block__news__image__bg img,
.block__news__trending__img img,
.blog__detail__wrap__item__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Migas de pan */
.breadcrumbs {
  font-size: 14px;
  line-height: 20px;
  margin: 0 0 16px;
}
.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.breadcrumbs li + li::before {
  content: "/";
  margin-right: 4px;
  opacity: .6;
}
.breadcrumbs a {
  color: inherit;
  text-decoration: underline;
}
.news__detail__banner .breadcrumbs {
  color: white;
}

/* Paginación del blog */
.pagination__block--wp .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 45px;
}
.pagination__block--wp .page-numbers {
  padding: 6px 12px;
  border: 1px solid #e0e0e0;
  color: #1F140F;
  text-decoration: none;
}
.pagination__block--wp .page-numbers.current {
  background: #369952;
  border-color: #369952;
  color: white;
}

@media screen and (max-width: 767px) {
  .num__24 {
    font-size: 32px;
    line-height: 32px;
  }
  .wrap__left__banner h2.banner__title,
  .wrap__america h2.title__america {
    font-size: 40px;
    line-height: 40px;
  }
  .wrap__sub__title h1.title__page {
    font-size: 28px;
    line-height: 28px;
  }
}

/* -------------------------------------------------------------------------
 * Blog: el CSS original usaba Montserrat y ProximaNova, que el theme no carga
 * (salía Times). Se usan las tipografías de la web y se mejora la lectura.
 * ---------------------------------------------------------------------- */
.news__detail__banner__title h1,
.block__news__title h3,
.block__news__trending__text h3,
.blog__detail__wrap__item__text h3,
.block__news__trending__item__block__title h4,
.block__news__tags__block__title h4,
.news__detail__content__content h2,
.news__detail__content__content h3,
.news__detail__content__content h4,
.news__detail__content__author__name {
  font-family: 'Conv_Metropolis-Bold', sans-serif;
  font-weight: normal;
}
.news__detail__banner__details,
.news__detail__content__content,
.news__detail__content__tag,
.news__detail__content__author__charge,
.block__news__content,
.block__news__content p,
.block__news__date,
.block__news__categories,
.block__news__author__name,
.block__news__trending__text span,
.blog__detail__wrap__item__text span,
.breadcrumbs {
  font-family: 'Conv_Metropolis-Regular', sans-serif;
}

.news__detail__content__content {
  color: #3d3d3d;
  font-size: 17px;
  line-height: 1.75;
}
.news__detail__content__content p,
.news__detail__content__content ul,
.news__detail__content__content ol {
  margin: 0 0 20px;
}
.news__detail__content__content li {
  margin-bottom: 8px;
}
.news__detail__content__content h2 {
  color: #1F140F;
  font-size: 28px;
  line-height: 34px;
  margin: 48px 0 16px;
}
.news__detail__content__content h3 {
  color: #1F140F;
  font-size: 21px;
  line-height: 28px;
  margin: 32px 0 12px;
}
.news__detail__content__content a {
  color: #369952;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.news__detail__content__content strong {
  font-family: 'Conv_Metropolis-Bold', sans-serif;
  font-weight: normal;
  color: #1F140F;
}
.news__detail__content__content figure {
  margin: 32px 0;
}
.news__detail__content__content figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.news__detail__content__content mark {
  background: #fff3b0;
  padding: 0 4px;
}
.block__news__title h3 {
  line-height: 1.3;
}

@media screen and (max-width: 767px) {
  .news__detail__content__content {
    font-size: 16px;
  }
  .news__detail__content__content h2 {
    font-size: 24px;
    line-height: 30px;
  }
  .news__detail__banner__title h1 {
    font-size: 32px;
    line-height: 38px;
  }
}

/* Fondo explícito: sin él, los navegadores en modo oscuro pintan el lienzo negro
   detrás de las zonas sin fondo propio (p. ej. el texto de los artículos). */
html, body {
  background-color: #ffffff;
}

/* Cabecera del artículo: autor y fecha con la tipografía de la web y sin "De" en mayúscula. */
.news__detail__line {
  font-family: 'Conv_Metropolis-Regular', sans-serif;
}
.news__detail__banner__date {
  text-transform: none;
}

/* Artículos relacionados: rejilla de 3 tarjetas del mismo ancho y altura.
   La tarjeta reutiliza la del listado del blog (48% de ancho), por eso salía estrecha. */
.news__detail__slider .section__news__items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 360px));
  justify-content: center;
  gap: 32px;
  max-width: 1180px;
  margin: 0 auto;
  font-size: 16px;
  text-align: left;
  list-style: none;
}
.news__detail__slider .section__news__item {
  display: flex;
  width: auto;
  margin: 0;
}
.news__detail__slider .block__news__item--page {
  display: flex;
  width: 100%;
  margin: 0;
}
.news__detail__slider .block__news__item__inside {
  display: flex;
  flex-direction: column;
  width: 100%;
  box-shadow: 0 0 15px rgba(0, 0, 0, .1);
  background: #fff;
}
.news__detail__slider .block__news__image__bg {
  height: 220px;
}
.news__detail__slider .block__news__info {
  flex: 1;
}
.news__detail__slider .block__news__title h3 {
  font-size: 20px;
}
.block__news__categories a {
  font-family: 'Conv_Metropolis-Regular', sans-serif;
}

/* Blog: dejar sitio a la barra lateral fija de la derecha (95 px), igual que hace
   .layout en el resto de páginas. Sin esto, entre 991 y ~1550 px de ancho la barra
   tapaba "Artículos recientes", las tarjetas relacionadas y el título. */
@media screen and (min-width: 991px) {
  .news__detail__container,
  .news__detail__banner__container,
  .block__news__container,
  .news__detail__slider .section__news__container {
    max-width: min(1360px, calc(100vw - 2 * 110px));
  }
}

/* Blog y artículos: header y barra lateral blancos desde el principio (como en el inicio
   tras el scroll), en lugar de transparentes sobre la foto de cabecera. */
.single-post .header__dark,
.page-template-theme-blog .header__dark,
.single-post .header__dark .wrap__lateral__bar,
.page-template-theme-blog .header__dark .wrap__lateral__bar {
  background-color: #fff;
}
