/* Morgenwelt Rocks – Galerie (Kacheln + Lightbox) */

.mw-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.mw-gallery-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  background: #0c1c2b;
  box-shadow: 0 6px 18px rgba(12, 28, 43, 0.18);
  cursor: zoom-in;
}

.mw-gallery-item img {
  display: block;
  width: 100%;
  height: 460px;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.mw-gallery-item:hover img,
.mw-gallery-item:focus-visible img {
  transform: scale(1.06);
  opacity: 0.82;
}

.mw-gallery-item__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 34px 12px 10px;
  font-size: 0.85rem;
  color: #fff;
  text-align: left;
  background: linear-gradient(to top, rgba(12, 28, 43, 0.85), rgba(12, 28, 43, 0));
  pointer-events: none;
}

/* Lightbox */
.mw-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 28, 43, 0.96);
  padding: 24px;
}

.mw-lightbox[hidden] {
  display: none;
}

.mw-lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
}

.mw-lightbox__image {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 6px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
}

.mw-lightbox__caption {
  margin-top: 14px;
  color: #fff;
  text-align: center;
  font-size: 0.95rem;
  max-width: 720px;
}

.mw-lightbox__counter {
  margin-top: 6px;
  color: #e6d2ad;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.mw-lightbox__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.mw-lightbox__btn:hover,
.mw-lightbox__btn:focus-visible {
  background: #e78136;
}

.mw-lightbox__btn--prev {
  left: 16px;
}

.mw-lightbox__btn--next {
  right: 16px;
}

.mw-lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.mw-lightbox__close:hover,
.mw-lightbox__close:focus-visible {
  background: #e78136;
}

@media (max-width: 640px) {
  .mw-lightbox__btn {
    width: 42px;
    height: 42px;
    font-size: 1.3rem;
  }
  .mw-lightbox__btn--prev { left: 8px; }
  .mw-lightbox__btn--next { right: 8px; }
  .mw-gallery-item img { height: 360px; }
}
