/* latest-posts.css — только стили для шорткода */

.latest-posts-shortcode {
    padding: 0px 20px 40px 20px;
    /*background: #f9f9f9;*/
    /*text-align: center;*/
}

.latest-posts-shortcode {
    /*padding: 60px 20px;*/
    /*background: #f9f9f9;*/
    /*text-align: center;*/
    color: #ffffff;
}

.latest-posts-shortcode H2 {
    /*padding: 60px 20px;*/
    /*background: #f9f9f9;*/
    text-align: center;
    color: #ffffff;
}

.latest-posts-shortcode .section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    color: #ffffff;
    position: relative;
    font-weight: 600;
    font-family: "Roboto", Sans-serif;
    font-size: 2.2em;
    font-weight: 500;
}

.latest-posts-shortcode .section-title::after {
    content: '';
    width: 44%;
    height: 4px;
    background: #ffffff;
    display: block;
    margin: 12px auto 0;
}

.latest-posts-grid-only {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

/* Карточка */
.latest-post-card {
    background: #fff;
    /*border: 1px solid #eee;*/
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.latest-post-card:hover {
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

.post-thumbnail {
    height: 180px;
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: none;
}

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

.post-title {
    margin: 0 0 8px;
    font-size: 1.1rem;
    line-height: 1.4;
    font-weight: 600;
}

.post-title a {
    color: #1a1a1a;
    text-decoration: none;
}

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

.post-categories {
    margin: 6px 0 10px;
    font-size: 0.8rem;
    color: #e63946;
    font-weight: 500;
}

.post-excerpt {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 12px;
    flex-grow: 1;
}

.read-more-btn {
    margin-top: auto;
    align-self: flex-start;
    display: inline-block;
    padding: 8px 16px;
    border: 2px solid #e63946;
    border-radius: 6px;
    color: #e63946;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    background: #e63946;
    color: white;
}

.view-all {
    text-align: center;
}

.btn-view-all {
    display: inline-block;
    padding: 12px 32px;
    background: none;
    color: white;
    font-weight: 600;
    text-decoration: none;
    border: solid 1px #ffffff;
    border-radius: 6px;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.btn-view-all:hover {
    background: #fff;
    color: #388E3C !important;
}

/* Адаптивность: 2×2 на планшете и телефоне */
@media (max-width: 991px) {
    .latest-posts-grid-only {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .latest-posts-shortcode .section-title {
        font-size: 1.7rem;
    }
}

@media (max-width: 480px) {
    .latest-posts-grid-only {
        gap: 15px;
    }
    .latest-posts-shortcode {
        padding: 40px 15px;
    }
    .post-thumbnail {
        height: 160px;
    }
    .btn-view-all {
        padding: 10px 24px;
        font-size: 0.95rem;
    }
}