/*
Theme Name: Flatsome Child
Description: Giao diện child theme flatsome hoàn thiện (Không sử dụng woocommerce)
Author: Hồ Danh
Template: flatsome
Version: 3.5
*/

/*************** ADD CUSTOM CSS HERE.   ***************/

/* --- RELATED POSTS --- */
.hvd-related-posts {
    margin-top: 2em;
    padding-top: 1.5em;
    border-top: 1px solid color-mix(in srgb, var(--primary-color), white 90%);
}
.hvd-related-title {
    font-size: 1.25em;
    font-weight: 700;
    margin-bottom: 0.5em;
    color: var(--primary-color);
}
.hvd-related-box {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--primary-color), white 90%);
    background: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.hvd-related-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border-color: color-mix(in srgb, var(--primary-color), white 70%);
}
.hvd-related-box .box-text {
    padding: 15px !important;
}
.hvd-related-box .post-title {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    color: var(--fs-color-base, #333);
}
.hvd-related-box .is-divider {
    margin: 10px 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
}
.hvd-related-box .from_the_blog_excerpt {
    color: #666;
    margin-bottom: 0;
}

@media only screen and (max-width: 48em) {
    /*************** ADD MOBILE ONLY CSS HERE  ***************/
    .hvd-related-posts .col {
        padding-bottom: 15px; /* Giảm khoảng cách dọc giữa các mục trên mobile */
    }
    .hvd-related-box {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 10px;
    }
    .hvd-related-box .box-image {
        width: 100px;
        min-width: 100px;
        margin-bottom: 0;
        margin-right: 15px;
        border-radius: 6px;
    }
    .hvd-related-box .image-cover {
        padding-top: 100% !important; /* Tỷ lệ ảnh 1:1 */
    }
    .hvd-related-box .box-text {
        padding: 0 !important;
        background: transparent !important;
    }
    .hvd-related-box .post-title {
        margin-bottom: 0;
        font-size: 1rem;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* Ẩn nếu quá 2 dòng */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    /* Ẩn dải phân cách và đoạn trích trên mobile cho gọn */
    .hvd-related-box .is-divider,
    .hvd-related-box .from_the_blog_excerpt {
        display: none !important;
    }
}