/**
 * Gemeinsame CSS für PDF- und Bild-Galerien
 */

/* PDF-Galerie (Bestehend) */
.fast-pdf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px; margin: 20px 0; }
.pdf-box { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #333; }
.pdf-thumb { width: 100%; max-width: 140px; aspect-ratio: 3/4; border: 1px solid #ddd; background: #fff; display: flex; align-items: center; justify-content: center; }
.pdf-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pdf-label { font-size: 13px; text-align: center; margin-top: 10px; font-weight: 500; }

/* Bild-Galerie (Zusatz) */
/**
 * Erweiterte Bild-Galerie mit variablen Spalten und Größen
 */
/* VOLLSTÄNDIGER STABILER STAND: fast-gallery.css */

.fast-image-grid {
    display: grid;
    /*grid-template-columns: repeat(var(--gallery-cols, auto-fill), minmax(var(--gallery-min-width, 200px), 1fr)); */
	grid-template-columns: repeat(var(--gallery-cols, auto-fit), minmax(0, var(--gallery-min-width, 300px)));
    gap: 15px;
    width: 100%;
    justify-content: center;
}

.image-box {
    /* justify-self: center; */
    width: 100%;
    max-width: var(--gallery-min-width, 300px); 
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    background: #fff;
	margin: 0; /* Grid übernimmt das Positioning */
}

.image-box a { 
    display: block; 
    line-height: 0; /* WICHTIG: Verhindert Lücken unter dem Bild */
}

.image-box img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.image-label {
    padding: 10px 8px;
    text-align: center;
    font-size: 14px;
    background: #f9f9f9; /* Deine feste Farbe */
    border-top: 1px solid #eee;
    color: #333; /* Falls du hier auch eine spezifische Farbe hattest */
}

/* Size-Presets */
.size-thumb  { --gallery-min-width: 150px; }
.size-medium { --gallery-min-width: 300px; }
.size-big    { --gallery-min-width: 600px; }

#fast-lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9);
    align-items: center; justify-content: center;
}

.lightbox-content {
    max-width: 90%; max-height: 80%;
    border: 3px solid white;
}

.close, .prev, .next {
    position: absolute; color: white;
    font-size: 40px; font-weight: bold; cursor: pointer;
    user-select: none;
}

.close { top: 20px; right: 35px; }
.prev { left: 20px; }
.next { right: 20px; }

.caption {
    position: absolute; bottom: 50px;
    color: #ccc; text-align: center; width: 100%;
}