/* Frontend Styles (block-style.css) */
.custom-posts-display {
    margin: 20px 0;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(var(--columns-desktop, 3), 1fr);
    gap: 22px;
    margin: 0;
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(var(--columns-tablet, 2), 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: repeat(var(--columns-mobile, 1), 1fr);
        gap: 20px;
    }
}

.custom-posts-display .post-item {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative
}

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

.custom-posts-display .post-thumbnail {
    position: relative;
    overflow: hidden;
    padding: 10px;
}

.custom-posts-display .post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.custom-posts-display .post-thumbnail>a {
    padding-bottom: 58%;
    display: block;
    overflow: hidden;
    width: 100%;
    position: relative;
}

.custom-posts-display .post-thumbnail>a img,
.custom-posts-display .post-thumbnail>a span {
    position: absolute;
    height: 100%;
    width: 100%;
    object-fit: cover;
    left: 0;
    top: 0;
}

.custom-posts-display .post-thumbnail>a>span.no-image {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 25px;
    background: #f1f1f1;
    width: 100%;
    color: #ddd;
}

.custom-posts-display .post-thumbnail,
.custom-posts-display .post-content {
    padding: 5px;
}

.custom-posts-display .post-title {
    padding: 0;
    background: transparent;
    margin-bottom: 0;
    font-size: 16px;
}


span.post-categories {
    position: absolute;
    right: 5px;
    top: 5px;
    padding: 4px 12px;
    background: #161b18;
    color: #fff;
}

span.post-categories * {
    color: #fff;
}

.custom-posts-display .post-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    line-height: 1.4;
    padding-bottom: 0;
    margin-bottom: 0;
}

.custom-posts-display .post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 16px;
}

.custom-posts-display .post-title a:hover {
    color: #0073aa;
}

.custom-posts-display .post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.custom-posts-display .post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.custom-posts-display .post-meta .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

.custom-posts-display .post-excerpt {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.6;
}


/* Message styling */
.custom-posts-display-message {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .post-content {
        padding: 10px;
    }

    .post-meta {
        flex-direction: column;
        gap: 10px;
    }

    .post-title {
        font-size: 16px;
    }

    .post-excerpt {
        margin-bottom: 15px;
    }
}