/* GrowSvet Academy — оформление статей */

/* Карточки Академии */

body .news.row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin: 0;
}

body .news.row > .col-xs-12 {
    float: none;
    display: block;
    width: auto;
    padding: 0;
}

body .news.row > .col-xs-12:not(.col-md-4) {
    grid-column: 1 / -1;
}

body .news .news-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    border: 1px solid #e2ebe3;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(24, 65, 35, .05);
    transition: box-shadow .2s ease, transform .2s ease;
}

body .news .news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(24, 65, 35, .11);
}

body .news .news-item__pic-wrapper {
    width: 100%;
    min-width: 0;
    margin: 0;
}

body .news .news-item__pic {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    border-radius: 0;
    background: #eef5ef;
}

body .news .news-item__pic img {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    object-fit: cover;
}

body .news .news-item__caption {
    padding: 18px 20px 22px;
}

body .news .news-item__date {
    margin: 0 0 9px;
    color: #718577;
    font-size: 12px;
}

body .news .news-item__date:empty {
    display: none;
}

body .news .news-item__title {
    margin: 0;
    color: #406a4c;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.45;
}

body .news .news-item:hover .news-item__title {
    color: #248346;
}

/* Содержимое статьи */

body .news-detail {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
}

body .news-detail .news-detail-preview-text,
body .news-detail .news-detail-detail-text {
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
    color: #34443a;
    font-size: 17px;
    line-height: 1.8;
    overflow-wrap: break-word;
}

body .news-detail .news-detail-detail-text {
    margin-top: 24px;
}

body .news-detail .news-detail-detail-text p {
    margin: 0 0 20px;
}

body .news-detail .news-detail-detail-text h2 {
    margin: 38px 0 16px;
    color: #336c46;
    font-size: 27px;
    line-height: 1.3;
    font-weight: 700;
}

body .news-detail .news-detail-detail-text h3 {
    margin: 28px 0 12px;
    color: #2e633e;
    font-size: 21px;
    line-height: 1.4;
    font-weight: 600;
}

body .news-detail .news-detail-detail-text img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px;
}

body .news-detail .news-detail-detail-text ul,
body .news-detail .news-detail-detail-text ol {
    margin: 16px 0 24px;
    padding-left: 26px;
}

body .news-detail .news-detail-detail-text li {
    margin-bottom: 8px;
}

body .news-detail .news-detail-detail-text blockquote {
    margin: 28px 0;
    padding: 18px 24px;
    border-left: 4px solid #318c4d;
    border-radius: 0 8px 8px 0;
    background: #f2f8f3;
    color: #41694e;
}

body .news-detail .news-detail-detail-text table {
    display: block;
    max-width: 100%;
    margin: 24px 0;
    overflow-x: auto;
    border-collapse: collapse;
}

body .news-detail .news-detail-detail-text th,
body .news-detail .news-detail-detail-text td {
    padding: 11px 14px;
    border: 1px solid #dfe9e1;
}

body .news-detail .news-detail-detail-text th {
    background: #edf6ef;
    color: #306c42;
}

/* Фотографии и дополнительные блоки */

body .news-detail .news-detail-pic-container {
    width: 100%;
    height: auto !important;
    aspect-ratio: 16 / 9;
    margin: 24px 0;
}

body .news-detail .news-detail-pic {
    width: 100% !important;
    height: 100%;
    left: 0;
    transform: none;
    background: #edf5ee;
    border-radius: 12px;
    overflow: hidden;
}

body .news-detail .news-detail-last-news,
body .news-detail .news-detail-gallery,
body .news-detail .news-detail-files-docs {
    width: auto !important;
    margin: 35px 0 0 !important;
    border-radius: 12px;
    overflow: hidden;
}

/* Адаптивность */

@media (max-width: 1100px) {
    body .news.row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    body .news.row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    body .news .news-item__title {
        font-size: 16px;
    }

    body .news-detail .news-detail-detail-text,
    body .news-detail .news-detail-preview-text {
        font-size: 16px;
        line-height: 1.7;
    }

    body .news-detail .news-detail-detail-text h2 {
        font-size: 23px;
    }

    body .news-detail .news-detail-detail-text h3 {
        font-size: 19px;
    }
}
