/*
Theme Name: Flatsome Child
Template: flatsome
*/

/* ========================== */
/* Tối ưu CSS để tăng tốc độ */
/* ========================== */

/* Loại bỏ gạch chân Menu và Link */
a, .menu a {
    text-decoration: none !important;
}

/* Định dạng tiêu đề danh mục */
.category-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

.category-description {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

/* Cập nhật layout bài viết */
.post-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px auto;
    max-width: 1200px;
}

.post-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    transition: 0.3s;
}

.post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.post-link {
    color: #000;
    display: block;
    padding: 10px;
}

.post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Nội dung SEO danh mục có nút xem thêm */
.category-seo-content {
    max-height: 300px;
    overflow: hidden;
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.category-seo-content::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), white);
    transition: opacity 0.3s ease-in-out;
}

.category-seo-content.expanded {
    max-height: none;
}

.category-seo-content.expanded::after {
    opacity: 0;
}

.read-more-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px auto;
    padding: 1px 20px;
    font-size: 18px;
    color: white;
    background: linear-gradient(45deg, #0073aa, #005a87);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.read-more-btn:hover {
    background: linear-gradient(45deg, #005a87, #003f5c);
    transform: scale(1.05);
}

/* Phân trang */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.pagination a, .pagination span {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    font-size: 16px;
    color: #fff;
    background: #0a66c2;
    border-radius: 8px;
    transition: 0.3s;
    border: 2px solid #0a66c2;
}

.pagination a:hover {
    background: #084a94;
    transform: scale(1.1);
}

.pagination .current {
    background: #bb0000;
    border-color: #9a0000;
    transform: scale(1.1);
}

/* Responsive tối ưu */
@media (max-width: 768px) {
    .post-grid-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .post-thumbnail img {
        height: 220px;
    }
    
    .category-seo-content {
        max-width: 95%;
    }
    
    .pagination a, .pagination span {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}