/*
 * Bảng màu:
 * - Nền: #f4f7f6 (sáng, nhẹ)
 * - Nền thẻ: #ffffff (trắng tinh khôi)
 * - Chữ tiêu đề: #2a2a2a (xám đen, dễ đọc)
 * - Chữ mô tả: #6c757d (xám nhẹ)
 * - Điểm nhấn: #007bff (xanh lam, chuyên nghiệp)
 * - Shadow: rgba(0, 0, 0, 0.08)
 */

/* =========================================================================
 * Main Container
 * ========================================================================= */

.mrel-related-posts-section {
    margin: 4rem auto;
    padding: 3rem 2rem;
    background-color: #f4f7f6;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    max-width: 1200px; /* tránh quá rộng trên màn hình to */
}

.mrel-related-posts-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    
    /* Cập nhật để giống với tiêu đề Commune List */
    color: #ff8800; /* Màu cam tươi */
    text-transform: capitalize;
    display: block; /* Thêm display block để text-align có tác dụng */
    text-align: center; /* Căn giữa tiêu đề */
    position: relative;
    padding-bottom: 1rem;
}

.mrel-related-posts-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: #ff8800; /* Màu cam để đồng bộ */
    border-radius: 2px;
}

/* =========================================================================
 * Posts List & Item
 * ========================================================================= */

.mrel-related-posts-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.mrel-property-item {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), 
                box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.mrel-property-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.mrel-property-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease-in-out;
}

.mrel-property-item:hover img {
    transform: scale(1.05);
}

/* =========================================================================
 * Text Content
 * ========================================================================= */

.mrel-property-content-wrapper {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.mrel-property-title {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 0.75rem;
    transition: color 0.3s ease;
}

.mrel-property-title a {
    text-decoration: none;
    color: #2a2a2a;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.mrel-property-title a:hover {
    color: #007bff;
    text-decoration: underline;
}

.mrel-property-meta p {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 0;
    line-height: 1.5;
}

/* =========================================================================
 * Mobile Responsiveness
 * ========================================================================= */
@media (max-width: 768px) {
    .mrel-related-posts-section {
        padding: 2rem 1rem;
    }
    
    .mrel-related-posts-list {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .mrel-property-item img {
        height: 180px;
    }
}
