/* Blog Page Styles - Native WP Columns Support */

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

/* Row Spacing & Grid Logic */
.blog-row {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    margin-bottom: 40px !important;
    gap: 30px !important; /* Gap between columns */
}

/* FIX: Prevent WordPress from injecting <p> tags that break the Grid layout */
.blog-row > p {
    display: none !important;
}

/* Ensure columns take full height */
.blog-row > .wp-block-column {
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    width: 100% !important;
    max-width: 100% !important;
}

/* Blog Card Styling */
.blog-post-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.blog-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* Image Styling */
.blog-post-card figure.wp-block-image {
    margin: 0;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    flex-shrink: 0;
}

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

.blog-post-card:hover img {
    transform: scale(1.05);
}

/* Content Area */
.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Typography */
.blog-post-card h3 {
    font-family: var(--font-heading, sans-serif);
    font-size: 19px;
    font-weight: 700;
    color: #0a192f;
    margin-top: 0;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-post-card p {
    font-family: var(--font-body, sans-serif);
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Read More Link */
.read-more {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.read-more a {
    color: #00baa3; /* Teal accent */
    font-weight: 600;
    text-decoration: none;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}

.read-more a:hover {
    color: #008c7a;
}

/* Utility & Transitions */
.hidden {
    display: none !important;
}

.blog-page-content {
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: translateY(0) scale(1);
    will-change: opacity, transform;
}

.blog-page-content.hidden {
    opacity: 0;
    transform: translateY(15px) scale(0.98);
    pointer-events: none;
}

/* Pagination Styling */
.blog-pagination {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
    gap: 15px !important; 
    display: flex;
    justify-content: center;
}

.pagination-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: #fff;
    border: 1px solid #eee;
    color: #333;
    text-decoration: none;
    border-radius: 50%;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 !important;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.pagination-item:hover {
    border-color: #00baa3;
    color: #00baa3;
    background: #fdfdfd;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.pagination-item.active {
    background: #020c1b !important;
    color: #fff !important;
    border-color: #020c1b !important;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(2, 12, 27, 0.3);
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .blog-row {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 767px) {
    .blog-row {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .blog-row {
        gap: 0 !important;
    }
    
    .pxl-blog-container {
        padding: 40px 15px;
    }
}
