/* ========================================
   Image Gallery Component
   ======================================== */

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    padding: 0;
}

.image-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0px 12px 14px -8px rgba(0,0,0,0.5);
}

.image-card:hover {
    box-shadow: 0px 12px 14px -8px rgba(0,0,0,0.75);
}

.image-card a {
    display: block;
    width: 100%;
    height: 100%;
}

.image-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.image-badge .material-symbols-outlined {
    font-size: 1.2rem;
}

.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    padding: 1rem;
}

.image-placeholder .material-symbols-outlined {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.image-placeholder p {
    margin: 0;
    font-size: 0.9rem;
}

/* Image Gallery Empty - Now uses generic .content-empty-state class */

/* Image Gallery Error */
.image-gallery-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--error-color);
}

.image-gallery-error .material-symbols-outlined {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.image-gallery-error p {
    margin: 0;
    font-size: 1rem;
}

.image-gallery-error .material-symbols-outlined {
    color: var(--error-color);
}

/* lightGallery Custom Styles - Padding entfernt, da es die Positionierung stört */

/* Backdrop Transparenz anpassen - weniger dunkel */
.lg-backdrop.in {
    opacity: 0.85 !important;
}

/* Gleichmäßige Zentrierung - entfernt ungleichmäßige Abstände */
.lg-outer .lg-inner {
    padding: 0 !important;
}

.lg-outer .lg-item {
    padding: 0 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.5rem;
    }
}
