/**
 * Latest Posts Block Styles
 */

.latest-posts-block {
    margin: 40px 0;
}

.latest-posts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.latest-posts-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.latest-posts-view-all {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--e-global-color-primary, #0073aa);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.latest-posts-view-all:hover {
    background-color: var(--e-global-color-secondary, #005177);
    color: #fff;
}

.latest-posts-grid {
    display: grid;
    grid-gap: 30px;
}

.latest-posts-grid.columns-1 {
    grid-template-columns: 1fr;
}

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

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

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

.latest-post-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.latest-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.latest-post-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.latest-post-thumbnail {
    position: relative;
    overflow: hidden;
}

.latest-post-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.latest-post-card:hover .latest-post-image {
    transform: scale(1.05);
}

.latest-post-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.latest-post-title {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.latest-post-title a {
    color: var(--e-global-color-text, #333);
    text-decoration: none;
}

.latest-post-title a:hover {
    color: var(--e-global-color-primary, #0073aa);
}

.latest-post-excerpt {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.latest-posts-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-style: italic;
}

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

.data-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.data-pagination .page-numbers a,
.data-pagination .page-numbers span {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    transition: all 0.2s ease;
}

.data-pagination .page-numbers a:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.data-pagination .page-numbers .current {
    background: #00578d;
    border-color: #00578d;
    color: white;
}

/* Data card meta styling - consistent with existing cards */
.data-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    
}

.data-meta-left {
    display: flex;
    align-items: center;
}

.data-meta-right {
    display: flex;
    align-items: center;
}

.data-meta-date {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.data-meta-date svg {
    margin-right: 5px;
    width: 16px;
    height: 16px;
}

.data-view-btn {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    color: #343434;
    padding: 4px 10px;
    
}

.data-view-btn svg {
    margin-left: 5px;
    width: 16px;
    height: 16px;
    
}



/* Responsive styles */
@media (min-width: 768px) {
    .latest-posts-grid.columns-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .latest-posts-grid.columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .latest-posts-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .latest-post-card-inner {
        flex-direction: row;
    }
    
    .latest-post-thumbnail {
        width: 40%;
        min-height: 100%;
    }
    
    .latest-post-image {
        height: 100%;
        object-fit: cover;
    }
    
    .latest-post-content {
        width: 60%;
    }
}

@media (min-width: 992px) {
    .latest-posts-grid.columns-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .latest-posts-grid.columns-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}
