/* Reset CSS */
html, body {
    margin: 0;
    box-sizing: border-box;
    min-height: 100vh;
}

body {
    display: flex;
    flex-direction: column;
}

#site-content {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
    width: 100%;
    position: relative;
    z-index: 2;
}

* {
    box-sizing: border-box;
}

/* Container chính */
.archive .container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Layout cho trang archive */
.archive .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    width: 100%;
    position: relative;
    z-index: 1;
}

.archive .col-8 {
    width: 75%;
    padding: 0 20px;
}

.archive .col-4 {
    width: 25%;
    padding: 0;
}

/* Style cho danh sách bài viết */
.archive-header {
    margin-bottom: 30px;
}

.archive-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.archive-posts {
    margin-top: 0;
    margin-bottom: 30px;
}

/* Style cho bài viết */
.post {
    display: flex;
    margin-bottom: 30px;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: auto;
}

/* Style cơ bn cho sidebar */
.widget-area {
    background: #fff;
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.widget-area .widget {
    margin-bottom: 30px;
}

.widget-area .widget:last-child {
    margin-bottom: 0;
}

.widget-area .widget-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

/* Thumbnail bên trái */
.post-thumbnail {
    flex: 0 0 180px;
    margin-right: 15px;
}

.post-thumbnail img {
    width: 280px;
    height: 180px;
    max-height: 250px;
    object-fit: cover;
    border-radius: 4px;
}

/* Nội dung bên phi */
.post-content {
    flex: 1;
}

.post-title {
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 10px;
}

.post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.post-title a:hover {
    color: #007bff;
}

.post-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-meta {
    font-size: 12px;
    color: #999;
}

.post-meta span {
    margin-right: 15px;
}

.post-meta i {
    margin-right: 5px;
}

/* Recent Posts Widget Styles */
.recent-posts-widget {
    background: #fff;
    padding: 0;
    border-radius: 8px;
}

.recent-posts-widget .widget-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.recent-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-post-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.recent-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recent-post-thumbnail {
    flex: 0 0 50px;
    margin-right: 10px;
}

.recent-post-thumbnail img {
    width: 50px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
}

.recent-post-content {
    flex: 1;
}

.recent-post-title {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 5px;
}

.recent-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.recent-post-title a:hover {
    color: #007bff;
}

.recent-post-date {
    font-size: 12px;
    color: #666;
}

/* Style cho meta info và mod-type trên archive giống single */
.post-meta-info {
    font-size: 12px;
    color: #b0b0b0;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.post-views-meta {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 15px;
    color: #b0b0b0;
}
.post-views-number {
    color: #27ae60;
    font-weight: 600;
    font-size: 15px;
}
.post-views-icon {
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}
.separator {
    color: #d0d0d0;
    margin: 0 3px;
}
.post-time-meta {
    color: #b0b0b0;
    font-size: 13px;
}
.post-mod-types {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
}
.mod-type-icon {
    font-size: 18px;
    color: #22c55e;
}
.mod-type-label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}
.post-mod-types .mod-type-item {
    display: inline-block;
    padding: 3px 4px;
    border-radius: 16px;
    border: 1px solid #22c55e;
    background: #22c55e;
    color: #fff !important;
    text-decoration: none;
    transition: all 0.2s;
}
.post-mod-types .mod-type-item:hover {
    background: #16a34a;
    color: #fff !important;
    border-color: #16a34a;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .archive .container {
        padding: 0 15px;
    }

    .archive .row {
        flex-direction: column;
    }

    .archive .col-8,
    .archive .col-4 {
        width: 100% !important;
        padding: 0 15px;
    }

    .col-8 {
        order: 1;
    }

    .col-4 {
        order: 2;
    }

    .archive-header {
        margin-bottom: 20px;
    }

    .archive-title {
        font-size: 20px;
        padding-bottom: 8px;
    }

    .post {
        flex-direction: column;
        padding: 15px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        margin-bottom: 20px;
    }

    .post-thumbnail {
        width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
    }

    .post-thumbnail img {
        width: 100%;
        height: auto;
        max-height: 200px;
    }

    .post-content {
        padding: 0;
    }

    .post-title {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .post-excerpt {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .post-meta {
        font-size: 12px;
    }

    .post-meta span {
        margin-right: 10px;
    }

    .widget-area {
        padding: 15px;
        margin-top: 30px;
        border-top: 1px solid #eee;
    }

    .widget-area .widget {
        margin-bottom: 20px;
    }

    .widget-area .widget-title {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .recent-posts-widget {
        padding: 15px;
    }

    .recent-post-item {
        margin-bottom: 12px;
        padding-bottom: 12px;
    }

    .recent-post-thumbnail {
        flex: 0 0 40px;
    }

    .recent-post-thumbnail img {
        width: 50px;
        height: 60px;
    }

    .recent-post-title {
        font-size: 13px;
    }

    .recent-post-date {
        font-size: 11px;
    }

    .pagination {
        margin-top: 20px;
    }

    .pagination .page-numbers {
        padding: 5px 10px;
        font-size: 14px;
    }

    .post-meta-info {
        font-size: 12px;
        gap: 6px;
    }
    .post-mod-types {
        gap: 3px;
    }
    .mod-type-item {
        font-size: 12px;
        padding: 2px 8px;
    }
    .mod-type-label {
        font-size: 12px;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .archive .container {
        padding: 0 10px;
    }

    .archive-title {
        font-size: 18px;
    }

    .post-thumbnail {
        height: 180px;
    }

    .post-thumbnail img {
        height: 180px;
    }

    .post-title {
        font-size: 16px;
    }

    .post-excerpt {
        font-size: 13px;
    }

    .widget-area .widget-title {
        font-size: 15px;
    }

    .recent-post-title {
        font-size: 12px;
    }
}

/* Phân trang */
.pagination {
    margin: 30px 0;
    text-align: center;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 4px 8px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.pagination .page-numbers.current {
    background: #0073aa;
    color: #fff;
    border-color: #159ede;
}

.pagination .page-numbers:hover:not(.current) {
    background: #f5f5f5;
}