
/* Страница блога */
section.section.blog-page {
    margin-top: 40px !important;
}

.blog-page .section-title {
    margin-bottom: 20px;
    color: #003543;
    font-size: 48px;
    font-weight: 500;
}

/* ========================================
   ФИЛЬТРЫ
   Горизонтальная прокрутка при переполнении
======================================== */

.blog-page .blog-filters {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 9px;
    max-width: 100%;
    margin-bottom: 40px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}


.blog-page .blog-filters {
    cursor: grab;
    user-select: none;
}

.blog-page .blog-filters.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.blog-page .blog-filters a {
    user-select: none;
    -webkit-user-drag: none;
}


.blog-page .blog-filters::-webkit-scrollbar {
    display: none;
}

.blog-page .blog-filters__item {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: 1px solid #C0D8DF;
    border-radius: 10px;
    background: #fff;
    color: #116C83;
    font-size: 16px;
    text-decoration: none;
    white-space: nowrap;
    transition:
        border-color 0.2s ease,
        color 0.2s ease,
        background-color 0.2s ease;
}

.blog-page .blog-filters__item:hover {
    border-color: #0196BB;
    color: #0196BB;
    text-decoration: none;
}

.blog-page .blog-filters__item.is-active,
.blog-page .blog-filters__item.is-active:hover {
    border-color: #0196BB;
    background: #0196BB;
    color: #fff;
}

/* ========================================
   СЕТКА КАРТОЧЕК
   Первые две — по половине строки,
   остальные — по трети строки
======================================== */

.blog-page .blog-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 15px;
    align-items: stretch;
    margin-top: 40px;
}

.blog-page .blog-card {
    display: flex;
    flex-direction: column;
    grid-column: span 2;
    min-width: 0;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
    padding: 20px;
    border: 1px solid #C0D8DF;
    border-radius: 10px;
    background: #fff;
    transition: none;
}

.blog-page .blog-card--featured {
    grid-column: span 3;
}

/* ========================================
   ИЗОБРАЖЕНИЕ
======================================== */

.blog-page .blog-card img {
    display: block;
    width: 100%;
    height: 25vh;
    object-fit: cover;
    object-position: center;
    border-radius: 6px;
    transform: none !important;
    transition: none !important;
}

.blog-page .blog-card__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.blog-page .blog-card .news__title {
    margin: 7px 0;
    color: #003543;
    font-size: 23px;
    font-weight: 500;
    line-height: 1.3;
    text-align: left;
}

.blog-page .blog-card .blog-card__title-link {
    position: relative;
    z-index: 1;
    color: #003543 !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-page .blog-card {
    position: relative;
}

.blog-page .blog-card .blog-card__title-link {
    position: static;
    color: #003543 !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Растягиваем ссылку заголовка на всю карточку */
.blog-page .blog-card .blog-card__title-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    cursor: pointer;
}

/* Подсветка заголовка при наведении на всю карточку */
.blog-page .blog-card:hover .blog-card__title-link {
    color: #0196BB !important;
}

/* Подсветка при наведении непосредственно на ссылку */
.blog-page .blog-card .blog-card__title-link:hover {
    color: #0196BB !important;
}


.blog-page .blog-card__badge {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    /* margin: 7px 0; */
    padding: 3px 6px;
    border: 1px solid #0197BC;
    border-radius: 5px;
    background: #fff;
    color: #0197BC;
    font-size: 12px;
    font-weight: 500;
}

.blog-page .blog-card:hover .blog-card__badge {
    border-color: #0197BC;
    background: #fff;
    color: #0197BC;
}

/* ========================================
   ОПИСАНИЕ
======================================== */

.blog-page .blog-card .news__desc {
    flex: 1;
    margin: 0 0 16px;
    color: #577B84;
    font-size: 16px;
    font-weight: 400;
    line-height: 18px;
    text-align: left;
}

.blog-page .blog-card:hover .news__desc {
    color: #577B84 !important;
}

.blog-page .blog-card .news__card-bottom {
    display: flex;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #C0D8DF;
    color: #99AEB4;
    font-size: 16px;
    font-weight: 400;
}

.blog-page .news__card-bottom p {
    display: flex;
    margin: 0 !important;
    color: #99AEB4;
    gap: 3px;
    align-items: center;
    gap: 5px;
}

