/* ============================================================
   GALERIE – gallery-grid / gallery-frame / gallery-img
   ============================================================ */

.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px 40px;
    justify-content: flex-start;
}

.gallery-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    width: 300px;
}

.gallery-img {
    width: 300px;
    height: 230px;
    object-fit: cover;
    display: block;
}

/* Hochformat-Bilder: eigene Klasse am figure-Element */
.gallery-frame.hoch {
    width: 230px;
}

.gallery-frame.hoch .gallery-img {
    width: 230px;
    height: 300px;
    object-fit: contain;
    background: #f5f5f5;
}

figcaption {
    padding: 8px 10px;
    font-size: 0.85em;
    text-align: center;
    color: #444;
    line-height: 1.4;
    width: 100%;
}

/* ============================================================
   TABLET (768px – 1023px)
   ============================================================ */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    .gallery-grid {
        gap: 10px;
        padding: 15px 20px;
    }

    .gallery-frame { width: 250px; }
    .gallery-img { width: 250px; height: 190px; }

    .gallery-frame.hoch { width: 190px; }
    .gallery-frame.hoch .gallery-img { width: 190px; height: 250px; object-fit: contain; background: #f5f5f5; }
}

/* ============================================================
   TABLET HOCHFORMAT + HANDY (bis 767px)
   ============================================================ */
@media screen and (max-width: 767px) {
    .gallery-grid {
        gap: 8px;
        padding: 10px 8px;
        justify-content: center;
    }

    .gallery-frame { width: 46%; min-width: 140px; }
    .gallery-img { width: 100%; height: 150px; }

    .gallery-frame.hoch { width: 46%; min-width: 140px; }
    .gallery-frame.hoch .gallery-img { width: 100%; height: 200px; object-fit: contain; background: #f5f5f5; }
}

/* ============================================================
   HANDY (bis 480px)
   ============================================================ */
@media screen and (max-width: 480px) {
    .gallery-frame { width: 46%; min-width: 130px; }
    .gallery-img { width: 100%; height: 120px; }

    .gallery-frame.hoch .gallery-img { height: 170px; object-fit: contain; background: #f5f5f5; }
}
