/* Страница новостей */

body {
    margin: 0;
    background: #F5F5F5;
    font-family: 'Roboto', Arial, sans-serif;
}

.news-main {
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* --- Хлебные крошки --- */
.news-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 24px 0 30px;
}

.news-breadcrumbs a {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 100%;
    color: #767676;
    text-decoration: none;
    transition: color 0.2s;
}

.news-breadcrumbs a:hover {
    color: #48924E;
}

.news-breadcrumbs-sep {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 100%;
    color: #767676;
    margin: 0 8px;
}

.news-breadcrumbs-current {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 100%;
    color: #000000;
}

/* --- Заголовок --- */
.news-page-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    font-size: 30px;
    line-height: 36px;
    color: #000000;
    margin: 0 0 28px;
}

/* --- Сетка карточек --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 13px 14px;
}

/* --- Карточка --- */
.news-card {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    border: 1px solid #D8D8D8;
    background: #FFFFFF;
    overflow: hidden;
    transition: box-shadow 0.25s;
}

/* --- Обёртка картинки --- */
.news-card-image-wrap {
    position: relative;
    flex-shrink: 0;
}

.news-card-image-wrap > a {
    display: block;
}

.news-card-image {
    width: 100%;
    aspect-ratio: 283 / 175;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

.news-card-image > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Бейдж с датой --- */
.news-card-date {
    position: absolute;
    bottom: -14px;
    left: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 31px;
    padding: 0 14px;
    border-radius: 30px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 13px;
    line-height: 31px;
    color: #FFFFFF;
    white-space: nowrap;
    z-index: 2;
}

/* --- Тело карточки --- */
.news-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 26px 21px 21px;
}

.news-card-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.3;
    color: #000000;
    margin: 0 0 10px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-card-text {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.4;
    color: #000000;
    margin: 0 0 16px;

    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    line-clamp: 6;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    border-radius: 6px;
    background: #48924E;
    box-shadow: 0px 6px 8px 0px rgba(255, 255, 255, 0.35) inset,
    0px -4px 11px 0px rgba(0, 0, 0, 0.3) inset;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 20px;
    color: #FFFFFF;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.25s;
    margin-top: auto;
}

.news-card-btn:hover {
    background: #5aaa62;
}

/* --- Пагинация --- */
.news-pagination {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    padding-bottom: 20px;
}

.news-pagination-btn {
    background: none;
    border: none;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
    color: #48924E;
    cursor: pointer;
    padding: 4px 2px;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.news-pagination-btn:hover:not(.active) {
    opacity: 0.7;
}

.news-pagination-btn.active {
    color: #000000;
    cursor: default;
    font-weight: 500;
}

/* Адаптив: до 1200px — 4 колонки */
@media (max-width: 1200px) and (min-width: 1025px) {
    .news-grid {
        gap: 16px;
    }

    .news-card-body {
        padding: 24px 18px 18px;
    }

    .news-card-title {
        font-size: 15px;
    }

    .news-card-text {
        font-size: 13px;
    }

    .news-card-btn {
        height: 38px;
        font-size: 15px;
    }
}

/* Адаптив: до 1024px — 3 колонки */
@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .news-page-title {
        font-size: 28px;
        line-height: 34px;
        margin-bottom: 24px;
    }
}

/* Адаптив: до 768px — 2 колонки */
@media (max-width: 768px) {
    .news-main {
        padding: 0 16px 40px;
    }

    .news-breadcrumbs {
        padding: 20px 0 12px;
    }

    .news-breadcrumbs a,
    .news-breadcrumbs-sep,
    .news-breadcrumbs-current {
        font-size: 14px;
    }

    .news-breadcrumbs-sep {
        margin: 0 6px;
    }

    .news-page-title {
        font-size: 24px;
        line-height: 30px;
        margin-bottom: 20px;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .news-card-date {
        height: 28px;
        line-height: 28px;
        font-size: 12px;
        padding: 0 12px;
        bottom: -12px;
        left: 14px;
    }

    .news-card-body {
        padding: 22px 14px 14px;
    }

    .news-card-title {
        font-size: 15px;
    }

    .news-card-text {
        font-size: 13px;
        line-height: 1.35;
    }

    .news-card-btn {
        height: 38px;
        font-size: 15px;
    }

    .news-pagination {
        gap: 16px;
        margin-top: 32px;
        justify-content: center;
    }
}

/* Адаптив: до 480px — 1 колонка */
@media (max-width: 480px) {
    .news-main {
        padding: 0 12px 32px;
    }

    .news-breadcrumbs a,
    .news-breadcrumbs-sep,
    .news-breadcrumbs-current {
        font-size: 13px;
    }

    .news-page-title {
        font-size: 22px;
        line-height: 28px;
        margin-bottom: 16px;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        max-width: 420px;
        margin: 0 auto;
    }

    .news-card-date {
        height: 28px;
        line-height: 28px;
        font-size: 12px;
        padding: 0 12px;
        bottom: -12px;
        left: 16px;
    }

    .news-card-body {
        padding: 24px 16px 16px;
    }

    .news-card-title {
        font-size: 16px;
        line-height: 1.35;
    }

    .news-card-text {
        font-size: 14px;
        line-height: 1.4;
    }

    .news-card-btn {
        height: 40px;
        font-size: 16px;
    }

    .news-pagination {
        gap: 18px;
        margin-top: 28px;
    }

    .news-pagination-btn {
        font-size: 15px;
    }
}
