/* News-Detail: Galerie direkt neben dem Artikeltext */
.article-content-layout {
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(220px, 280px);
  gap: 42px;
  align-items: start;
  max-width: 1040px;
}

.article-content-layout .article-body {
  max-width: none;
  min-width: 0;
}

.article-gallery-panel {
  min-width: 0;
  padding-top: 2px;
}

.article-gallery-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  color: #777;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.article-gallery-heading span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  color: #fff;
  background: #d71920;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0;
}

.article-content-layout .article-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: none;
  margin: 0;
}

.gallery-tile {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  background: #ededed;
  border: 0;
  cursor: zoom-in;
}

.gallery-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.22s ease;
}

.gallery-tile::after {
  position: absolute;
  right: 7px;
  bottom: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  content: "+";
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  opacity: 0.9;
  transition: background 0.2s ease, transform 0.2s ease;
}

.gallery-tile:hover img,
.gallery-tile:focus-visible img {
  transform: scale(1.045);
}

.gallery-tile:hover::after,
.gallery-tile:focus-visible::after {
  background: #d71920;
  transform: scale(1.06);
}

.gallery-tile:focus-visible {
  outline: 3px solid #d71920;
  outline-offset: 3px;
}

body.gallery-lightbox-open {
  overflow: hidden;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.gallery-lightbox.is-open {
  display: flex;
}

.gallery-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
}

.gallery-lightbox-frame {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(1180px, 100%);
  height: min(820px, calc(100vh - 56px));
}

.gallery-lightbox-image {
  display: block;
  max-width: calc(100% - 120px);
  max-height: calc(100% - 30px);
  object-fit: contain;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.gallery-lightbox-close,
.gallery-lightbox-nav {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  color: #fff;
  background: rgba(18, 18, 18, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.gallery-lightbox-close:hover,
.gallery-lightbox-close:focus-visible,
.gallery-lightbox-nav:hover,
.gallery-lightbox-nav:focus-visible {
  background: #d71920;
  border-color: #d71920;
  outline: none;
}

.gallery-lightbox-close {
  top: 0;
  right: 0;
  font-size: 30px;
  line-height: 1;
}

.gallery-lightbox-prev {
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 30px;
}

.gallery-lightbox-next {
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 30px;
}

.gallery-lightbox-counter {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  margin: 0;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
}

@media (max-width: 820px) {
  .article-content-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: 720px;
  }

  .article-gallery-panel {
    order: -1;
  }

  .article-content-layout .article-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .article-content-layout .article-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .gallery-lightbox {
    padding: 12px;
  }

  .gallery-lightbox-frame {
    width: 100%;
    height: calc(100vh - 24px);
  }

  .gallery-lightbox-image {
    max-width: 100%;
    max-height: calc(100% - 100px);
  }

  .gallery-lightbox-close,
  .gallery-lightbox-nav {
    width: 44px;
    height: 44px;
  }

  .gallery-lightbox-close {
    top: 4px;
    right: 4px;
  }

  .gallery-lightbox-prev {
    top: auto;
    bottom: 4px;
    left: calc(50% - 58px);
    transform: none;
  }

  .gallery-lightbox-next {
    top: auto;
    right: calc(50% - 58px);
    bottom: 4px;
    transform: none;
  }

  .gallery-lightbox-counter {
    bottom: 17px;
  }
}
