/* ===== Frontend-Galerie (Responsive Grid) ===== */
.custom-gallery {
    margin: 0;
  -webkit-column-count: 3;
  -webkit-column-gap: 30px;
  -moz-column-count: 3;
  -moz-column-gap: 30px;
  column-count: 3;
  column-gap: 30px;
  width: 100%;
  height: 100%;
}

.custom-gallery-item {
    display: inline-flex;
	overflow:hidden;
margin-bottom:30px;
	min-height: 200px;
}

.custom-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.custom-gallery-item:hover img {
    transform: scale(1.05);
}
.mfp-title {display:none}
.custom-gallery-item .delete-gallery-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff0000;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    display: none;
}

.custom-gallery-item:hover .delete-gallery-image {
    display: block;
}

/* ===== Mobile-Anpassung (2 Bilder pro Zeile) ===== */
@media (max-width: 768px) {
    .custom-gallery {
        grid-template-columns: repeat(2, 1fr); /* Mobile: 2 Bilder pro Zeile */
    }
}

/* ===== Admin-Galerie (Backend) ===== */
.custom-gallery-admin #custom_gallery_preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.custom-gallery-admin .custom-gallery-item-admin {
    position: relative;
    width: 100px;
    height: 100px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.custom-gallery-admin .custom-gallery-item-admin img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.custom-gallery-admin .delete-gallery-image-admin {
    position: absolute;
    top: 0;
    right: 0;
    background: #ff0000;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    line-height: 20px;
    text-align: center;
    padding: 0;
}