/* news.css */

/* ========== СТРАНИЦА СПИСКА НОВОСТЕЙ ========== */
.news-page {
    padding: 40px 0;
    min-height: 100vh;
}

.news-page .container {
    max-width: 1440px;
    margin: 0 auto;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.news-title {
    font-size: 32px;
    font-weight: 500;
    color: #20221E;
    letter-spacing: -.02em;
}

/* Теги на карточке новости */
.news-card__image-wrapper {
    position: relative;
}

.news-card__tags {
    position: absolute;
    bottom: 16px;
    left: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    z-index: 2;
}

.news-card__tag {
    display: inline-block;
    padding: 6px 12px;
    background: white;
    border-radius: 128px;
    color: #81AD4F;
    letter-spacing: -.02em;
    font-family: Inter;
    font-weight: 500;
    font-size: 14px;
    line-height: 16px;
}

.news-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-search__input {
    width: 280px;
    padding: 10px 16px;
    border: 1px solid #D8DDD0;
    border-radius: 128px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #20221E;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.news-search__input:focus {
    border-color: #81AD4F;
}

.news-search__input::placeholder {
    color: #ADB5A0;
}

.news-search__btn {
    width: 40px;
    height: 40px;
    background: #81AD4F;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.news-search__btn:hover {
    background: #6f9a3f;
}

.news-search__btn svg {
    stroke: #fff;
}

.news-layout {
    display: flex;
    gap: 48px;
}

/* Левая колонка - сайдбар */
.news-sidebar {
    flex: 0 0 260px;
}

.sidebar-block {
    margin-bottom: 32px;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: #20221E;
    padding-bottom: 12px;
    border-bottom: 1px solid #D8DDD0;
    margin-bottom: 16px;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-item {
    margin-bottom: 8px;
}

.sidebar-link {
    display: block;
    padding: 8px 0;
    font-size: 14px;
    color: #6B7560;
    text-decoration: none;
    transition: color 0.2s;
}

.sidebar-link:hover {
    color: #81AD4F;
}

.sidebar-link.active {
    color: #81AD4F;
    font-weight: 500;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-link {
    display: inline-block;
    padding: 4px 12px;
    background: #F8F9FA;
    border: 1px solid #D8DDD0;
    border-radius: 128px;
    font-size: 12px;
    color: #6B7560;
    text-decoration: none;
    transition: all 0.2s;
}

.tag-link:hover {
    background: #81AD4F1F;
    border-color: #81AD4F;
    color: #81AD4F;
}

/* Правая колонка - новости */
.news-content {
    flex: 1;
}

.search-results {
    font-size: 14px;
    color: #6B7560;
    margin-bottom: 24px;
}

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

.news-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #D8DDD0;
    transition: transform 0.2s;
}

.news-card__link {
    text-decoration: none;
    display: block;
}

.news-card__image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card__image-placeholder {
    width: 100%;
    height: 200px;
    background: #F8F9FA;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ADB5A0;
}

.news-card__content {
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.news-card__meta {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #6B7560;
}

.news-card__date {
    position: relative;
}

.news-card__category {
    color: #81AD4F;
}

.news-card__title {
    font-size: 16px;
    font-weight: 600;
    color: #20221E;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card__preview {
    font-size: 13px;
    color: #6B7560;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-card__views {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #ADB5A0;
}

.news-card__read-more {
    font-size: 12px;
    color: #81AD4F;
    font-weight: 500;
}

/* Пагинация */
.pagination {
    margin-top: 40px;
}

.pagination__container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.pagination__prev,
.pagination__next {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #F8F9FA;
    color: #6B7560;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.pagination__prev:hover,
.pagination__next:hover {
    background: #81AD4F;
    color: #fff;
}

.pagination__pages {
    display: flex;
    gap: 4px;
}

.pagination__page {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    color: #6B7560;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.pagination__page:hover {
    background: #81AD4F;
    color: #fff;
}

.pagination__page--active {
    background: #81AD4F;
    color: #fff;
}

.pagination__dots {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #ADB5A0;
}

/* Пустое состояние */
.news-empty {
    text-align: center;
    padding: 60px 20px;
    color: #ADB5A0;
    font-size: 16px;
}

/* ========== ДЕТАЛЬНАЯ СТРАНИЦА НОВОСТИ ========== */
.news-detail-page {
    padding: 40px 0;
    min-height: 100vh;
}

.news-detail-page .container {
    max-width: 1440px;
    margin: 0 auto;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    font-size: 14px;
}

.breadcrumbs a {
    color: #81AD4F;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .separator {
    color: #ADB5A0;
}

.breadcrumbs .current {
    color: #6B7560;
}

.news-article__header {
    margin-bottom: 32px;
}

.news-article__meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #6B7560;
}

.news-article__views {
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-article__title {
    font-size: 36px;
    font-weight: 600;
    color: #20221E;
    line-height: 1.3;
    letter-spacing: -.02em;
}

.news-article__image {
    margin-bottom: 32px;
    border-radius: 24px;
    overflow: hidden;
}

.news-article__image img {
    width: 100%;
    height: auto;
    display: block;
}

.news-article__content {
    font-size: 16px;
    line-height: 1.6;
    color: #20221E;
}

.news-article__content p {
    margin-bottom: 20px;
}

.news-article__content h2,
.news-article__content h3 {
    margin: 24px 0 16px;
    font-weight: 500;
}

.news-article__tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #D8DDD0;
}

.tags-label {
    font-size: 14px;
    color: #6B7560;
}

/* Похожие новости */
.related-news {
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid #D8DDD0;
}

.related-news__title {
    font-size: 24px;
    font-weight: 500;
    color: #20221E;
    margin-bottom: 24px;
}

.related-news__grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
}

.news-card--small .news-card__image {
    height: 120px;
}

.news-card--small .news-card__title {
    font-size: 14px;
    -webkit-line-clamp: 2;
}

/* ========== АДАПТИВНОСТЬ (ТОЛЬКО МОБИЛЬНАЯ ВЕРСИЯ) ========== */

/* Планшеты (до 1024px) */
@media (max-width: 1024px) {
    .news-layout {
        flex-direction: column;
        gap: 32px;
    }

    .news-sidebar {
        flex: auto;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

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

    .related-news__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .news-article__title {
        font-size: 28px;
    }
}

/* Телефоны (до 768px) */
@media (max-width: 768px) {
    .news-page,
    .news-detail-page {
        padding: 24px 0;
    }

    .news-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 24px;
    }

    .news-title {
        font-size: 24px;
    }

    .news-search {
        width: 100%;
    }

    .news-search__input {
        width: 100%;
        flex: 1;
    }

    .news-layout {
        gap: 24px;
    }

    .news-sidebar {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .sidebar-block {
        margin-bottom: 0;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 32px;
    }

    .news-card__image {
        height: 180px;
    }

    .news-card__content {
        padding: 12px;
    }

    .news-card__title {
        font-size: 14px;
        -webkit-line-clamp: 2;
    }

    .news-card__preview {
        font-size: 12px;
        -webkit-line-clamp: 2;
        margin-bottom: 8px;
    }

    .news-card__tag {
        padding: 4px 8px;
        font-size: 11px;
        line-height: 14px;
    }

    .pagination__container {
        gap: 6px;
    }

    .pagination__prev,
    .pagination__next,
    .pagination__page,
    .pagination__dots {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    /* Детальная страница */
    .breadcrumbs {
        font-size: 12px;
        margin-bottom: 20px;
        flex-wrap: wrap;
    }

    .news-article__header {
        margin-bottom: 20px;
    }

    .news-article__meta {
        gap: 12px;
        font-size: 12px;
        flex-wrap: wrap;
    }

    .news-article__title {
        font-size: 22px;
        line-height: 1.3;
    }

    .news-article__image {
        margin-bottom: 20px;
        border-radius: 16px;
    }

    .news-article__content {
        font-size: 14px;
        line-height: 1.5;
    }

    .news-article__content p {
        margin-bottom: 16px;
    }

    .news-article__tags {
        margin-top: 24px;
        padding-top: 16px;
        gap: 6px;
    }

    .tags-label {
        font-size: 12px;
    }

    .news-article__tags .tag-link {
        font-size: 11px;
        padding: 3px 10px;
    }

    .related-news {
        margin-top: 32px;
        padding-top: 32px;
    }

    .related-news__title {
        font-size: 20px;
        margin-bottom: 16px;
    }

    .related-news__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .news-card--small .news-card__image {
        height: 160px;
    }
}

/* Маленькие телефоны (до 480px) */
@media (max-width: 480px) {
    .news-page,
    .news-detail-page {
        padding: 16px 0;
    }

    .news-page .container,
    .news-detail-page .container {
        padding: 0 12px;
    }

    .news-title {
        font-size: 20px;
    }

    .news-header {
        gap: 12px;
        margin-bottom: 20px;
    }

    .news-grid {
        gap: 12px;
    }

    .news-card__image {
        height: 160px;
    }

    .news-card__content {
        padding: 10px;
    }

    .news-card__meta {
        gap: 8px;
        font-size: 10px;
        margin-bottom: 8px;
    }

    .news-card__title {
        font-size: 13px;
        line-height: 1.3;
        margin-bottom: 6px;
    }

    .news-card__preview {
        font-size: 11px;
        -webkit-line-clamp: 2;
    }

    .news-card__views {
        font-size: 10px;
    }

    .news-card__read-more {
        font-size: 11px;
    }

    .news-card__tag {
        padding: 3px 8px;
        font-size: 10px;
        line-height: 12px;
    }

    /* Детальная страница */
    .news-article__title {
        font-size: 18px;
    }

    .news-article__meta {
        gap: 8px;
        font-size: 11px;
    }

    .news-article__content {
        font-size: 13px;
    }

    .related-news__title {
        font-size: 18px;
    }

    .pagination__prev,
    .pagination__next,
    .pagination__page,
    .pagination__dots {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
}