
/* Boxen */
.archivalie-box {
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 20px;
  padding: 1.3rem;
  margin-top: 1.8rem;
}

.archivalie-box h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

/* Galerie */

.archivalie-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 130px));
  gap: 0.9rem;
  justify-content: center;
  align-items: start;
}

.archivalie-detail-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.archivalie-detail-item {
  margin: 0;
}

.archivalie-detail-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 20px;
  transition: transform .15s ease, box-shadow .15s ease;
}

.archivalie-detail-link:hover img {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}

.archivalie-detail-item figcaption {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: #777;
    text-align: center;
}

/* Lightbox */

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(17,17,17,0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 9999;
}

.lightbox[aria-hidden="false"] {
  display: flex;
}

.lightbox-figure {
  margin: 0;
  max-width: min(90vw, 1100px);
  max-height: 85vh;
  text-align: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 20px;
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 0.8rem;
  color: #f0f0f0;
  font-size: 0.95rem;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
}

.lightbox-prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255,255,255,0.2);
}

/* Mobile */

@media (max-width: 780px) {
  .archivalie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem 1rem;
  }

  .archivalie-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lightbox {
    padding: 1rem;
  }

  .lightbox-close {
    top: 0.75rem;
    right: 0.75rem;
  }

  .lightbox-prev {
    left: 0.5rem;
  }

  .lightbox-next {
    right: 0.5rem;
  }
}
