/* --- Обёртка новостей --- */

.news-wrapper {
    padding: 20px;
    max-width: 1400px;
    margin: 20px auto 0; /* отступ сверху от шапки */
    background: #fff; /* единственный белый блок */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
} 

/* Заголовок страницы новостей */
.news-page-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 40px;
}

/* Сетка новостей на flex */
.news-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;


}

/* Карточка новости */
.news-card {
    flex: 1 1 calc(33.333% - 2rem); /* 3 карточки на ряд с учётом gap */
    max-width: calc(33.333% - 2rem);
    background: #fff; /* карточки на фоне wrapper */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

/* Hover эффект карточки */
.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Изображение новости */
.news-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
}

/* Плавное увеличение картинки при hover */
.news-card:hover .news-image img {
    transform: scale(1.05);
}

/* Контент внутри карточки */
.news-content {
    padding: 15px;
    flex-grow: 1;
}

/* Дата */
.news-date {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 8px;
}

/* Заголовок новости */
.news-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
}

.news-title:hover {
    color: #007acc;
}

/* Превью текста новости */
.news-preview {
    margin-top: 8px;
    font-size: 0.95rem;
    color: #555;
}

/* --- Адаптив --- */
/* Планшет */
@media (max-width: 1024px) {
    .news-card {
        flex: 1 1 calc(50% - 2rem); /* 2 карточки на ряд */
        max-width: calc(50% - 2rem);
    }
}

/* Мобильные устройства */
@media (max-width: 768px) {
    .news-card {
        flex: 1 1 100%; /* 1 карточка на ряд */
        max-width: 100%;
    }
}

/* --- Прозрачность родительских блоков --- */
.container, .main-left, .card {
    background: none !important;
    box-shadow: none !important;
}

.news-detail-wrapper {
    
    width: 100%;             /* растягиваем до максимальной ширины контейнера */
    margin: 40px auto;       /* центрирование */
    padding: 30px;           /* внутренние отступы */
    background: #fff;        /* белый фон */
    border-radius: 12px;     
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    box-sizing: border-box;  /* чтобы padding учитывался в ширине */
}

.news-detail-date {
    font-size: 0.9rem;
    color: #888;
    text-align: center;
    margin-bottom: 20px;
}

.news-detail-image {
    text-align: center;
    margin-bottom: 20px;
}

.news-detail-image img {
    max-width: 100%;
    border-radius: 8px;
}

.news-detail-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 30px;
}

.news-back-link {
    display: inline-block;
    font-size: 0.95rem;
    text-decoration: none;
    color: #007acc;
    border: 1px solid #007acc;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s;
}

.news-back-link:hover {
    background: #007acc;
    color: #fff;
}


.news-detail-wrapper {
    max-width: 1280px;
    margin: 40px auto 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Заголовок */
.news-detail-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}

/* Дата */
.news-detail-date {
    font-size: 14px;
    color: #777;
    margin-bottom: 20px;
}

/* Фото слева */
.news-detail-image {
    float: left;
    width: 38%;
    max-width: 420px;
    min-width: 240px;
    height: auto;
    margin: 0 24px 16px 0;
    border-radius: 10px;
}

/* Текст */
.news-detail-text {
    font-size: 16px;
    line-height: 1.7;
    color: #6b7280;
}

/* Сброс потока */
.news-detail-wrapper::after {
    content: "";
    display: table;
    clear: both;
}

/* Ссылка снизу слева */
.news-back-link-wrapper {
    clear: both;        /* ← опускаем блок под картинку */
    margin-top: 28px;
    text-align: left;
}

.news-back-link {
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    color: #1f6feb;
}

.news-back-link:hover {
    text-decoration: underline;
}

/* Мобильные */
@media (max-width: 768px) {
    .news-detail-title {
        font-size: 26px;
    }

    .news-detail-image {
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 0 0 20px 0;
    }
}