/* ===== ARCHIVE PAGE ===== */

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #fff;
}

.archive-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 18px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Grid: 4 Spalten, grössere Thumbnails, seitlicher Weissraum */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Jede Zelle: quadratisch erzwingen via padding-bottom Trick */
.gallery a {
    display: block;
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* Quadrat */
    text-decoration: none;
    overflow: hidden;
    background: #eee;
}

/* Bild füllt die Zelle vollständig, quadratisch gecroppt */
.gallery a img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hover: Titel einblenden */
.gallery a:hover img {
    transform: scale(1.07);
    opacity: 0.6;
}

.gallery a .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 9px;
    padding: 4px 5px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery a:hover .caption {
    opacity: 1;
}

/* Tablet: 3 Spalten */
@media (max-width: 1000px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        padding: 0 24px;
    }
}

/* Handy: 2 Spalten */
@media (max-width: 600px) {
    body { padding: 10px; }
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        padding: 0 12px;
    }
}


/* Gallery-Link oben, zentriert im Header */
.gallery-link {
  display: block;
  text-align: center;
  padding: 6px 0 4px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #222;
  text-decoration: none;
}
.gallery-link:hover {
  text-decoration: underline;
}
