.blog-container {
    max-width: 80%;
    margin: 0 auto;
}


/* Hero Banner Section */

.hero-banner {
    background: #F7F8F9;
    color: #000;
    padding: 20px 0;
    margin-bottom: 40px;
}

.thumbnail-wrapper {
    overflow: hidden;
}

.hero-title-blog {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.hero-summary {
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 600px;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}


/* Left Sidebar */

.left-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}


/* Search Box */

.search-box {
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 8px;
}

.search-input {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: #007bf3;
}

.search-btn {
    background: #007bf3;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: #007af39d;
}


/* Categories Box */

.categories-box {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.categories-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #333;
}

.categories-list {
    list-style: none;
}

.category-item {
    margin-bottom: 4px;
}

.category-link {
    display: block;
    padding: 10px 12px;
    color: #555;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 14px;
}

.category-link:hover {
    background: #f5f5f5;
    color: #007bf3;
}

.category-item.active .category-link {
    background: #007bf3;
    color: white;
    font-weight: 500;
}


/* Right Content */

.right-content {
    min-height: 400px;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}


/* Post Card  */

.post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.post-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: visible;
    border-radius: 12px 12px 0 0;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 12px 12px 0 0;
    display: block;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #0891b2;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
}


/* Date */

.post-date {
    position: absolute;
    left: 20px;
    bottom: -18px;
    background: #e0f2ff;
    color: #0077c8;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid #b7e4ff;
    z-index: 10;
    white-space: nowrap;
}

.post-content {
    padding: 24px;
    padding-top: 30px;
    display: flex;
    flex-direction: column;
    min-height: 180px;
}

.post-title {
    font-size: 20px;
    font-weight: 600;
    color: #222;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-summary {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-link {
    color: #0891b2;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s;
    width: fit-content;
}

.post-link:hover {
    gap: 8px;
}


/* Pagination Styles */

.pagination-blog {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 40px;
    padding: 20px 0;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: #007bf3;
    color: white;
    border-color: #007bf3;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    gap: 8px;
}

.pagination-number {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-number:hover {
    background: #f5f5f5;
    border-color: #007bf3;
    color: #007bf3;
}

.pagination-number.active {
    background: #007bf3;
    color: white;
    border-color: #007bf3;
}


/* No Results */

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 16px;
}


/* ==================== RESPONSIVE DESIGN ==================== */


/* Tablet (768px - 1023px) */

@media (max-width: 1023px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .left-sidebar {
        display: none;
    }
    .right-content {
        order: 1;
    }
    .hero-title-blog {
        font-size: 2.2rem;
    }
    .hero-summary {
        font-size: 1rem;
    }
}


/* Mobile (< 768px)  */

@media (max-width: 767px) {
    .hero-banner {
        padding: 40px 0;
        margin-bottom: 24px;
    }
    .hero-title-blog {
        font-size: 1.75rem;
        margin-bottom: 8px;
    }
    .hero-summary {
        font-size: 0.95rem;
    }
    .content-wrapper {
        gap: 24px;
    }
    /* Sidebar stacks vertically */
    .left-sidebar {
        flex-direction: column;
        gap: 16px;
    }
    .search-box {
        min-width: unset;
    }
    .categories-box {
        min-width: unset;
    }
    .categories-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .category-link {
        text-align: center;
        font-size: 13px;
        padding: 10px 12px;
    }
    /* Posts */
    .posts-list {
        gap: 20px;
    }
    .post-card {
        border-radius: 10px;
    }
    .post-thumbnail {
        aspect-ratio: 16/9;
    }
    .post-date {
        left: 20px;
        bottom: 20px;
        transform: translateX(0);
        font-size: 12px;
        padding: 5px 12px;
    }
    .post-content {
        padding: 20px 16px;
    }
    .post-title {
        font-size: 17px;
        margin-bottom: 10px;
    }
    .post-summary {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 14px;
    }
    .post-link {
        font-size: 13px;
    }
    .post-badge {
        font-size: 11px;
        padding: 4px 10px;
        top: 10px;
        left: 10px;
    }
    /* Pagination */
    .pagination-blog {
        gap: 10px;
        flex-wrap: wrap;
    }
    .pagination-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    .pagination-numbers {
        gap: 6px;
    }
    .pagination-number {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
}


/* Mobile nhỏ (< 480px) */

@media (max-width: 479px) {
    .hero-banner {
        padding: 32px 0;
        margin-bottom: 20px;
    }
    .hero-title-blog {
        font-size: 1.5rem;
    }
    .hero-summary {
        font-size: 0.875rem;
    }
    .content-wrapper {
        gap: 20px;
    }
    .search-box {
        padding: 12px;
        flex-direction: column;
        gap: 10px;
    }
    .search-input {
        width: 100%;
    }
    .search-btn {
        width: 100%;
        justify-content: center;
        padding: 10px;
    }
    .categories-box {
        padding: 14px;
    }
    .categories-title {
        font-size: 15px;
        margin-bottom: 12px;
    }
    .categories-list {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .category-link {
        font-size: 13px;
        padding: 10px;
    }
    .posts-list {
        gap: 16px;
    }
    .post-card {
        border-radius: 8px;
    }
    .post-date {
        font-size: 11px;
        padding: 4px 10px;
        left: 12px;
        bottom: 12px;
    }
    .post-content {
        padding: 16px 12px;
    }
    .post-title {
        font-size: 15px;
        margin-bottom: 8px;
        line-height: 1.3;
    }
    .post-summary {
        font-size: 13px;
        margin-bottom: 12px;
    }
    .post-link {
        font-size: 12px;
    }
    .pagination-blog {
        gap: 8px;
    }
    .pagination-btn {
        padding: 7px 10px;
        font-size: 12px;
    }
    .pagination-number {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
    }
}


/* Landscape cho tablet */

@media (min-width: 768px) and (max-width: 1023px) and (orientation: landscape) {
    .categories-box {
        flex: 3;
    }
}


/* Print styles */

@media print {
    .search-box,
    .categories-box,
    .post-badge,
    .post-link,
    .pagination-blog {
        display: none;
    }
    .hero-banner {
        background: #007bf3;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    .post-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
        margin-bottom: 20px;
    }
    .content-wrapper {
        grid-template-columns: 1fr;
    }
}