@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600&display=swap');

/* Cấu trúc Layout Box */
.es-blog-wrapper {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    color: #333;
}

/* Sidebar - Danh mục */
.es-blog-sidebar {
    width: 280px;
    flex-shrink: 0;
}
.es-cat-header {
    font-weight: 600;
    padding: 15px 20px;
    border: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}
.es-cat-header svg {
    transition: transform 0.3s ease;
}
.es-cat-header.collapsed svg {
    transform: rotate(180deg);
}
.es-cat-list {
    border: 1px solid #E5E5E5;
    border-top: none;
    padding: 0;
    margin: 0;
    list-style: none;
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.35s ease, border 0.35s ease;
}
.es-cat-list.collapsed {
    max-height: 0;
    border-color: transparent;
}
.es-cat-item {
    padding: 15px 20px;
    border-bottom: 1px solid #F9F9F9;
    display: flex;
    align-items: center;
    gap: 12px;
}
.es-cat-item:last-child {
    border-bottom: none;
}
.es-cat-item label {
    font-size: 13px;
    cursor: pointer;
    color: #333;
    font-weight: 500;
}

/* Tùy chỉnh Checkbox để có dấu tích đen */
.es-cat-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid #E5E5E5;
    background-color: #F4F4F4;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    outline: none;
    flex-shrink: 0;
}
.es-cat-item input[type="checkbox"]:checked {
    background-color: #fff;
    border-color: #333;
}
.es-cat-item input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 5px;
    width: 4px;
    height: 9px;
    border: solid #000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Vùng nội dung bài viết */
.es-blog-main {
    flex-grow: 1;
}
.es-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.es-card {
    display: flex;
    flex-direction: column;
}
.es-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    margin-bottom: 15px;
}
.es-card h3 {
    font-size: 16px !important;
    color: #888;
    font-weight: 400;
    line-height: 1.5;
    margin: 0 0 20px 0;
    flex-grow: 1;
}
.es-btn-detail {
    font-size: 10px !important;
    color: #333;
    border: 1px solid #333;
    background: transparent;
    padding: 10px 15px;
    text-transform: uppercase;
    text-decoration: none;
    align-self: flex-start;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    font-weight: 500;
}
.es-btn-detail:hover {
    background-color: #333;
    color: #fff;
}

/* Phân trang */
.es-pagination {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 8px;
}
.es-pagination .page-numbers {
    padding: 5px 12px;
    border: 1px solid #999;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background 0.3s;
}
.es-pagination .page-numbers:hover {
    background-color: #DEDED4;
    border-color: #DEDED4;
}
.es-pagination .current {
    background-color: #111;
    color: #fff;
    border-color: #111;
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .es-blog-wrapper {
        flex-direction: column;
        font-size: 13px;
    }
    .es-blog-sidebar {
        width: 100%;
        margin-bottom: 20px;
    }
    .es-blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .es-card h3 {
        font-size: 13px !important;
        margin-bottom: 10px;
    }
    .es-card img {
        height: 150px;
    }
    .es-btn-detail {
        font-size: 10px;
        padding: 8px 12px;
    }
}