/* Instagram Grid Styles for Ghost Theme */
.instagram-grid-container {
    margin: 2rem 0;
}

.instagram-grid-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.instagram-grid-header svg {
    width: 24px;
    height: 24px;
}

.instagram-grid-header span {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.instagram-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    width: 100%;
}

@media (min-width: 768px) {
    .instagram-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .instagram-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.instagram-grid-item {
    position: relative;
    background: #f3f4f6;
    border-radius: 8px;
    overflow: hidden;
    min-height: 300px;
}

/* Loading placeholder */
.instagram-grid-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    z-index: 1;
    transition: opacity 0.3s ease;
}

.instagram-grid-placeholder.hidden {
    opacity: 0;
    pointer-events: none;
}

.instagram-grid-placeholder-content {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    max-width: 80%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.instagram-grid-placeholder svg {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
}

.instagram-grid-placeholder p {
    margin: 0;
    color: #262626;
    font-weight: 600;
    font-size: 16px;
}

.instagram-grid-placeholder small {
    color: #8e8e8e;
    font-size: 12px;
}

/* Instagram embed adjustments */
.instagram-grid-item .instagram-media {
    margin: 0 !important;
    min-width: unset !important;
    max-width: 100% !important;
    width: 100% !important;
    position: relative;
    z-index: 2;
}

.instagram-grid-item iframe {
    max-width: 100% !important;
    width: 100% !important;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .instagram-grid-header {
        border-bottom-color: #374151;
    }
    
    .instagram-grid-header span {
        color: #f3f4f6;
    }
    
    .instagram-grid-item {
        background: #1f2937;
    }
}

/* Animation for loading state */
@keyframes instagram-pulse {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.6;
    }
}

.instagram-grid-placeholder.loading {
    animation: instagram-pulse 1.5s ease-in-out infinite;
}