/**
 * Related Posts Styles
 */

.related-posts-section {
    padding: 60px 10px;
    background-color: #fff;
    /* Light background to separate from content */
}

.related-container {
    max-width: 1200px;
    margin: 0 auto;
}

.related-section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    text-align: center;
    font-weight: 700;
    color: #333;
}

/* Grid Layout */
.related-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile: 1 post per row */
    gap: 30px;
}

/* Card Design */
.related-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.related-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Card Header (Mini Hero) */
.related-card-header {
    height: 180px;
    /* Approx 40% of height */
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* Push circle to bottom */
}

.related-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
}

.related-card:hover .related-card-overlay {
    background: rgba(0, 0, 0, 0.1);
    /* Lighten on hover */
}

/* Category Image (Floating Circle) */
.related-card-cat-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid #fff;
    overflow: hidden;
    z-index: 2;
    transform: translateY(40px);
    /* Halfway overlapping body */
    background: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.related-card-cat-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Card Body */
.related-card-body {
    padding: 50px 10px 30px;
    /* Top padding to account for overlapping circle */
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.related-card-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 12px;
    line-height: 1.4;
    color: #222;
    transition: color 0.3s ease;
}

.related-card:hover .related-card-title {
    color: #007bff;
    /* Theme accent color */
}

.related-card-excerpt {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.related-read-more {
    font-size: 0.9rem;
    font-weight: 600;
    color: #007bff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Grid */
@media (min-width: 992px) {
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
        /* 3 columns on desktop */
    }
}