/* ===================================================================
   blog.css
   Сетка и карточки страницы блога / записей
   =================================================================== */

.blog-section {
    padding: 48px 0;
    background: #f0f4f0;
}

.blog-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

/* ── POST CARD ── */
.p-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    transition:
        box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
        transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}

.p-card:hover {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14);
    transform: translateY(-8px);
}

.p-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #c8dcc8;
    flex-shrink: 0;
}

.p-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: block;
    filter: brightness(0.97);
}

.p-card:hover .p-img img {
    transform: scale(1.1);
    filter: brightness(1);
}

.p-body {
    padding: 22px 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.p-body > div:first-child {
    font-size: 11.5px !important;
    color: var(--text-l) !important;
    margin-bottom: 10px !important;
    line-height: 1.4;
}

.p-title {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.52;
    color: var(--text);
    transition: color 0.25s;
    margin: 0;
    overflow: hidden;
}

.p-title a {
    color: inherit !important;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.p-card:hover .p-title {
    color: var(--green-d);
}

.p-desc {
    margin-top: 10px !important;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-m);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.p-btn {
    margin-top: 14px !important;
    font-size: 12px;
    font-weight: 700;
    color: var(--green);
    font-family: "Montserrat", sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: var(--accent);
    padding: 7px 15px;
    border-radius: 50px;
    transition: all 0.25s;
    white-space: nowrap;
    text-decoration: none;
    border: none;
    width: fit-content;
    max-width: 100%;
}

.p-card:hover .p-btn {
    background: var(--green);
    color: #fff;
    box-shadow: 0 4px 12px rgba(42, 125, 52, 0.3);
}

/* ── SINGLE POST BASIC ── */
.single-post .entry-content,
.single-post .post-content,
.single-post article.post {
    min-width: 0;
}

.single-post .entry-content img,
.single-post .post-content img,
.single-post article.post > div:first-of-type img {
    display: block;
    max-width: 100%;
    width: 100% !important;
    height: auto !important;
    max-height: 420px;
    object-fit: contain !important;
    object-position: center;
    border-radius: 12px;
}

.single-post article.post > div:first-of-type {
    background: #f3f5f3;
}

@media (max-width: 768px) {
    .blog-section,
    .blog-inner {
        padding-left: 0;
        padding-right: 0;
    }

    .blog-inner {
        padding: 0 16px;
    }

    .p-body {
        padding: 18px 18px 20px;
    }

    .p-title {
        font-size: 15px;
        line-height: 1.45;
    }

    .p-desc {
        font-size: 13px;
        line-height: 1.55;
    }

    .p-btn {
        width: 100%;
    }
}
