/* YouTube Feed */
.sfc-youtube-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.sfc-video-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sfc-video-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.sfc-video-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
}

.sfc-video-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.sfc-video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sfc-video-item:hover .sfc-video-thumbnail img {
    transform: scale(1.05);
}

.sfc-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.sfc-video-item:hover .sfc-play-icon {
    opacity: 1;
}

.sfc-video-meta {
    padding: 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.sfc-video-meta h3 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.sfc-video-meta h3 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.sfc-video-meta h3 a:hover {
    color: #0073aa;
}

.sfc-video-meta time {
    font-size: 12px;
    color: #999;
    margin-top: auto;
}

/* Instagram Feed */
.sfc-instagram-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.sfc-instagram-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    border-radius: 8px;
    background: #f0f0f0;
}

.sfc-instagram-item a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

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

.sfc-instagram-item:hover img {
    transform: scale(1.08);
}

.sfc-instagram-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 16px;
    backdrop-filter: blur(2px);
}

.sfc-instagram-item:hover .sfc-instagram-overlay {
    opacity: 1;
}

.sfc-instagram-overlay p {
    color: white;
    font-size: 13px;
    text-align: center;
    margin: 0;
    line-height: 1.4;
}

/* Instagram Embed Widget */
.sfc-instagram-embed {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.sfc-instagram-embed iframe {
    max-width: 100%;
    border-radius: 8px;
}

.sfc-instagram-embed blockquote {
    margin: 20px 0;
    border-left: 4px solid #E1306C;
    padding-left: 12px;
}

/* Error Message */
.sfc-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    padding: 12px;
    margin: 20px 0;
    text-align: center;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .sfc-youtube-feed {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .sfc-instagram-feed {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 8px;
    }

    .sfc-video-meta h3 {
        font-size: 12px;
    }

    .sfc-instagram-overlay p {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .sfc-youtube-feed {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .sfc-instagram-feed {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}
