/* AIRES NUEVOS NQN — Integridad de fotografía editorial 2026
   Regla final: ninguna fotografía editorial debe recortarse ni deformarse.
   Las publicidades quedan fuera de este ajuste.
*/

/* Regla base para todos los componentes editoriales conocidos. */
.main-featured-article img,
.small-article-card img,
.latest-news-card img,
.article-card img,
.news-item-image img,
.home-special-report-media img,
.related-post-card .related-thumb img,
.single-post-page .related-thumb img,
.single-post-page .post-featured-image,
.single-post-page .post-body img {
  object-fit: contain !important;
  object-position: center center !important;
  max-width: 100% !important;
}

/* PORTADA Y TARJETAS: el marco puede conservar su diseño, pero la fotografía entra completa. */
.main-featured-article img,
.small-article-card img,
.latest-news-card img,
.article-card img,
.home-special-report-media img {
  background: #eceff2 !important;
}

/* SECCIONES: esta era la familia de clases que no estaba contemplada por la corrección anterior. */
.category-page .news-item-image {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #eceff2 !important;
}

.category-page .news-item-image img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center center !important;
  margin: 0 !important;
}

/* Evita que el contenedor de una tarjeta de sección vuelva a cortar la fotografía. */
.category-page .news-item {
  overflow: visible !important;
}

/* Tarjetas profesionales de sección/portada: contain, nunca cover. */
.category-page .latest-news-card .image-wrapper,
.category-page .latest-news-card:first-of-type .image-wrapper,
.latest-news-card .image-wrapper,
.article-card .image-wrapper {
  overflow: visible !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  background: #eceff2 !important;
}

.category-page .latest-news-card .image-wrapper img,
.category-page .latest-news-card:first-of-type .image-wrapper img,
.latest-news-card .image-wrapper img,
.article-card .image-wrapper img {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center center !important;
}

/* Portada: conservar el ancho y dejar que cada fotografía determine su propia altura. */
.main-featured-article img,
.small-article-card img {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
}

/* Relacionadas: también se muestran completas. */
.single-post-page .related-thumb,
.single-post-page .related-post-card .related-thumb {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  overflow: visible !important;
  background: #eceff2 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.single-post-page .related-thumb img,
.single-post-page .related-post-card .related-thumb img {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center center !important;
}

/* NOTA INDIVIDUAL: fotografía principal y fotografías del cuerpo respetan siempre su proporción original. */
.single-post-page .post-image-container,
.single-post-page .post-featured-image {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  overflow: visible !important;
}

.single-post-page .post-featured-image {
  display: block !important;
  object-fit: contain !important;
  object-position: center center !important;
}

.single-post-page .post-body img,
.single-post-page .post-body figure,
.single-post-page .post-body figure img {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center center !important;
}

/* Imágenes editoriales en módulos adicionales. */
.home-special-report-media {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  overflow: visible !important;
  background: #eceff2 !important;
}

.home-special-report-media img {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
}

/* Móvil y tablet: nunca fijar una altura artificial a la fotografía. */
@media (max-width: 992px) {
  .main-featured-article img,
  .small-article-card img,
  .latest-news-card img,
  .article-card img,
  .news-item-image img,
  .home-special-report-media img,
  .single-post-page .post-featured-image,
  .single-post-page .post-body img,
  .single-post-page .related-thumb img {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
  }
}

/* Reduce-motion: la integridad de imagen no depende de animaciones. */
@media (prefers-reduced-motion: reduce) {
  .main-featured-article img,
  .small-article-card img,
  .latest-news-card img,
  .article-card img,
  .news-item-image img,
  .home-special-report-media img,
  .single-post-page .related-thumb img,
  .single-post-page .post-featured-image,
  .single-post-page .post-body img {
    transition: none !important;
  }
}

/* PORTADA MODERNA / DESKTOP:
   Las imágenes nuevas de la portada no deben heredar marcos con aspect-ratio
   ni object-fit: cover. Se conserva el ancho del módulo y se respeta la
   proporción original de cada fotografía. */
.anqn-home-lead__image,
.anqn-home-lead__image img,
.anqn-home-rail-card__image,
.anqn-home-rail-card__image img,
.anqn-card-modern__image,
.anqn-card-modern__image img,
.anqn-card-modern img {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center center !important;
}

.anqn-home-lead__image,
.anqn-home-rail-card__image,
.anqn-card-modern__image {
  overflow: visible !important;
  background: #eceff2 !important;
}

.anqn-home-lead__image img,
.anqn-home-rail-card__image img,
.anqn-card-modern__image img,
.anqn-card-modern img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
}

/* Corrección definitiva de portada:
   no se fija una ventana de 16:9 para la foto principal.
   El navegador calcula la altura a partir de las dimensiones reales del archivo.
   Esto evita recortes en notebooks, monitores y pantallas anchas. */
.anqn-home-lead__image {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: auto !important;
  overflow: visible !important;
}

.anqn-home-lead__image img {
  position: static !important;
  inset: auto !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 100% !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform: none !important;
}

.anqn-home-lead:hover .anqn-home-lead__image img,
.anqn-home-lead__link:hover .anqn-home-lead__image img {
  transform: none !important;
}

/* Rail de portada: también evita recorte cuando una imagen no coincide con 16:10. */
.anqn-home-rail-card img {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center center !important;
}

@media (min-width: 993px) {
  .anqn-home-lead__image,
  .anqn-home-rail-card__image,
  .anqn-card-modern__image {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    overflow: visible !important;
  }

  .anqn-home-lead__image img,
  .anqn-home-rail-card__image img,
  .anqn-card-modern__image img,
  .anqn-card-modern img,
  .anqn-home-rail-card img {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
  }
}

/* ESTILO UNIFICADO DE ESQUINAS — MÓVIL/TABLET SOLAMENTE.
   No altera ancho, alto, proporción ni object-fit: solo redondea las esquinas.
   Las publicidades y logos quedan fuera. */
@media (max-width: 992px) {
  .main-featured-article img,
  .small-article-card img,
  .latest-news-card img,
  .article-card img,
  .news-item-image img,
  .home-special-report-media img,
  .single-post-page .related-thumb img,
  .single-post-page .post-featured-image,
  .single-post-page .post-body figure img,
  .anqn-home-lead__image img,
  .anqn-home-rail-card__image img,
  .anqn-home-rail-card img,
  .anqn-card-modern__image img,
  .anqn-card-modern img {
    border-radius: 18px !important;
  }

  .category-page .news-item-image,
  .latest-news-card .image-wrapper,
  .article-card .image-wrapper,
  .home-special-report-media,
  .single-post-page .related-thumb,
  .single-post-page .post-image-container,
  .anqn-home-lead__image,
  .anqn-home-rail-card__image,
  .anqn-card-modern__image {
    border-radius: 18px !important;
    overflow: hidden !important;
  }
}
