/*
Theme Name: Pallet H&H
Author: H&H
Version: 1.0
*/
/* ================================
   BÀI VIẾT LIÊN QUAN
================================ */

.related-posts {
    max-width: 1150px;
    margin: 70px auto 50px;
    padding: 45px 40px 50px;
    background: #f8faf9;
    border: 1px solid #e1e6e3;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Tiêu đề */

.related-posts-header {
    text-align: center;
    margin-bottom: 38px;
}

.related-posts-header h2 {
    margin: 0;
    color: #004d40;
    font-size: 30px;
    font-weight: 700;
}

.related-posts-header span {
    display: block;
    width: 55px;
    height: 4px;
    margin: 15px auto 10px;
    background: #f7c33d;
    border-radius: 10px;
}

.related-posts-header p {
    margin: 0;
    color: #777;
    font-size: 15px;
}

/* GRID 6 BÀI */

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* CARD */

.related-post-card {
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
    transition: all 0.25s ease;
}

.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
}

/* ẢNH ĐỒNG NHẤT */

.related-post-image {
    display: block;
    width: 100%;
    height: 205px;
    overflow: hidden;
    background: #eee;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.related-post-card:hover .related-post-image img {
    transform: scale(1.04);
}

/* Không có ảnh */

.related-post-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #004d40;
    color: #f7c33d;
    font-weight: 700;
    font-size: 20px;
}

/* NỘI DUNG */

.related-post-content {
    padding: 20px;
}

.related-post-date {
    font-size: 13px;
    color: #999;
    margin-bottom: 10px;
}

.related-post-content h3 {
    margin: 0 0 12px;
    font-size: 19px;
    line-height: 1.4;
}

.related-post-content h3 a {
    color: #004d40;
    text-decoration: none;
}

.related-post-content h3 a:hover {
    color: #d99f00;
}

.related-post-content p {
    margin: 0 0 18px;
    color: #666;
    font-size: 14px;
    line-height: 1.7;
}

/* LINK */

.related-post-link {
    color: #00796b;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.related-post-link:hover {
    color: #d99f00;
}


/* ================================
   TABLET
================================ */

@media (max-width: 900px) {

    .related-posts {
        margin: 50px 20px;
        padding: 35px 25px;
    }

    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px;
    }

}


/* ================================
   MOBILE
================================ */

@media (max-width: 600px) {

    .related-posts {
        margin: 40px 15px;
        padding: 30px 15px;
        border-radius: 18px;
    }

    .related-posts-header h2 {
        font-size: 25px;
    }

    @media (max-width: 600px) {

    .related-posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .related-post-image {
        height: 210px;
    }

    .related-post-content {
        padding: 17px 18px 19px;
    }

    .related-post-date {
        font-size: 13px;
    }

    .related-post-content h3 {
        font-size: 19px;
        line-height: 1.4;
    }

    .related-post-content p {
        font-size: 14px;
        line-height: 1.6;
    }

    .related-post-link {
        font-size: 14px;
    }

}

    .related-post-image {
        height: 125px;
    }

    .related-post-content {
        padding: 13px;
    }

    .related-post-date {
        font-size: 11px;
    }

    .related-post-content h3 {
        font-size: 15px;
        line-height: 1.35;
    }

    .related-post-content p {
        font-size: 12px;
        line-height: 1.55;
    }

    .related-post-link {
        font-size: 12px;
    }

}