/* AI Press Run v1.13.15 — latest-post display and compact-card image fit. */

/* Older cards: keep image, title, author and date; hide excerpt only. */
.aipr-is-older-post .wp-block-post-excerpt,
.aipr-is-older-post .wp-block-latest-posts__post-excerpt,
.aipr-is-older-post .entry-summary,
.aipr-is-older-post .post-excerpt,
.aipr-is-older-post .excerpt {
  display: none !important;
}

/* Latest card: keep the existing excerpt and make the more link obvious. */
.aipr-is-latest-post .wp-block-post-excerpt,
.aipr-is-latest-post .wp-block-latest-posts__post-excerpt,
.aipr-is-latest-post .entry-summary,
.aipr-is-latest-post .post-excerpt,
.aipr-is-latest-post .excerpt {
  display: block;
}

.aipr-is-latest-post .wp-block-post-excerpt__more-link,
.aipr-is-latest-post .aipr-latest-more-link {
  color: #1e5fd7;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.aipr-is-latest-post .wp-block-post-excerpt__more-link:hover,
.aipr-is-latest-post .aipr-latest-more-link:hover {
  text-decoration: underline;
}

/*
 * Home-page compact cards: use one stable 16:9 frame and fit the complete
 * featured image inside it. Portrait sources therefore never make a card
 * excessively tall, while object-fit: contain prevents image cropping.
 * Only older cards marked by the existing home-page script are affected.
 */
.aipr-is-older-post .wp-block-post-featured-image,
.aipr-is-older-post .wp-block-latest-posts__featured-image,
.aipr-is-older-post .post-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 9 !important;
  overflow: hidden !important;
  background: #f2f5f3;
}

.aipr-is-older-post .wp-block-post-featured-image > a,
.aipr-is-older-post .wp-block-latest-posts__featured-image > a,
.aipr-is-older-post .post-image > a {
  display: block;
  width: 100%;
  height: 100% !important;
  aspect-ratio: auto !important;
}

.aipr-is-older-post .wp-block-post-featured-image img,
.aipr-is-older-post .wp-block-latest-posts__featured-image img,
.aipr-is-older-post .post-image img,
.aipr-is-older-post img.wp-post-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100% !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center center !important;
}

@media (max-width: 768px) {
  .aipr-is-older-post .wp-block-post-featured-image img,
  .aipr-is-older-post .wp-block-latest-posts__featured-image img,
    .aipr-is-older-post .post-image img,
    .aipr-is-older-post img.wp-post-image {
    width: 100%;
    height: 100% !important;
  }
}
