/* Mobile Akce + Aktuality — dedicated override v0.10.24
 * Loaded after portal.css so the two list views are deterministic.
 * PWA Domů is intentionally untouched.
 */
@media (max-width:760px) {

  /* =========================
     /AKCE
     ========================= */
  body:has(.ko-events-list) .compact-content-cards.ko-events-list {
    --ko-list-card-h:72px;
    --ko-list-thumb-w:128px;
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:7px!important;
  }

  body:has(.ko-events-list) .compact-content-cards.ko-events-list .content-card.ko-event-item {
    box-sizing:border-box!important;
    position:relative!important;
    display:grid!important;
    grid-template-columns:var(--ko-list-thumb-w) minmax(0,1fr)!important;
    align-items:stretch!important;
    gap:0!important;
    width:100%!important;
    height:var(--ko-list-card-h)!important;
    min-height:var(--ko-list-card-h)!important;
    max-height:var(--ko-list-card-h)!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    border-radius:13px!important;
  }

  body:has(.ko-events-list) .compact-content-cards.ko-events-list .content-card.ko-event-item::before {
    inset:0 auto 0 0!important;
    width:4px!important;
    z-index:3!important;
  }

  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 {
    box-sizing:border-box!important;
    grid-column:1!important;
    grid-row:1!important;
    display:block!important;
    width:var(--ko-list-thumb-w)!important;
    min-width:var(--ko-list-thumb-w)!important;
    max-width:var(--ko-list-thumb-w)!important;
    height:72px!important;
    min-height:72px!important;
    max-height:72px!important;
    align-self:center!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    border:0!important;
    border-radius:0!important;
    background:#fff!important;
    object-fit:contain!important;
    object-position:center!important;
    transform:none!important;
  }

  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;
    height:100%!important;
    min-width:0!important;
    min-height:0!important;
    max-width:none!important;
    max-height:none!important;
    margin:0!important;
    padding:0!important;
    object-fit:contain!important;
    object-position:center!important;
    background:#fff!important;
    transform:none!important;
  }

  body:has(.ko-events-list) .compact-content-cards.ko-events-list .content-card.ko-event-item:not(.has-image)::after {
    left:0!important;
    top:0!important;
    width:var(--ko-list-thumb-w)!important;
    height:72px!important;
    border-radius:0!important;
    transform:none!important;
  }

  body:has(.ko-events-list) .compact-content-cards.ko-events-list .content-card.ko-event-item > div {
    box-sizing:border-box!important;
    display:flex!important;
    grid-column:2!important;
    grid-row:1!important;
    flex-direction:column!important;
    justify-content:center!important;
    align-items:stretch!important;
    min-width:0!important;
    min-height:0!important;
    height:100%!important;
    margin:0!important;
    padding:4px 9px!important;
    overflow:hidden!important;
  }

  body:has(.ko-events-list) .compact-content-cards.ko-events-list .content-card.ko-event-item .org-dot {
    box-sizing:border-box!important;
    height:14px!important;
    min-height:14px!important;
    max-height:14px!important;
    margin:0!important;
    padding:0 5px!important;
    font-size:9.5px!important;
    line-height:12px!important;
  }

  body:has(.ko-events-list) .compact-content-cards.ko-events-list .content-card.ko-event-item h2 {
    display:block!important;
    min-width:0!important;
    min-height:0!important;
    max-height:none!important;
    margin:2px 0 1px!important;
    padding:0!important;
    overflow:hidden!important;
    font-size:14px!important;
    line-height:1.08!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
  }

  body:has(.ko-events-list) .compact-content-cards.ko-events-list .content-card.ko-event-item .card-meta {
    display:block!important;
    min-width:0!important;
    height:auto!important;
    min-height:0!important;
    max-height:25px!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    color:#667085!important;
    font-size:10.3px!important;
    line-height:1.14!important;
    white-space:normal!important;
    text-overflow:ellipsis!important;
  }

  body:has(.ko-events-list) .compact-content-cards.ko-events-list .content-card.ko-event-item .card-meta span {
    display:block!important;
    max-width:100%!important;
    margin-top:1px!important;
    overflow:hidden!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
  }

  body:has(.ko-events-list) .compact-content-cards.ko-events-list .content-card.ko-event-item .card-excerpt,
  body:has(.ko-events-list) .compact-content-cards.ko-events-list .content-card.ko-event-item .event-inline-engagement,
  body:has(.ko-events-list) .compact-content-cards.ko-events-list .content-card.ko-event-item .event-card-engagement {
    display:none!important;
  }

  /* =========================
     /AKTUALITY
     ========================= */
  body .posts-listing-section .posts-card-list {
    gap:7px!important;
  }

  body .posts-listing-section .posts-card-list .post-card {
    box-sizing:border-box!important;
    position:relative!important;
    height:72px!important;
    min-height:72px!important;
    max-height:72px!important;
    overflow:hidden!important;
    border:1px solid #e1e8e2!important;
    border-radius:12px!important;
  }

  body .posts-listing-section .posts-card-list .post-card::before {
    content:""!important;
    position:absolute!important;
    z-index:5!important;
    inset:0 auto 0 0!important;
    display:block!important;
    width:5px!important;
    background:var(--org,#788c7d)!important;
    border-radius:12px 0 0 12px!important;
    pointer-events:none!important;
  }

  body .posts-listing-section .posts-card-list .post-card.has-image {
    display:grid!important;
    grid-template-columns:128px minmax(0,1fr)!important;
    align-items:stretch!important;
    gap:0!important;
    padding:0!important;
  }

  body .posts-listing-section .posts-card-list .post-card.has-image > .post-card-image-link {
    box-sizing:border-box!important;
    display:block!important;
    width:128px!important;
    min-width:128px!important;
    max-width:128px!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    align-self:stretch!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    border:0!important;
    border-radius:0!important;
    background:#fff!important;
  }

  body .posts-listing-section .posts-card-list .post-card.has-image > .post-card-image-link > .post-card-image {
    display:block!important;
    width:100%!important;
    height:100%!important;
    min-width:0!important;
    min-height:0!important;
    max-width:none!important;
    max-height:none!important;
    margin:0!important;
    padding:0!important;
    object-fit:contain!important;
    object-position:center!important;
    background:#fff!important;
  }

  body .posts-listing-section .posts-card-list .post-card .post-card-body {
    box-sizing:border-box!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
    min-width:0!important;
    min-height:0!important;
    height:100%!important;
    margin:0!important;
    padding:5px 9px!important;
    overflow:hidden!important;
  }

  body .posts-listing-section .posts-card-list .post-card .post-card-meta {
    gap:6px!important;
    margin:0 0 2px!important;
    min-width:0!important;
  }

  body .posts-listing-section .posts-card-list .post-card .post-card-meta .org-dot {
    font-size:9.3px!important;
    line-height:1.05!important;
  }

  body .posts-listing-section .posts-card-list .post-card .post-card-meta time {
    font-size:9px!important;
    line-height:1.05!important;
  }

  body .posts-listing-section .posts-card-list .post-card h2 {
    display:block!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    font-size:14px!important;
    line-height:1.12!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
  }

  body .posts-listing-section .posts-card-list .post-card .card-excerpt {
    display:none!important;
  }

  body .posts-listing-section .posts-card-list .post-card.without-image {
    display:flex!important;
    min-height:72px!important;
    padding-left:5px!important;
  }
}

@media (max-width:360px) {
  body:has(.ko-events-list) .compact-content-cards.ko-events-list {
    --ko-list-card-h:64px;
    --ko-list-thumb-w:114px;
  }

  body:has(.ko-events-list) .compact-content-cards.ko-events-list .content-card.ko-event-item {
    grid-template-columns:114px minmax(0,1fr)!important;
    height:68px!important;
    min-height:68px!important;
    max-height:68px!important;
  }

  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 {
    width:114px!important;
    min-width:114px!important;
    max-width:114px!important;
    height:64px!important;
    min-height:64px!important;
    max-height:64px!important;
  }

  body .posts-listing-section .posts-card-list .post-card {
    height:64px!important;
    min-height:64px!important;
    max-height:64px!important;
  }

  body .posts-listing-section .posts-card-list .post-card.has-image {
    grid-template-columns:114px minmax(0,1fr)!important;
  }

  body .posts-listing-section .posts-card-list .post-card.has-image > .post-card-image-link {
    width:114px!important;
    min-width:114px!important;
    max-width:114px!important;
  }
}
