/**
 * ============================================
 * BLOG POSTS GRID STYLES
 * ============================================
 * Styles cho shortcode: [blog_posts_grid]
 * Hiển thị danh sách bài viết blog với pagination
 */

/* ============================================
   SECTION 1: WRAPPER & GRID LAYOUT
   ============================================ */
.blog-posts-grid-wrapper {
    margin: 40px 0;
}

.blog-posts-grid-wrapper .blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* ============================================
   SECTION 2: BLOG POST CARD
   ============================================ */
.blog-posts-grid-wrapper .blog-post-item {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    height: 100%;
}

.blog-posts-grid-wrapper .blog-post-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ============================================
   SECTION 3: BLOG POST IMAGE
   ============================================ */
.blog-posts-grid-wrapper .blog-post-image {
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background-color: #f5f5f5;
}

.blog-posts-grid-wrapper .blog-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.blog-posts-grid-wrapper .blog-post-image:hover img {
    transform: scale(1.05);
}

.blog-posts-grid-wrapper .blog-post-image a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* ============================================
   SECTION 4: BLOG POST CONTENT
   ============================================ */
.blog-posts-grid-wrapper .blog-post-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* ============================================
   SECTION 5: BLOG POST TITLE
   ============================================ */
.blog-posts-grid-wrapper .blog-post-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.4;
    min-height: 50px;
}

.blog-posts-grid-wrapper .blog-post-title a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
    font-weight: 600;
}

.blog-posts-grid-wrapper .blog-post-title a:hover {
    color: #446084;
}

/* ============================================
   SECTION 6: BLOG POST META
   ============================================ */
.blog-posts-grid-wrapper .blog-post-meta {
    margin-bottom: 12px;
    font-size: 13px;
    color: #999;
}

.blog-posts-grid-wrapper .blog-post-date {
    display: inline-block;
}

/* ============================================
   SECTION 7: BLOG POST EXCERPT
   ============================================ */
.blog-posts-grid-wrapper .blog-post-excerpt {
    margin-bottom: 15px;
    color: #666;
    line-height: 1.6;
    font-size: 14px;
    flex-grow: 1;
}

/* ============================================
   SECTION 8: READ MORE LINK
   ============================================ */
.blog-posts-grid-wrapper .blog-post-readmore {
    margin-top: auto;
    padding-top: 15px;
}

.blog-posts-grid-wrapper .blog-post-link {
    color: #446084;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s ease;
}

.blog-posts-grid-wrapper .blog-post-link:hover {
    color: #35506b;
}

/* ============================================
   SECTION 9: PAGINATION
   ============================================ */
.blog-posts-grid-wrapper .blog-posts-pagination {
    margin-top: 40px;
    text-align: center;
}

.blog-posts-grid-wrapper .blog-posts-pagination .page-numbers {
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.blog-posts-grid-wrapper .blog-posts-pagination .page-numbers li {
    display: inline-block;
    margin: 0;
}

.blog-posts-grid-wrapper .blog-posts-pagination .page-numbers a,
.blog-posts-grid-wrapper .blog-posts-pagination .page-numbers span {
    display: inline-block;
    padding: 10px 16px;
    min-width: 44px;
    text-align: center;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #666;
    transition: all 0.3s ease;
    font-weight: 500;
}

.blog-posts-grid-wrapper .blog-posts-pagination .page-numbers a:hover {
    background-color: #446084;
    border-color: #446084;
    color: #fff;
}

.blog-posts-grid-wrapper .blog-posts-pagination .page-numbers .current {
    background-color: #446084;
    border-color: #446084;
    color: #fff;
    cursor: default;
}

.blog-posts-grid-wrapper .blog-posts-pagination .page-numbers .dots {
    border: none;
    padding: 10px 8px;
    cursor: default;
}

/* ============================================
   SECTION 10: RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .blog-posts-grid-wrapper .blog-posts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

@media (max-width: 1024px) {
    .blog-posts-grid-wrapper .blog-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .blog-posts-grid-wrapper .blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .blog-posts-grid-wrapper .blog-post-content {
        padding: 15px;
    }
    
    .blog-posts-grid-wrapper .blog-post-title {
        font-size: 16px;
        min-height: 44px;
    }
    
    .blog-posts-grid-wrapper .blog-posts-pagination .page-numbers a,
    .blog-posts-grid-wrapper .blog-posts-pagination .page-numbers span {
        padding: 8px 12px;
        min-width: 40px;
        font-size: 14px;
    }
}
