/**
 * Раздел «Новости» — TSK25 (ОФЗ / ФСЗ / ФТЗ).
 * Самодостаточные токены: на проде storefront-c25 может не подключаться.
 */
.sk-news {
    --sk-brand: #497952;
    --sk-brand-dark: #127023;
    --sk-brand-mid: #5f9a69;
    --sk-brand-soft: #e8efe6;
    --sk-ink: #3d4438;
    --sk-text: #4f574b;
    --sk-muted: #8a9a86;
    --sk-line: #e2ddd4;
    --sk-radius: 12px;

    margin: 8px 0 48px;
    color: var(--sk-text);
}

.sk-news__title {
    margin: 0 0 28px;
    padding: 0 !important;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--sk-ink);
}

/* Сетка 3 в ряд (desktop): равная высота карточек, без float/margin-хака 4/5 колонок */
.sk-news .articles__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    max-width: none;
    margin-top: 0;
    margin-bottom: 0;
    align-items: stretch;
}

.sk-news .articles__list.flex-container {
    display: grid; /* перекрываем глобальный flex из style.css */
}

.sk-news .articles__item {
    display: flex;
    flex-direction: column;
    width: auto;
    max-width: none;
    margin: 0;
    text-decoration: none;
    color: inherit;
    border-radius: var(--sk-radius);
    overflow: hidden;
    background: var(--sk-brand-soft); /* ФСЗ */
    border: 1px solid transparent;
    min-height: 100%;
    height: 100%;
    box-sizing: border-box;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.sk-news .articles__item:nth-child(5n),
.sk-news .articles__item:nth-child(4n),
.sk-news .articles__item:nth-child(3n) {
    margin-right: 0;
}

/* Hover на весь блок карточки */
.sk-news .articles__item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(73, 121, 82, 0.14);
    border-color: rgba(18, 112, 35, 0.22);
    background: #dce8d9; /* чуть плотнее ФСЗ */
}

.sk-news .articles__item-photo {
    display: block;
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 0;
    background: var(--sk-brand-soft);
    overflow: hidden;
}

.sk-news .articles__item-photo img,
.sk-news .articles__item-photo .photo-full-size {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.35s ease;
}

.sk-news .articles__item:hover .articles__item-photo img {
    transform: scale(1.03);
}

/* Анонс статьи — поверх фото при hover всего блока */
.sk-news .articles__item-preview {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 16px 14px;
    margin: 0;
    background: rgba(232, 239, 230, 0.94); /* ФСЗ */
    color: var(--sk-ink);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.sk-news .articles__item:hover .articles__item-preview {
    opacity: 1;
}

/* Fallback: лого СижуВяжу из медиабиблиотеки вместо пустого анонса */
.sk-news .articles__item-photo--logo {
    background: var(--sk-brand-soft);
}

.sk-news .articles__item-photo--logo img {
    object-fit: contain;
    object-position: center;
    padding: 18%;
    box-sizing: border-box;
    background: var(--sk-brand-soft);
}

.sk-news .articles__item--logo:hover .articles__item-photo--logo img {
    transform: scale(1.02);
}

/* Панель подписи ФСЗ — тянется вниз, дата всегда внизу карточки */
.sk-news .articles__item-caption {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    width: 100%;
    flex: 1 1 auto;
    min-height: 88px;
    box-sizing: border-box;
    margin: 0;
    padding: 14px 14px 12px;
    background: var(--sk-brand-soft); /* ФСЗ #e8efe6 */
    transition: background 0.18s ease;
}

.sk-news .articles__item:hover .articles__item-caption {
    background: #dce8d9;
}

.sk-news .articles__item-title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1 1 auto;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    color: var(--sk-ink);
    text-decoration: none;
    transition: color 0.15s ease;
}

.sk-news .articles__item:hover .articles__item-title {
    color: var(--sk-brand); /* ОФЗ */
    text-decoration: none;
}

.sk-news .articles__item-date {
    display: block;
    margin-top: auto;
    padding-top: 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    color: var(--sk-brand-dark); /* ФТЗ */
}

.sk-news .sk-pager {
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--sk-line);
}

/* Детальная */
.sk-news-detail {
    --sk-brand: #497952;
    --sk-brand-dark: #127023;
    --sk-brand-soft: #e8efe6;
    --sk-ink: #3d4438;
    --sk-text: #4f574b;
    --sk-muted: #8a9a86;
    --sk-line: #e2ddd4;
    --sk-radius: 12px;

    margin: 8px 0 40px;
    color: var(--sk-text);
    max-width: 860px;
}

.sk-news-detail .news-detail {
    word-wrap: break-word;
}

.sk-news-detail .news-date-time {
    display: inline-block;
    margin: 0 0 16px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--sk-brand-soft);
    color: var(--sk-brand-dark);
    font-size: 13px;
    font-weight: 500;
}

.sk-news-detail .detail_picture {
    float: none;
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 0 24px;
    border-radius: var(--sk-radius);
}

.sk-news-detail h3,
.sk-news-detail .sk-news-detail__title {
    margin: 0 0 16px;
    padding: 0 !important;
    color: var(--sk-ink);
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
}

.sk-news-detail p,
.sk-news-detail .news-detail {
    font-size: 16px;
    line-height: 1.65;
}

.sk-news-detail a {
    color: var(--sk-brand);
}

.sk-news-detail a:hover {
    color: var(--sk-brand-dark);
}

.sk-news-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 28px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--sk-brand-soft);
    color: var(--sk-brand-dark) !important;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none !important;
    transition: background 0.15s ease, color 0.15s ease;
}

.sk-news-back:hover {
    background: var(--sk-brand);
    color: #fff !important;
}

/* Новости: крошки скрыты (дубль заголовка), поиск раздела убран — глобальный art_search остаётся */
body.sk-page-news .art_bread {
    display: none !important;
}

body.sk-page-news .art_search {
    float: none;
    width: 100%;
    max-width: 420px;
    margin: 0 0 8px auto;
}

@media (max-width: 1024px) {
    .sk-news .articles__list,
    .sk-news .articles__list.flex-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .sk-news__title {
        font-size: 26px;
        margin-bottom: 20px;
        padding-top: 0 !important;
    }

    .sk-news .articles__list,
    .sk-news .articles__list.flex-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    body.sk-page-news .art_search {
        max-width: none;
        margin-bottom: 16px;
    }
}

@media (max-width: 480px) {
    .sk-news .articles__list,
    .sk-news .articles__list.flex-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}
