

/* MODAL SHOWS ///////////////////////////////  */
.gallery-grid { width: 75%; max-width: 1300px; }

.gallery-grid .row {display: flex;
    flex-wrap: wrap;
    justify-content: center;
    }

/* THUMBNAIL GRID --------------------  */
.thumb { text-align: center; margin-bottom: 50px; cursor: pointer; }
.thumb img { width: 100%; min-width: 200px; max-width: 400px; border: 1px solid lightgrey; box-shadow: 2px 6px 7px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
.thumb img:hover { transform: scale(1.05); box-shadow: 3px 10px 14px rgba(0,0,0,0.2); }

.thumb .caption { display: none; } /* Untertitel im Grid nicht anzeigen */


/* MODAL Fenster -------------------------  */

#imageModal { z-index: 1050; overflow-y: auto !important; }

#imageModal .modal-dialog { z-index: 1051; width: 80%; max-width: 1200px; height: 92vh; margin: 5vh auto !important; }
#imageModal .modal-content { z-index: 1052; height: 100%; border-radius: 12px; background: #fff; }
#imageModal .modal-header { z-index: 1053; border-bottom: 0; height: 0; padding: 0; }
#imageModal .modal-header .close { z-index: 1054; font-size: 2.8em; padding: 20px 25px 0; color: #000; }

#imageModal .modal-body { width: 100%; height: 95%; margin: 0; padding: 0 5% 30px 5%; max-height: none !important;
	align-items: center;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
	box-sizing: border-box;
	}
#imageModal .modal-body img { display: block; width: 90%; max-height: 60vh; height: auto; margin: 0 auto;
	object-fit: contain;
	flex-shrink: 0;
	opacity: 1;
	transition: opacity 0.3s ease-in-out;
	}
#imageModal .modal-body img.is-hidden { opacity: 0; } /* Bild + Fade-Effekt beim Bildwechsel */

/* Bildtitel */
#imageModal .modal-content p { position: relative; text-align: center; font-style: italic; font-size: 1em; margin: 15px 0 0; }
#imageModal #modalCaption { opacity: 1; transition: opacity 0.3s ease-in-out; }
#imageModal #modalCaption.is-hidden { opacity: 0; }


/* Modal Fade Transition (nur für dieses Modal) */
#imageModal.fade .modal-dialog { transform: none !important; transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out; }
#imageModal.fade { transition: opacity 0.5s ease-in-out; }
#imageModal.fade.in .modal-dialog { opacity: 1; }

/* Backdrop liegt ausserhalb von #imageModal, daher global */
.modal-backdrop { z-index: 1040 !important; }
.modal-backdrop.fade { transition: opacity 0.5s ease-in-out; }


/* NAVIGATION  Arrows -------------------------  */
#imageModal .modal-nav { position: absolute; z-index: 1055; top: 45vh; width: 60px; height: 60px; padding: 7px 18px; font-size: 36px; color: #fff;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    transition: background 0.3s ease;
}
#imageModal .modal-nav:hover { background: rgba(0, 0, 0, 0.8); color: #f46363; }

#imageModal .modal-nav-prev { left: -9%; transform: scaleX(-1); } /* horizontal gespiegelt */
#imageModal .modal-nav-next { right: -9%; }




/* M E D I A Queries ------------------------  */

/* max 1200 px */
@media (max-width: 1199px) {
#imageModal .modal-dialog { width: 82%; max-width: 900px; margin: 30px auto; }
}

/* max 992 px */
@media (max-width: 991px) {
.show-grid { width: 80%; }
.thumb img { width: 90%; }
#imageModal .modal-dialog { width: 80%; }
#imageModal .modal-nav { top: 320px; width: 50px; height: 50px; font-size: 28px; padding: 6px 15px; }
#imageModal .modal-nav-prev { left: 4%; }
#imageModal .modal-nav-next { right: 4%; }
}

/* max 768 px */
@media (max-width: 767px) {
.thumb { margin-bottom: 60px; }
.thumb img { width: 80%; max-width: 350px; }
#imageModal .modal-dialog { width: 85%; margin: 10px auto; }
#imageModal .modal-body img { width: 95%; }
#imageModal .modal-nav { top: 270px; font-size: 26px; padding: 8px 15px; }
}

/* max 575 px */
@media (max-width: 575px) {
.thumb img { width: 90%; }
#imageModal .modal-dialog { width: 90%; }
#imageModal .modal-nav { top: 270px; font-size: 24px; padding: 10px 15px; }
}

/* max 479 px */
@media (max-width: 479px) {
.show-grid { width: 95%; }
.thumb { margin-bottom: 50px; }
#imageModal .modal-dialog { width: 95%; }
#imageModal .modal-body { height: 90%; }
#imageModal .modal-nav { top: 270px; }
#imageModal .modal-nav-prev { left: 1.5%; }
#imageModal .modal-nav-next { right: 1.5%; }
}