/* Блог Ресанта 2.0 */

/* Верхний отступ крошек задает тема (6rem на десктопе — место под "флаг" логотипа) */
.blog-app .breadcrumbs {
    padding-bottom: 24px;
}

.blog-app .breadcrumbs ul {
    margin: 0;
}

.blog-app .blog-title {
    padding-bottom: 0;
    margin-bottom: 24px;
}

/* Список статей */

.blog-posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.blog-posts .pageless-wrapper {
    grid-column: 1 / -1;
    text-align: center;
}

.blog-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--bs-gray-200);
    border-radius: var(--bs-border-radius);
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.3s ease;
}

.blog-card:hover {
    box-shadow: var(--bs-box-shadow);
}

.blog-card__image img {
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card__image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: var(--bs-gray-100);
}

.blog-card__image--placeholder img {
    width: 55%;
    height: auto;
    opacity: 0.25;
    filter: grayscale(1);
}

.blog-card__body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 20px;
}

.blog-card__date {
    color: #aaa;
    font-size: 13px;
    margin-bottom: 8px;
}

.blog-card__title {
    font-size: 18px;
    line-height: 1.3;
    margin: 0 0 10px;
    padding: 0;
}

.blog-card__title a {
    color: var(--bs-body-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-card__title a {
    color: var(--bs-primary);
}

.blog-card__text {
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    margin-bottom: 12px;
}

.blog-card__more {
    margin-top: auto;
    font-size: 14px;
    color: var(--bs-primary);
    text-decoration: none;
}

.blog-card__more:hover {
    text-decoration: underline;
}

/* Показать еще и пагинация */

.pageless-link {
    display: inline-block;
    padding: 10px 24px;
    background: var(--bs-primary);
    color: #fff !important;
    font-weight: 600;
    border-radius: var(--bs-border-radius);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.pageless-link:hover {
    opacity: 0.85;
}

.blog-paging {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0 0 40px;
    padding: 0;
}

.blog-paging li a {
    display: block;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: var(--bs-border-radius);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.blog-paging li a:hover {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

.blog-paging li.selected a {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

/* Статья */

.blog-post h1 {
    padding-bottom: 0;
    margin-bottom: 8px;
}

.blog-post__date {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 28px;
}

.blog-post__text {
    font-size: 16px;
    line-height: 1.7;
}

.blog-post__text p {
    margin-bottom: 16px;
}

.blog-post__text h2,
.blog-post__text h3 {
    padding-bottom: 0;
    margin: 32px 0 16px;
}

.blog-post__text ul,
.blog-post__text ol {
    margin-bottom: 16px;
}

.blog-post__text img {
    max-width: 100%;
    height: auto;
    border-radius: var(--bs-border-radius);
    margin: 8px 0;
}

.blog-post__text blockquote {
    margin: 24px 0;
    padding: 16px 24px;
    border-left: 4px solid var(--bs-primary);
    background: var(--bs-gray-100);
    border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0;
}

.blog-post__text table {
    border-collapse: collapse;
    margin: 16px 0;
    max-width: 100%;
}

.blog-post__text table td,
.blog-post__text table th {
    border: 1px solid #ddd;
    padding: 8px 14px;
}

.blog-post__text iframe {
    max-width: 100%;
}

/* Теги под статьей (плагин tag) */

.blog-post .tags {
    margin-top: 32px;
    font-size: 14px;
    color: #aaa;
}

.blog-post .tags a {
    color: var(--bs-primary) !important;
    padding: 0 !important;
    text-decoration: none;
}

.blog-post .tags a:hover {
    color: var(--bs-primary) !important;
    text-decoration: underline;
}

/* Товарные вставки в статьях: сайдбара с фильтрами тут нет, на широких экранах 4 в ряд */
@media (min-width: 1200px) {
    .blog-post__text .row.row-cols-xl-3 > * {
        width: 25%;
    }
}

/* внутри вставок типографика статьи не действует (иначе распухают кнопки и картинки) */
.blog-post__text .product-item {
    line-height: var(--bs-body-line-height);
}

.blog-post__text .product-item img {
    margin: 0;
    border-radius: 0;
}

@media (max-width: 1199.98px) {
    .blog-posts {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767.98px) {
    .blog-app .breadcrumbs {
        padding-bottom: 16px;
    }

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