/*
Theme Name: Hello Elementor Child
Template: hello-elementor
Version: 1.0
*/

/* Màu chủ đạo */
:root {
    --primary-color: #4482FF;
}

/* Container boxed tổng */
.boxed-container {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

/* Khung bài viết và Tin mới ngang hàng */
.main-content {
    display: flex;
    gap: 20px;
}

/* Khung bài viết */
.single-post-container {
    flex: 3;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: #333;
    font-family: Arial, sans-serif;
}

.post-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 15px;
}

.post-thumbnail img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
}

.post-content {
    line-height: 1.6;
    margin-bottom: 20px;
}

.post-tags .tag {
    background-color: #e0e0e0;
    padding: 5px 10px;
    border-radius: 15px;
    margin-right: 5px;
    color: #666;
    font-size: 12px;
}

/* Đường dẫn breadcrumb trong khung bài viết */
.breadcrumbs {
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #555;
    margin-bottom: 15px; /* Khoảng cách giữa breadcrumb và tiêu đề bài viết */
}

.breadcrumbs a {
    text-decoration: none;
    color: var(--primary-color); /* Màu chủ đạo */
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    color: #888;
}

.breadcrumbs a:focus {
    outline: none;
}

/* Tin mới bên phải */
.latest-news {
    flex: 1;
    font-family: Arial, sans-serif;
    color: #333;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.latest-news h2 {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

.latest-news ul {
    list-style: none;
    padding: 0;
}

.latest-news ul li {
    display: flex;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1); /* Vạch ngăn cách */
    padding-bottom: 10px;
}

.latest-news ul li a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.latest-news ul li img {
    width: 60px;
    height: 60px;
    margin-right: 10px;
    border-radius: 8px;
}

.latest-news ul li span {
    font-size: 14px;
    color: #333;
}

/* Bài viết liên quan dàn hàng ngang */
.related-posts {
    max-width: 100%;
    margin-top: 30px;
    font-family: Arial, sans-serif;
}

.related-posts h2 {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
}

.related-posts-grid {
    display: flex;
    gap: 20px;
}

.related-post-item {
    width: 100%;
    max-width: calc(25% - 15px);
    text-align: center;
    background-color: #fff;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden; /* Đảm bảo không tràn ra ngoài */
}

.related-post-item a {
    text-decoration: none;
    color: #333;
    display: block;
}

.related-post-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3; /* Đảm bảo ảnh có tỷ lệ 4:3 */
    object-fit: cover; /* Cắt ảnh theo tỷ lệ mà không bị biến dạng */
    border-radius: 8px;
    margin-bottom: 5px;
}

.related-post-item span {
    display: block;
    font-size: 14px;
}

/* Khoảng cách giữa chân bài viết liên quan và chân trang */
.related-posts {
    margin-bottom: 50px; /* Khoảng cách 50px */
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .related-posts-grid {
        flex-direction: column;
    }

    .related-post-item {
        max-width: 100%;
    }
}
