.instagram-section {
    width: 100%;
    margin-bottom: 60px;
    scroll-margin-top: 28px;
}

.instagram-section[hidden] {
    display: none !important;
}

.media-instagram-section {
    margin: 0;
    padding-top: 0;
}

.instagram-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 320px));
    justify-content: center;
    align-items: start;
    gap: 28px;
    width: 100%;
}

.instagram-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    color: inherit;
    text-decoration: none;
    background: #fff;
    border: 1px solid #dbdbdb;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.instagram-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.1);
}

.instagram-post-header {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #efefef;
    box-sizing: border-box;
}

.instagram-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: conic-gradient(from 210deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5, #feda75);
    position: relative;
    flex: 0 0 auto;
}

.instagram-avatar::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--header-bg);
    border: 2px solid #fff;
}

.instagram-user {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.instagram-username {
    color: #111;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.instagram-date {
    color: #8e8e8e;
    font-size: 0.68rem;
    line-height: 1.2;
}

.instagram-menu-dot {
    margin-left: auto;
    width: 18px;
    height: 18px;
    color: #262626;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
}

.instagram-media {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #050505;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.instagram-media img,
.instagram-media video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    background: #050505;
}

.instagram-media.instagram-media-auto {
    aspect-ratio: 4 / 5;
    background: #050505;
}

.instagram-media.instagram-media-auto img,
.instagram-media.instagram-media-auto video {
    height: 100%;
    background: #050505;
}

.instagram-media-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    font-size: 0.9rem;
    background: #eee;
}

.instagram-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.instagram-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 12px 8px;
    color: #111;
}

.instagram-action-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.instagram-action-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.instagram-action-icon.bookmark {
    margin-left: auto;
}

.instagram-content {
    padding: 0 12px 14px;
}

.instagram-meta {
    display: block;
    margin-bottom: 6px;
    color: #8e8e8e;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: none;
}

.instagram-caption {
    margin: 0;
    color: #1a1a1a;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 0;
}

.instagram-caption strong {
    font-weight: 700;
}

@media (max-width: 1024px) {
    .instagram-grid {
        grid-template-columns: repeat(2, minmax(250px, 320px));
    }
}

@media (max-width: 600px) {
    .instagram-grid {
        grid-template-columns: minmax(0, 100%);
    }

    .media-instagram-section {
        margin-top: 0;
        padding-top: 0;
    }

    .instagram-card {
        width: min(100%, 360px);
        margin: 0 auto;
    }
}
