/* Latest Posts by Category Shortcode Styles */
.latest-posts-by-category {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.category-post-item {
    background: #fff;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.category-post-item:hover {
    transform: translateY(-5px);
}

.post-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.post-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.category-post-item:hover .post-image::after {
    background: rgba(0, 0, 0, 0.4);
}

.post-content {
    padding: 20px 0 0 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.post-title {
    margin: 0 0 10px 0;
    line-height: 1.1;
    font-weight: 600;
    text-align: center;
    font-size: 20px;
    line-height: 1em;
}

.post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #007cba;
}

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

.category-name {
    display: inline-block;
    background: #edf0f4;
    color: #070f25;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.1;
    padding: 8px 10px;
}

.post-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-top: auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .latest-posts-by-category {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .latest-posts-by-category {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 15px;
    }

    .post-content {
        padding: 15px 0 0 0;
    }

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

@media (max-width: 480px) {
    .latest-posts-by-category {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .post-image {
        aspect-ratio: 16/9;
    }
}