/* Blog Container & Layout */
.blog-container {
    /* max-width: 1200px;
    margin: 40px auto; */
    padding: 0 20px;
}

/* Blog Header */
.blog-header {
    text-align: center;
    margin-bottom: 50px;
    background-color: #f7fafd;
    padding: 40px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.blog-header h1 {
    font-size: 3.5em;
    color: #1a5276;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.blog-header p {
    font-size: 1.2em;
    color: #555;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Main Content Layout (Featured + Recent + Sidebar) */
.blog-main-content {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 2/3 cho nội dung chính, 1/3 cho sidebar */
    gap: 40px;
}

/* Featured Post Section */
.featured-post-section {
    margin-bottom: 50px;
}

.featured-post-card {
    display: flex;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.featured-post-image {
    flex: 1;
    min-height: 300px;
    background-size: cover;
    background-position: center;
    background-color: #eee; /* Fallback */
}

.featured-post-content {
    flex: 1.2;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-post-content h2 {
    font-size: 2.2em;
    color: #1a5276;
    margin-top: 15px;
    margin-bottom: 15px;
    line-height: 1.3;
}

.featured-post-content h2 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.featured-post-content h2 a:hover {
    color: #2e8b57;
}

.featured-post-content .post-excerpt {
    font-size: 1.1em;
    color: #555;
    line-height: 1.7;
    margin-bottom: 25px;
}

/* Recent Posts List & Grid */
.recent-posts-list h2 {
    font-size: 2.2em;
    color: #1a5276;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
    font-weight: 600;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.post-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.post-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #eee; /* Fallback */
    border-bottom: 1px solid #f0f0f0;
}

.post-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-content h3 {
    font-size: 1.6em;
    color: #1a5276;
    margin-top: 10px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.post-content h3 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.post-content h3 a:hover {
    color: #2e8b57;
}

.post-excerpt {
    font-size: 0.95em;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Categories & Meta Info */
.post-category {
    background-color: #e6f7ed;
    color: #2e8b57;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 10px;
}

.post-meta {
    font-size: 0.9em;
    color: #777;
    display: flex;
    justify-content: space-between;
    margin-top: auto; /* Push to bottom */
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.post-meta i {
    margin-right: 5px;
    color: #1a5276;
}

/* Read More Buttons/Links */
.read-more-btn {
    display: inline-block;
    background-color: #2e8b57;
    color: #fff;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
    margin-top: 20px;
}

.read-more-btn:hover {
    background-color: #256b43;
    transform: translateY(-2px);
}

.read-more-btn i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.read-more-btn:hover i {
    transform: translateX(3px);
}

.read-more-link {
    display: inline-block;
    color: #1a5276;
    text-decoration: none;
    font-weight: 600;
    margin-top: 15px;
    transition: color 0.3s ease;
}

.read-more-link:hover {
    color: #2e8b57;
    text-decoration: underline;
}

/* Blog Sidebar */
.blog-sidebar {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    align-self: flex-start; /* Keeps sidebar at top */
    position: sticky; /* Sticky sidebar */
    top: 20px; /* Khoảng cách từ top khi cuộn */
}

.sidebar-section {
    margin-bottom: 40px;
}

.sidebar-section h3 {
    font-size: 1.8em;
    color: #1a5276;
    margin-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    font-weight: 600;
}

.search-box {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.search-box input {
    flex-grow: 1;
    border: none;
    padding: 12px 15px;
    font-size: 1em;
    outline: none;
}

.search-box button {
    background-color: #1a5276;
    color: #fff;
    border: none;
    padding: 12px 18px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-box button:hover {
    background-color: #154260;
}

.categories-section ul,
.popular-posts-section ul {
    list-style: none;
    padding: 0;
}

.categories-section li,
.popular-posts-section li {
    margin-bottom: 12px;
}

.categories-section li a,
.popular-posts-section li a {
    text-decoration: none;
    color: #555;
    font-size: 1.1em;
    display: block;
    padding: 8px 0;
    border-radius: 5px;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.categories-section li a:hover,
.popular-posts-section li a:hover {
    color: #2e8b57;
    background-color: #f7fafd;
    padding-left: 10px;
}

/* No posts message */
.no-posts-message {
    text-align: center;
    color: #777;
    font-style: italic;
    padding: 50px 0;
    grid-column: 1 / -1; /* Take full width in grid */
}

/* Pagination */
.pagination {
    margin-top: 40px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.pagination a {
    display: inline-block;
    text-decoration: none;
    color: #1a5276;
    padding: 10px 15px;
    margin: 0 5px;
    border: 1px solid #d0e8ef;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.pagination a:hover {
    background-color: #e6f7ed;
    color: #2e8b57;
}

.pagination a.active {
    background-color: #2e8b57;
    color: #fff;
    border-color: #2e8b57;
    font-weight: bold;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .blog-main-content {
        grid-template-columns: 1fr; /* Stack columns on smaller screens */
    }

    .blog-sidebar {
        position: static; /* Remove sticky on smaller screens */
        top: auto;
    }

    .featured-post-card {
        flex-direction: column; /* Stack image and content */
    }

    .featured-post-image {
        min-height: 250px;
        height: 250px; /* Fixed height for image */
        width: 100%;
        border-radius: 12px 12px 0 0;
    }

    .featured-post-content {
        padding: 25px;
    }
    
    .blog-header h1 {
        font-size: 2.5em;
    }

    .blog-header p {
        font-size: 1em;
    }
}

@media (max-width: 768px) {
    .blog-container {
        margin: 20px auto;
        padding: 0 15px;
    }

    .blog-header {
        padding: 30px 15px;
        margin-bottom: 30px;
    }

    .blog-main-content {
        gap: 30px;
    }

    .recent-posts-list h2,
    .sidebar-section h3 {
        font-size: 1.8em;
    }

    .post-grid {
        grid-template-columns: 1fr; /* Single column on very small screens */
    }

    .featured-post-content h2 {
        font-size: 1.8em;
    }

    .featured-post-content .post-excerpt {
        font-size: 1em;
    }
}