/* Related Posts Section */
.related-posts-section {
    margin-top: 4rem;
    margin-bottom: 3rem;
    padding-top: 3rem;
    border-top: 1px solid #e5e5e5;
}

.related-posts-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #262F4F;
    margin-bottom: 2rem;
    font-family: 'Lexend', sans-serif;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Related Post Card */
.related-post-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.related-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.related-post-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.related-post-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-post-card:hover .related-post-image img {
    transform: scale(1.05);
}

.related-post-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-post-date {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.related-post-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #262F4F;
    line-height: 1.5;
    margin: 0;
    font-family: 'Lexend', sans-serif;
    transition: color 0.3s ease;
}

.related-post-card:hover .related-post-title {
    color: #4A5EB8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .related-posts-section {
        margin-top: 3rem;
        padding-top: 2rem;
    }

    .related-posts-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .related-post-image {
        height: 180px;
    }

    .related-post-content {
        padding: 1.25rem;
    }

    .related-post-title {
        font-size: 1rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .related-posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    .related-posts-section {
        border-top-color: #333;
    }

    .related-post-card {
        background: #1a1a1a;
        box-shadow: 0 2px 8px rgba(255, 255, 255, 0.05);
    }

    .related-post-card:hover {
        box-shadow: 0 8px 20px rgba(255, 255, 255, 0.1);
    }

    .related-posts-title,
    .related-post-title {
        color: #fff;
    }

    .related-post-date {
        color: #aaa;
    }

    .related-post-image {
        background: #2a2a2a;
    }
}

/* Animation on Load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.related-post-card {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.related-post-card:nth-child(1) {
    animation-delay: 0.1s;
}

.related-post-card:nth-child(2) {
    animation-delay: 0.2s;
}

.related-post-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Empty State (when no related posts) */
.related-posts-empty {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}
