.gif-instagram-feed {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-width: 100%;
}

.gif-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.gif-item a {
    display: block;
    text-decoration: none;
}

.gif-thumb {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 비율 */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f0f0f0;
}

.gif-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px;
    opacity: 0;
    transition: opacity 0.25s ease, background 0.25s ease;
}

.gif-item:hover .gif-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.55);
}

.gif-caption {
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gif-date {
    color: rgba(255, 255, 255, 0.75);
    font-size: 11px;
}

.gif-video-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    pointer-events: none;
}

/* 반응형 */
@media (max-width: 768px) {
    .gif-instagram-feed {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .gif-instagram-feed {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
}
