/* 프론트엔드 관련 글 스타일 */
.related-posts-container {
    /* margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007cba; */
}

.related-posts-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.related-posts-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.related-post-item {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e1e5e9;
}

.related-post-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.related-post-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.related-post-link:hover {
    text-decoration: none;
    color: inherit;
}

.related-post-content {
    padding: 15px;
}

.related-post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.related-post-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    margin-right: 8px;
}

.trending-badge {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 5px rgba(255, 107, 107, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 15px rgba(255, 107, 107, 0.6);
    }
}

.related-post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.reading-time {
    font-size: 11px;
    color: #007cba;
    background: #e8f4fd;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 500;
}

.related-post-date {
    font-size: 12px;
    color: #999;
}

/* 중간과 하단 위치별 스타일 조정 */
.related-posts-middle {
    border-left-color: #28a745;
}

.related-posts-bottom {
    border-left-color: #dc3545;
    margin-top: 40px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .related-posts-container {
        margin: 20px 0;
        padding: 15px;
    }

    .related-posts-title {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .related-posts-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .related-post-title {
        font-size: 14px;
    }

    .related-post-excerpt {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }
}

/* 테마 호환성을 위한 추가 스타일 */
.related-posts-container * {
    box-sizing: border-box;
}

/* 로딩 스켈레톤 스타일 */
.related-posts-skeleton {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007cba;
}

.skeleton-title {
    width: 200px;
    height: 20px;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin: 0 auto 20px auto;
}

.skeleton-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.skeleton-item {
    background: white;
    border-radius: 6px;
    padding: 15px;
    border: 1px solid #e1e5e9;
}

.skeleton-item::before {
    content: '';
    display: block;
    width: 100%;
    height: 16px;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 10px;
}

.skeleton-item::after {
    content: '';
    display: block;
    width: 80%;
    height: 12px;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* 반응형 스켈레톤 */
@media (max-width: 768px) {
    .skeleton-items {
        grid-template-columns: 1fr;
    }
}