/* Сохраняем цвет метаданных при наведении */
.blog-page .blog-card:hover .news__card-bottom,
.blog-page .blog-card:hover .news__card-bottom p,
.blog-page .blog-card:hover .news__time,
.blog-page .blog-card:hover .news__date {
    color: #99AEB4 !important;
}

/* Контейнер метаданных, если присутствует в HTML */
.blog-page .news__card-bottom div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ========================================
   КНОПКА «ЧИТАТЬ»
======================================== */

.blog-page .blog-card .blog-card__read {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 2px 7px;
    border: 1px solid #E6F4F8;
    border-radius: 4px;
    background: #E6F4F8;
    color: #0196BB;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
}

/* Эффект только при наведении на кнопку */
.blog-page .blog-card .blog-card__read:hover {
    border-color: #0196BB;
    background: transparent;
    color: #0196BB;
    text-decoration: none;
}

/* Наведение на карточку не меняет кнопку */
.blog-page .blog-card:hover .blog-card__read:not(:hover) {
    border-color: #E6F4F8;
    background: #E6F4F8;
    color: #0196BB;
}

/* Движение стрелки */
.blog-page .blog-card__read span {
    display: inline-block;
    transition: transform 0.3s ease;
}

.blog-page .blog-card__read:hover span {
    transform: translateX(4px);
}


.blog-page .wp-pagenavi {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 40px 0;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 16px;
}

/* Скрываем подпись и текстовые ссылки первой и последней страниц */
.blog-page .wp-pagenavi .pages,
.blog-page .wp-pagenavi a.first,
.blog-page .wp-pagenavi a.last {
    display: none !important;
}

/* Номера страниц и многоточие */
.blog-page .wp-pagenavi a.page,
.blog-page .wp-pagenavi span.current,
.blog-page .wp-pagenavi span.extend {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 28px;
    height: 40px;
    padding: 0 8px;
    border: 1px solid #DCEBF0;
    border-radius: 6px;
    background: #fff;
    color: #003543;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Активная страница */
.blog-page .wp-pagenavi span.current {
    border-color: #0099B8;
    background: #0099B8;
    color: #fff;
}

/* Многоточие */
.blog-page .wp-pagenavi span.extend {
    border-color: transparent;
    background: transparent;
}

/* Наведение на номер */
.blog-page .wp-pagenavi a.page:hover {
    border-color: #0099B8;
    color: #0099B8;
}

/* Стрелки навигации */
.blog-page .wp-pagenavi a.previouspostslink,
.blog-page .wp-pagenavi a.nextpostslink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    color: #0099B8;
    font-size: 0;
    text-decoration: none;
}

.blog-page .wp-pagenavi a.previouspostslink::before {
    content: "‹";
    font-size: 26px;
    font-weight: 300;
    line-height: 1;
}

.blog-page .wp-pagenavi a.nextpostslink::before {
    content: "›";
    font-size: 26px;
    font-weight: 300;
    line-height: 1;
}

.blog-page .wp-pagenavi a.previouspostslink:hover,
.blog-page .wp-pagenavi a.nextpostslink:hover {
    color: #003543;
}

.blog-page .blog-page__empty {
    padding: 32px 0;
    color: #5F6B75;
    font-size: 16px;
}

@media (max-width: 1150px) {
    .blog-page .blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .blog-page .blog-card,
    .blog-page .blog-card--featured {
        grid-column: span 1;
    }

    .blog-page .blog-card .news__title {
        font-size: 20px;
    }

    .blog-page .blog-card .news__card-bottom {
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .blog-page .blog-page__container {
        padding-right: 16px;
        padding-left: 16px;
    }

    .blog-page .blog-filters {
        gap: 8px;
        margin-bottom: 24px;
    }

    .blog-page .blog-filters__item {
        padding: 9px 14px;
        font-size: 14px;
    }

    .blog-page .blog-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
        margin-top: 20px;
    }

    .blog-page .blog-card,
    .blog-page .blog-card--featured {
        grid-column: 1 / -1;
        min-width: 0;
    }

    .blog-page .blog-card .news__title {
        font-size: 21px;
    }

    .blog-page .blog-card .news__card-bottom {
        align-items: center;
        gap: 10px;
    }

    .blog-page .blog-card .news__time,
    .blog-page .blog-card .news__date {
        font-size: 14px;
    }

    .blog-page .blog-card .blog-card__read {
        font-size: 14px;
    }

    .blog-page .section-title {
        font-size: 26px;
    }
}