/* ========================================
   BLOG ARCHIVE LAYOUT STYLES
   ======================================== */

/* Banner toàn màn hình */
.bg {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}
.bg picture {
    width: 100%;
    height: 100%;
    display: block;
}

.bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Container  */
.blog-archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* Header Archive  */
.archive-header {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
}

/* Overlay  */
.bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.archive-header {
    position: relative;
    z-index: 2;
}

.archive-title {
    font-size: 56px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 15px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}
.sidebar-widget {
    background: #fff;
    padding: 25px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.archive-description {
    font-size: 18px;
    color: #ffffff;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

.blog-archive-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    align-items: start;
}

/* ========================================
   blog-archive (left)
   ======================================== */

.blog-archive-content {
    width: 100%;
	padding-block: 0px !important;
}

/* Grid layout cho blog cards */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* Blog */
.blog-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
}

/* Thumbnail */
.blog-card-thumbnail {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.blog-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-thumbnail img {
    transform: scale(1.1);
}

.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ffa500, #ff6b6b);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.3);
}

/* Content */
.blog-card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-category {
    margin-bottom: 12px;
}

.blog-card-category a {
    display: inline-block;
    padding: 4px 12px;
    background: #e8f4f8;
    color: #0073aa;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

.blog-card-category a:hover {
    background: #0073aa;
    color: #fff;
}

.blog-card-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
}

.blog-card-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s;
}

.blog-card-title a:hover {
    color: #0073aa;
}

.blog-card-meta {
    display: flex;
	flex-wrap:wrap;
    gap: 15px;
    font-size: 13px;
    color: #999;
    margin-bottom: 15px;
}

.blog-card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-card-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
    flex: 1;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

.read-more:hover {
    gap: 12px;
    color: #005177;
}

/* Pagination */
.blog-pagination {
    margin-top: 50px;
    display: flex;
    justify-content: center;
}

.blog-pagination .page-numbers {
    list-style: none;
    display: flex;
    gap: 10px;
    padding: 0;
    margin: 0;
}

.blog-pagination .page-numbers li {
    margin: 0;
}

.blog-pagination .page-numbers a,
.blog-pagination .page-numbers span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    background: #fff;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.blog-pagination .page-numbers a:hover {
    background: #0073aa;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 115, 170, 0.3);
}

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

/* No posts */
.no-posts {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

.no-posts i {
    font-size: 60px;
    color: #ccc;
    margin-bottom: 20px;
    display: block;
}

.no-posts p {
    font-size: 18px;
    color: #666;
}

/* ========================================
   SIDEBAR (BÊN PHẢI)
   ======================================== */

.blog-archive-sidebar {
    position: sticky;
    top: 20px;
}

/* Search Widget */
.search-widget .search-form {
    position: relative;
}

.search-input-wrapper {
    position: relative;
}

.search-field {
    width: 100%;
    padding: 12px 50px 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.search-field:focus {
    outline: none;
    border-color: #0073aa;
}

.search-submit {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.search-submit:hover {
    background: #005177;
}

/* Tags Widget */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud-item {
    display: inline-block;
    padding: 6px 14px;
    background: #f5f5f5;
    color: #666;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.3s;
}

.tag-cloud-item:hover {
    background: #0073aa;
    color: #fff;
    transform: translateY(-2px);
}

/* Current category highlight */
.category-list li.current-cat a {
    background: #0073aa;
    color: #fff;
}

.category-list li.current-cat .count {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media screen and (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 992px) {
    .blog-archive-wrapper {
        grid-template-columns: 1fr;
    }
    
    .blog-archive-sidebar {
        position: static;
        margin-top: 40px;
    }
    
    .blog-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media screen and (max-width: 768px) {
    /* Banner */
    .bg {
        height: 300px;
        margin-bottom: 40px;
    }
    
    .archive-title {
        font-size: 36px;
    }
    
    .archive-description {
        font-size: 15px;
    }
    
    /* Container */
    .blog-archive-container {
        padding: 0 15px 20px;
    }
    
    .blog-content {
        padding: 30px;
    }
    
    .blog-title {
        font-size: 28px;
    }
    
    .blog-meta {
        font-size: 13px;
        gap: 15px;
    }
    
    .sidebar-widget {
        padding: 20px;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .share-btn {
        justify-content: center;
    }
}

@media screen and (max-width: 480px) {
    /* Banner mobile */
    .bg {
        height: 250px;
        margin-bottom: 30px;
    }
    
    .archive-title {
        font-size: 28px;
    }
    
    .archive-description {
        font-size: 14px;
    }
    
    /* Content */
    .blog-archive-container {
        padding: 0 15px 20px;
    }
    
    .blog-card-title {
        font-size: 18px;
    }
    
    .blog-card-thumbnail {
        height: 180px;
    }
    
    .blog-pagination .page-numbers a,
    .blog-pagination .page-numbers span {
        min-width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

/* ========================================
   ANIMATION
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card {
    animation: fadeInUp 0.5s ease forwards;
}

.blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-card:nth-child(3) { animation-delay: 0.3s; }
.blog-card:nth-child(4) { animation-delay: 0.4s; }

.sidebar-widget .widget-title {
    margin-bottom: 12px;
}

.sidebar-widget .category-list {
    list-style: none;
    padding-left: 10px;
    border-left: dashed 0.5px;
}

.sidebar-widget .category-list li:not(:last-child) {
    margin-bottom: 10px;
}

.sidebar-widget .category-list li a {
    color: #1a1a1a;
}