/* KO_LIST_IMAGES_156 | 2026-10-23
   Public mobile lists Akce and Aktuality: full-bleed photo thumbnails matching
   PWA home (16:9, no white letterboxing). Both browser and standalone PWA.
   This stylesheet is loaded after portal.css and portal-audit-v010154.css.
   Photos only; the large images in event/news details remain uncropped. */
@media (max-width:760px) {
  /* AKCE — 124 x 70px; the photo box must reach BOTH card edges. */
  body .compact-content-cards.ko-events-list {
    --ko-card-h:70px!important;
    --ko-thumb-w:124px!important;
    --ko-list-card-h:70px!important;
    --ko-list-thumb-w:124px!important;
  }
  body .compact-content-cards.ko-events-list .content-card.ko-event-item,
  body:has(.ko-events-list) .compact-content-cards.ko-events-list .content-card.ko-event-item {
    display:grid!important;
    grid-template-columns:var(--ko-thumb-w) minmax(0,1fr)!important;
    align-items:stretch!important;
    height:var(--ko-card-h)!important;
    min-height:var(--ko-card-h)!important;
    max-height:var(--ko-card-h)!important;
    padding:0!important;
    overflow:hidden!important;
  }
  body .compact-content-cards.ko-events-list .content-card.ko-event-item > img,
  body .compact-content-cards.ko-events-list .content-card.ko-event-item > picture,
  body .compact-content-cards.ko-events-list .content-card.ko-event-item > .post-card-image-link,
  body:has(.ko-events-list) .compact-content-cards.ko-events-list .content-card.ko-event-item > img,
  body:has(.ko-events-list) .compact-content-cards.ko-events-list .content-card.ko-event-item > picture,
  body:has(.ko-events-list) .compact-content-cards.ko-events-list .content-card.ko-event-item > .post-card-image-link {
    grid-column:1!important;
    grid-row:1!important;
    display:block!important;
    align-self:stretch!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:100%!important;
    min-height:100%!important;
    max-height:100%!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    overflow:hidden!important;
    object-fit:cover!important;
    object-position:center!important;
  }
  body .compact-content-cards.ko-events-list .content-card.ko-event-item > picture > img,
  body .compact-content-cards.ko-events-list .content-card.ko-event-item > .post-card-image-link > img,
  body:has(.ko-events-list) .compact-content-cards.ko-events-list .content-card.ko-event-item > picture > img,
  body:has(.ko-events-list) .compact-content-cards.ko-events-list .content-card.ko-event-item > .post-card-image-link > img {
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:100%!important;
    min-height:100%!important;
    max-height:100%!important;
    margin:0!important;
    padding:0!important;
    border-radius:0!important;
    object-fit:cover!important;
    object-position:center!important;
  }
  /* Organization-logo substitutes are not photos; show the full logo. */
  body:has(.ko-events-list) .compact-content-cards.ko-events-list .content-card.ko-event-item img[src*="/media/organizations/logos/"],
  body:has(.ko-events-list) .compact-content-cards.ko-events-list .content-card.ko-event-item img[src*="organizations%2Flogos"] {
    object-fit:contain!important;
  }

  /* AKTUALITY — 106 x 60px; also handle a picture inside the image link. */
  body .posts-listing-section .posts-card-list .post-card.has-image {
    display:grid!important;
    grid-template-columns:106px minmax(0,1fr)!important;
    align-items:stretch!important;
    height:60px!important;
    min-height:60px!important;
    max-height:60px!important;
    padding:0!important;
    overflow:hidden!important;
  }
  body .posts-listing-section .posts-card-list .post-card.has-image > .post-card-image-link,
  body .posts-listing-section .posts-card-list .post-card.has-image > picture,
  body .posts-listing-section .posts-card-list .post-card.has-image > img {
    display:block!important;
    grid-column:1!important;
    grid-row:1!important;
    align-self:stretch!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:100%!important;
    min-height:100%!important;
    max-height:100%!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    overflow:hidden!important;
    object-fit:cover!important;
    object-position:center!important;
  }
  body .posts-listing-section .posts-card-list .post-card.has-image > .post-card-image-link > picture {
    display:block!important;
    width:100%!important;
    height:100%!important;
    min-height:100%!important;
    max-height:100%!important;
    margin:0!important;
    padding:0!important;
    border-radius:0!important;
    overflow:hidden!important;
  }
  body .posts-listing-section .posts-card-list .post-card.has-image > .post-card-image-link > img,
  body .posts-listing-section .posts-card-list .post-card.has-image > .post-card-image-link > picture > img,
  body .posts-listing-section .posts-card-list .post-card.has-image > picture > img {
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:100%!important;
    min-height:100%!important;
    max-height:100%!important;
    margin:0!important;
    padding:0!important;
    border-radius:0!important;
    object-fit:cover!important;
    object-position:center!important;
  }
  body .posts-listing-section .posts-card-list .post-card.has-image > .post-card-body {
    grid-column:2!important;
    grid-row:1!important;
    min-width:0!important;
  }
  body .posts-listing-section .posts-card-list .post-card.has-image img[src*="/media/organizations/logos/"],
  body .posts-listing-section .posts-card-list .post-card.has-image img[src*="organizations%2Flogos"] {
    object-fit:contain!important;
  }
}

/* Matching the homepage's compact 16:9 cards on the narrowest phones. */
@media (max-width:360px) {
  body .compact-content-cards.ko-events-list {
    --ko-card-h:64px!important;
    --ko-thumb-w:114px!important;
    --ko-list-card-h:64px!important;
    --ko-list-thumb-w:114px!important;
  }
  body .posts-listing-section .posts-card-list .post-card.has-image {
    grid-template-columns:100px minmax(0,1fr)!important;
    height:56px!important;
    min-height:56px!important;
    max-height:56px!important;
  }
}
