/* Ausschliesslich Advanced-Galerien im Beitragsinhalt.
   Mobil bleibt der bestehende horizontale Fotostreifen aus news.css erhalten. */
@media (min-width: 901px) {
  .brg14-single-news-content .wp-block-kadence-advancedgallery > .kb-gallery-type-grid {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none;
  }

  .brg14-single-news-content .wp-block-kadence-advancedgallery > .kb-gallery-type-grid > .kadence-blocks-gallery-item {
    grid-column: span 2;
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Rest 2: letzte Reihe mit zwei gleich breiten Bildern. */
  .brg14-single-news-content .wp-block-kadence-advancedgallery > .kb-gallery-type-grid:has(> .kadence-blocks-gallery-item:last-child:nth-child(3n + 2)) > .kadence-blocks-gallery-item:nth-last-child(-n + 2),
  /* Rest 1: letzte vier Bilder als 2+2 statt 3+1. */
  .brg14-single-news-content .wp-block-kadence-advancedgallery > .kb-gallery-type-grid:has(> .kadence-blocks-gallery-item:last-child:nth-child(3n + 1)) > .kadence-blocks-gallery-item:nth-last-child(-n + 4) {
    grid-column: span 3;
  }

  .brg14-single-news-content .wp-block-kadence-advancedgallery > .kb-gallery-type-grid > .kadence-blocks-gallery-item:only-child {
    grid-column: span 6 !important;
  }
}
