/* css/news.css - блок новостей/отгрузок (как отзывы по верстке) */

.news-section {
    padding: 80px 0;
    background: white;
}

.news-section__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    padding-top: 30px;
}

.news-card {
    display: block;
    background: #f8f9fa;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
    text-decoration: none;
    color: inherit;
}

/* Ссылка-карточка: без подчёркивания ни у карточки, ни у содержимого (главная и архив) */
.news-section a.news-card,
.news-section a.news-card:hover,
.news-section a.news-card:focus,
.news-archive a.news-card,
.news-archive a.news-card:hover,
.news-archive a.news-card:focus,
.news-section a.news-card *,
.news-section a.news-card *:hover,
.news-archive a.news-card *,
.news-archive a.news-card *:hover {
    text-decoration: none !important;
    border-bottom: none !important;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.news-card__media {
    position: relative;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}

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

.news-card__placeholder {
    width: 100%;
    height: 200px;
    min-height: 200px;
    background: linear-gradient(135deg, var(--accent, #7747D4) 0%, #1F1A1C 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    font-size: 1rem;
    border-radius: 10px;
}

/* Бейджи на карточке (повторяют позицию review-card__type-badge) */
.news-card__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
}

.news-card__badge--novost {
    background: #1F1A1C;
}

.news-card__badge--otgruzka {
    background: var(--accent, #7747D4);
}

.news-card__title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px;
    line-height: 1.35;
}

.news-card__excerpt {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card__caption {
    padding: 20px 0;
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

/* В карточке новости нет аватара — ряд с датой без flex, чтобы слева не было пустого места */
.news-card .review-card__author {
    display: block;
    gap: 0;
}

.news-card .review-card__author-info {
    flex: none;
}

/* На случай если где-то подмешивается блок аватара — скрыть в карточке новости */
.news-card .review-card__avatar {
    display: none !important;
}

.news-section__footer {
    text-align: center;
}

/* Архив новостей — те же карточки */
.news-archive__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    padding-top: 30px;
}

.news-archive .news-card {
    margin: 0;
}

.news-archive .news-section__footer {
    margin-top: 40px;
}

.news-pagination {
    margin-top: 40px;
    text-align: center;
}

.news-empty {
    text-align: center;
    padding: 60px 20px;
}

.news-empty__icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.news-empty__title {
    margin-bottom: 10px;
    color: #333;
}

.news-empty__text {
    color: #666;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .news-section {
        padding: 60px 0;
    }

    .news-section__grid,
    .news-archive__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .news-card__caption {
        padding: 15px 20px 20px;
    }
}

@media (max-width: 480px) {

    .news-card__image,
    .news-card__placeholder {
        height: 180px;
    }
}

/* Single news */
.news-single__date {
    margin-bottom: 0;
}

.news-single__media {
    margin-bottom: 30px;
    border-radius: 15px;
    overflow: hidden;
}

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

.news-single__content {
    max-width: 800px;
}