/* ── Related Posts – Advanced ───────────────────────────────────────── */
.related-posts {
    margin: 5rem 0;
    padding: 0 clamp(1rem, 4vw, 3rem);
}

/* Header */
.related-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-bottom: 1.25rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e8e5df;
}

.related-header h2 {
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0;
}

.related-all-link {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-accent, #2c5f2e);
    text-decoration: none;
    transition: opacity 0.2s;
}
.related-all-link:hover { opacity: 0.7; }

/* Grid */
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Card */
.related-card {
    background: #f8f7f4;
    border-radius: 12px;
    overflow: hidden;
    border: 0.5px solid #e2dfd8;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.09);
}

.related-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* Thumbnail */
.related-thumb {
    position: relative;
    width: 100%;
    padding-bottom: 62%;
    overflow: hidden;
    background: #e2dfd8;
}
.related-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.related-card:hover .related-thumb img {
    transform: scale(1.05);
}

.related-thumb-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    background: linear-gradient(135deg, #eceae4, #dedad2);
}

.related-cat-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #2c5f2e;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 4px;
}

/* Body */
.related-body {
    padding: 1rem 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.related-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.related-tag {
    font-size: 0.7rem;
    font-weight: 500;
    color: #2c5f2e;
    background: #eef3ee;
    padding: 2px 8px;
    border-radius: 20px;
}

.related-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #ccc;
}

.related-date {
    font-size: 0.7rem;
    color: #888;
}

.related-title {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.55rem;
    color: inherit;
}

.related-excerpt {
    font-size: 0.8rem;
    line-height: 1.65;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.9rem;
    flex: 1;
}

.related-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 0.5px solid #e2dfd8;
}

.related-read-time,
.related-views {
    font-size: 0.72rem;
    color: #999;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .related-grid .related-card:last-child {
        display: none; /* hide 3rd on tablet for clean 2-col layout */
    }
}

@media (max-width: 600px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
    .related-grid .related-card:last-child {
        display: flex;
    }
    .related-header h2 {
        font-size: 1.3rem;
    }
}

