/*
   YARPP Custom CSS - Background Image Layout
   Author: Jules
*/

.related-posts-container {
    margin: 80px 0;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.related-posts-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 30px 0;
    color: #1d1d1f;
    text-align: center;
}

.related-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.related-posts-item {
    position: relative;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 18px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.related-posts-item:hover {
    transform: scale(1.03);
}

/* Dark overlay for text readability */
.related-posts-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.1) 100%);
    z-index: 1;
}

.related-posts-link {
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Align content to the bottom */
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px;
    text-decoration: none;
    color: #fff;
    z-index: 2;
}

.related-posts-content {
    position: relative;
    color: #fff;
}

.related-posts-post-title {
    font-size: 1.3em;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 8px 0;
}

.related-posts-meta {
    font-size: 0.9em;
    font-weight: 400;
    opacity: 0.8;
}

.related-posts-separator {
    margin: 0 5px;
}
