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

/* ========================================
   Стили новостей (общие)
   ======================================== */

/* Секция новостей */
.section-news {
    margin: 50px 0;
}

.section-news .section-title {
    color: #383E4B;
    font-size: 30px;
    font-weight: 400;
    line-height: normal;
    margin: 0 0 35px;
    text-align: center;
}

.section-news .news-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 35px;
}

/* Карточка новости - вертикальная */
.news-card {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Изображение новости */
.news-image {
    width: 100%;
    aspect-ratio: 309.286 / 250;
    border-radius: 5px;
    overflow: hidden;
    background-color: #F5F5F5;
}

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

/* Контент карточки новости */
.news-card .news-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Дата новости */
.news-date {
    color: #383E4B;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.3;
    opacity: 0.8;
    text-decoration: none;
    display: block;
}

/* Превью текста */
.news-excerpt {
    color: #383E4B;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.3;
    opacity: 0.8;
    margin: 0;
    text-decoration: none;
}

/* Кнопка "Смотреть все новости" */
.news-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 40px;
}

.news-all-btn {
    background-color: #E01F26;
    border: none;
    border-radius: 1000px;
    color: white;
    font-size: 17px;
    font-weight: 400;
    line-height: normal;
    height: 56px;
    padding: 0 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.news-all-btn:hover {
    opacity: 0.9;
}

/* Контент одиночной новости */
.news-content {
    margin-bottom: 40px;
    color: #383E4B;
    margin-top: 10px;
}

.news-content h2 {
    font-size: 1.8em;
    font-weight: 400;
    color: #383E4B;
    margin-top: 40px;
    margin-bottom: 20px;
}

.news-content h3 {
    font-size: 1.4em;
    font-weight: 400;
    color: #383E4B;
    margin-top: 30px;
    margin-bottom: 15px;
}

.news-content p {
    margin-bottom: 15px;
    font-size: 17px;
    line-height: 130%;
    letter-spacing: -0.51px;
}

.news-content ul,
.news-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.news-content li {
    margin-bottom: 10px;
}

/* Список новостей */
.news-list-section {
    /* padding убран, так как используется .content-wrapper */
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

/* Отдельная новость в списке */
.news-item {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 20px;
    align-items: start;
}

.news-item-image {
    width: 310px;
    height: 451px;
    overflow: hidden;
    border-radius: 5px;
}

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

.news-item-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-item-date {
    font-size: 20px;
    font-weight: 400;
    color: #383E4B;
    letter-spacing: -0.6px;
}

.news-item-title a {
    font-size: 20px;
    font-weight: 500;
    color: #E01F26;
    line-height: normal;
    margin: 0;
    text-decoration: unset;
}

.news-item-text {
    font-size: 17px;
    font-weight: 400;
    color: #383E4B;
    line-height: 1.3;
    letter-spacing: -0.51px;
}

.news-item-text p, .news-item-text ul {
    margin-bottom: 30px;
}

.news-item-text p:last-child {
    margin-bottom: 0;
}

/* Красные подзаголовки в тексте новости */
.news-item-text strong {
    font-weight: 500;
    color: #E01F26;
}

.no-news {
    text-align: center;
    font-size: 1.2em;
    color: #666666;
    padding: 50px 0;
}

/* Архив новостей */
.news-archive {
    padding: 50px 0;
}

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


.news-card-thumbnail img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-card-thumbnail img {
    transform: scale(1.05);
}

.news-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card-meta {
    color: #999999;
    font-size: 14px;
    margin-bottom: 15px;
}

.news-card-title {
    font-size: 1.4em;
    font-weight: 400;
    margin-bottom: 15px;
}

.news-card-title a {
    color: #383E4B;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-card-title a:hover {
    color: #E01F26;
}

.news-card-excerpt {
    color: #666666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.news-card-footer {
    margin-top: auto;
}

.news-card-footer .btn {
    padding: 12px 24px;
}

.no-news {
    text-align: center;
    font-size: 1.2em;
    color: #666666;
    padding: 50px 0;
}

/* Скрытые новости */
.news-list-section.hidden {
    display: none;
}

/* Кнопка "Показать еще" */
.news-load-more-section {
    margin: 40px 0 60px;
}

.news-load-more-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Одиночная новость */
.news-header {
    margin-bottom: 40px;
}

.news-meta {
    color: #999999;
    font-size: 14px;
    margin-bottom: 20px;
}

.news-title {
    font-size: 30px;
    color: #383E4B;
    margin-bottom: 40px;
    font-weight: 400;
}

.news-thumbnail {
    margin-bottom: 40px;
    text-align: center;
}

.news-thumbnail img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.news-footer {
    padding-top: 40px;
    border-top: 1px solid #E0E0E0;
}

/* Похожие новости */
.related-news {
    padding: 60px 0;
    background-color: #F5F5F5;
}

.related-news .section-title {
    margin-bottom: 40px;
}

.related-news .news-grid {
    margin-bottom: 0;
}

/* Отступ перед секцией "Остались вопросы" на одиночной новости */
.single-news .section-callback,
.post-type-archive-news .section-callback {
    margin-bottom: 270px;
}

@media (max-width: 1300px) {
    .section-news {
        margin: clamp(30px, calc(6.667vw - 36.667px), 50px) 0;
    }
    .news-load-more-section {
        margin: clamp(30px, calc(3.333vw - 3.333px), 40px) clamp(40px, calc(6.667vw - 26.667px), 60px);
    }
    .news-actions {
        margin-top: clamp(0px, calc(13.333vw - 133.333px), 40px);
    }
    .section-news .news-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 640px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: clamp(15px, calc(6.667vw - 51.667px), 35px);
    }
    .single-news .section-callback, .post-type-archive-news .section-callback {
        margin-bottom: clamp(120px, calc(50vw - 380px), 270px);
    }
}

/* Адаптивные стили */
@media (max-width: 1000px) {
    .content-wrapper {
        padding: 40px 0;
    }

    .news-list {
        gap: 40px;
    }

    .news-item {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .news-item-image {
        width: 100%;
        height: 300px;
    }

    .news-item-date {
        font-size: 18px;
    }

    .news-item-title {
        font-size: 18px;
    }

    .news-item-text {
        font-size: 16px;
    }

    /* Секция "Другие новости" на главной */
    .section-news {
        margin: 30px 0;
    }

    .section-news .section-title {
        font-size: 22px;
        margin-bottom: 25px;
    }

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

    .news-excerpt {
        font-size: 15px;
    }

    .news-actions {
        margin-top: 25px;
    }

    .news-all-btn {
        font-size: 15px;
        height: auto;
        padding: 14px 40px;
    }

    .news-archive {
        padding: 30px 0;
    }

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

    .news-single {
        padding: 30px 0;
    }

    .news-header {
        margin-bottom: 25px;
    }

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

    .news-thumbnail {
        margin-bottom: 25px;
    }

    .news-video-container iframe {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .news-content {
        margin-bottom: 25px;
    }

    .news-content h2 {
        font-size: 1.4em;
        margin-top: 25px;
        margin-bottom: 15px;
    }

    .news-content h3 {
        font-size: 1.2em;
        margin-top: 20px;
        margin-bottom: 10px;
    }

    .news-content p {
        font-size: 15px;
    }

    .related-news {
        padding: 40px 0;
    }

    .post-type-archive-news .section-title {
        font-size: 22px;
        margin-bottom: 25px;
    }

    .news-load-more-section {
        margin: 30px 0 40px;
    }

    .single-news .section-callback,
    .post-type-archive-news .section-callback {
        margin-bottom: 60px;
    }
}

@media (max-width: 600px) {
    .content-wrapper {
        padding: 30px 0;
    }

    .news-list {
        gap: 30px;
    }

    .news-item-image {
        height: 250px;
    }

    .news-item-date {
        font-size: 16px;
    }

    .news-item-title {
        font-size: 17px;
    }

    .news-item-text {
        font-size: 15px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-card-thumbnail img {
        height: 200px;
    }

    .news-title {
        font-size: 1.5em;
    }
}
