/**
 * WLC Blog Post Styler - Blog Styles
 * Version: 1.0.0
 *
 * This stylesheet enhances the appearance of blog posts and blog listing pages
 * without affecting other parts of the site.
 */

/* ===== General Container and Wrapper Styles ===== */
.wlc-blog-container,
.blog-container {
    width: 100%;
    background-color: #f9f9f9;
    padding: 40px 0;
    margin: 0;
    font-family: 'Roboto', sans-serif;
    box-sizing: border-box;
}

.wlc-blog-wrapper,
.blog-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Apply box-sizing to all elements */
.wlc-blog-container *,
.wlc-blog-container *::before,
.wlc-blog-container *::after,
.blog-container *,
.blog-container *::before,
.blog-container *::after {
    box-sizing: border-box;
}

/* ===== Blog Title Styling ===== */
.wlc-blog-title,
.blog-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 36px;
    color: #333333;
    font-weight: 500;
    position: relative;
    padding-bottom: 15px;
}

.wlc-blog-title::after,
.blog-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #23a244;
}

/* ===== Blog Grid Layout ===== */
.wlc-blog-grid,
.blog-grid {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
    width: 100%;
    align-items: stretch;
}

/* Column Configuration */
.wlc-columns-1,
.blog-grid.columns-1 {
    grid-template-columns: 1fr;
}

.wlc-columns-2,
.blog-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.wlc-columns-3,
.blog-grid.columns-3,
.blog-grid {
    grid-template-columns: repeat(3, 1fr);
}

.wlc-columns-4,
.blog-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ===== Blog Card Styling ===== */
.wlc-blog-card,
.blog-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0;
    position: relative;
    min-height: 450px;
    transform: translateY(0);
    opacity: 1;
}

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

/* Image styling with hover effect */
.wlc-blog-image-container,
.blog-card img {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.wlc-blog-image,
.blog-image {
    width: 100%;
    height: 250px !important;
    min-height: 250px !important;
    max-height: 250px !important;
    object-fit: cover !important;
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
}

.wlc-blog-card:hover .wlc-blog-image,
.blog-card:hover img {
    transform: scale(1.05);
}

/* ===== Blog Content Styling ===== */
.wlc-blog-content,
.blog-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.wlc-blog-date,
.blog-date {
    font-size: 14px;
    color: #888;
    margin-bottom: 10px;
    display: block;
    font-weight: 500;
}

.wlc-blog-heading,
.blog-heading {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 15px;
    color: #333;
    line-height: 1.3;
    min-height: 3.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.wlc-blog-card:hover .wlc-blog-heading,
.blog-card:hover .blog-heading {
    color: #23a244;
}

.wlc-blog-excerpt,
.blog-excerpt {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
    min-height: 4.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wlc-blog-link,
.blog-link {
    color: #23a244;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-top: auto;
    transition: all 0.3s ease;
    padding: 8px 0;
    position: relative;
}

.wlc-blog-link::after,
.blog-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #23a244;
    transition: width 0.3s ease;
}

.wlc-blog-link:hover,
.blog-link:hover {
    color: #1c8035;
}

.wlc-blog-link:hover::after,
.blog-link:hover::after {
    width: 100%;
}

/* ===== Pagination Styling ===== */
.wlc-pagination,
.pagination {
    margin: 40px 0 20px;
    text-align: center;
}

.wlc-pagination .page-numbers,
.pagination-item {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    margin: 0 5px;
    background-color: #fff;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    font-weight: 500;
}

.wlc-pagination .page-numbers.current,
.pagination-item.active {
    background-color: #23a244;
    color: white;
}

.wlc-pagination .page-numbers:hover:not(.current),
.pagination-item:hover:not(.active) {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ===== No Blogs Message Styling ===== */
.wlc-no-blogs-message,
.no-blogs-message {
    background-color: #fff;
    border-radius: 8px;
    padding: 50px 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.wlc-no-blogs-icon,
.no-blogs-icon {
    margin-bottom: 25px;
}

.wlc-no-blogs-title,
.no-blogs-title {
    font-size: 26px;
    color: #333;
    margin-bottom: 15px;
}

.wlc-no-blogs-text,
.no-blogs-text {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ===== View All Button Styling ===== */
.wlc-view-more-container,
.view-all-container {
    text-align: center;
    margin: 40px 0;
}

.wlc-view-more-button,
.view-all-button {
    display: inline-block;
    background-color: #23a244;
    color: white;
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(35, 162, 68, 0.3);
}

.wlc-view-more-button:hover,
.view-all-button:hover {
    background-color: #1c8035;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(35, 162, 68, 0.4);
}

/* ===== Single Blog Post Styling ===== */
.wlc-single-blog-post .wlc-blog-container,
.wlc-single-blog-post .blog-container {
    background-color: #fff;
}

.wlc-single-blog-header {
    margin-bottom: 30px;
}

.wlc-single-blog-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
}

.wlc-single-blog-meta {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
    color: #777;
}

.wlc-single-blog-date {
    margin-right: 20px;
}

.wlc-single-blog-author {
    font-weight: 500;
}

.wlc-single-blog-featured-image {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.wlc-single-blog-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.wlc-single-blog-content {
    font-family: 'Merriweather', serif;
    font-size: 17px;
    line-height: 1.8;
    color: #444;
}

.wlc-single-blog-content p {
    margin-bottom: 1.5em;
}

.wlc-single-blog-content h2,
.wlc-single-blog-content h3,
.wlc-single-blog-content h4 {
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    color: #333;
}

.wlc-single-blog-content blockquote {
    border-left: 4px solid #23a244;
    padding: 15px 20px;
    margin: 30px 0;
    background-color: #f9f9f9;
    font-style: italic;
}

.wlc-single-blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 25px 0;
}

.wlc-single-blog-tags {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.wlc-single-blog-tags a {
    display: inline-block;
    background-color: #f0f0f0;
    color: #666;
    padding: 6px 12px;
    border-radius: 4px;
    margin-right: 8px;
    margin-bottom: 8px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.wlc-single-blog-tags a:hover {
    background-color: #23a244;
    color: white;
}

/* ===== Responsive Styles ===== */
@media (max-width: 1024px) {
    .wlc-columns-4,
    .blog-grid.columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .wlc-single-blog-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .wlc-columns-3,
    .wlc-columns-4,
    .blog-grid.columns-3,
    .blog-grid.columns-4,
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wlc-blog-title,
    .blog-title {
        font-size: 30px;
    }
    
    .wlc-single-blog-title {
        font-size: 1.8rem;
    }
    
    .wlc-single-blog-content {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .wlc-columns-2,
    .wlc-columns-3,
    .wlc-columns-4,
    .blog-grid.columns-2,
    .blog-grid.columns-3,
    .blog-grid.columns-4,
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .wlc-blog-title,
    .blog-title {
        font-size: 26px;
    }
    
    .wlc-blog-card,
    .blog-card {
        min-height: auto;
    }
    
    .wlc-single-blog-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .wlc-single-blog-date {
        margin-right: 0;
        margin-bottom: 5px;
    }
}