.instagram-feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.instagram-post {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 1;
}

.instagram-post img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.instagram-post:hover img {
    transform: scale(1.05);
}

.instagram-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.instagram-post:hover .instagram-overlay {
    opacity: 1;
}

.video-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 20px;
}

/* Fade-in Animation */
.instagram-post {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.instagram-post.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Loading State */
.instagram-post img {
    background: #f0f0f0;
}

.instagram-post img.loaded {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Refresh Button (falls gewünscht) */
.instagram-refresh-btn {
    margin: 20px 0;
    padding: 10px 20px;
    background: #E1306C;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.instagram-refresh-btn:hover {
    background: #C13584;
}

.instagram-refresh-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}


/* Video und Carousel Indikatoren */
.video-indicator,
.carousel-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* Datum im Overlay */
.instagram-date {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-top: 5px;
}

/* Fehleranzeige */
.instagram-feed-error {
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 5px;
    color: #856404;
    margin: 20px 0;
}

.instagram-feed-wrapper {
    width: 100%;
    margin: 0 auto;
}