/* ========================================
   БЛОК НОВОСТЕЙ — КАРТОЧКИ 2 КОЛОНКИ
   ======================================== */

/* ── Секция-обёртка ── */
.news-section {
    padding: 10px 0px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ── Сетка ── */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    align-items: start;
}

/* ── Карточка ── */
.news-card {
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 2px solid transparent;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    animation: newsFadeIn 0.55s ease both;
}

.news-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 20px 50px rgba(255, 111, 97, 0.17);
    border-color: #ffb3ab;
}

.news-card--sticky {
    border-color: #ffd700;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.22);
}
.news-card--sticky:hover {
    box-shadow: 0 20px 50px rgba(255, 193, 7, 0.28);
    border-color: #ffc107;
}

/* ── Кнопка редактирования — левый верхний угол ── */
.news-card__edit {
    position: absolute;
    top: 10px;
    left: 12px;
    z-index: 10;
    background: linear-gradient(90deg, #ffe066, #ffc107);
    color: #5a3e00 !important;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition: opacity 0.2s, transform 0.2s;
}

.news-card__edit:hover {
    opacity: 0.9;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.22);
}

/* ── Превью 200px ── */
.news-card__thumb {
    display: block;
    position: relative;
    width: 100%;
    height: 210px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #fff5f4, #ffecea);
    text-decoration: none !important;
}

.news-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
}

.news-card:hover .news-card__thumb img {
    transform: scale(1.06);
}

.news-card__thumb-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 45%,
        rgba(0, 0, 0, 0.18) 100%
    );
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.news-card:hover .news-card__thumb-overlay {
    opacity: 0.7;
}

.news-card__thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    opacity: 0.3;
}

.news-card__pin {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    z-index: 2;
}

/* ── Тело ── */
.news-card__body {
    padding: 16px 20px 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 9px;
    /* Кнопка выходит за боковые отступы тела */
    overflow: hidden;
}

/* ── Мета-строка ── */
.news-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
}

.news-card__date,
.news-card__comments {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #999;
    white-space: nowrap;
}

.news-card__date i  { color: #FF9999; }
.news-card__comments i { color: #a0c4ff; }

/* ── Заголовок ── */
.news-card__title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.38;
    margin: 0;
    color: #1e293b;
}

.news-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.news-card__title a:hover {
    color: #FF6F61;
    transform: none !important;
}

/* ── Анонс ── */
.news-card__excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Футер карточки ── */
.news-card__footer {
    margin-top: auto;
    padding: 12px 0 0;
    /* Растягиваем на всю ширину карточки, выходя за padding тела */
    margin-left: -20px;
    margin-right: -20px;
}

/* ── Кнопка "Читать полностью, обсудить" — во всю ширину ── */
.news-card__readmore {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    /* Радиусы только снизу, повторяют форму карточки */
    border-radius: 0 0 20px 20px;
    padding: 15px 20px;
    text-decoration: none !important;
    letter-spacing: 0.5px;
    font-size: 14.5px;
    font-weight: 800;
    text-transform: uppercase;
    color: #fff !important;
    /* Анимированный градиент */
    background: linear-gradient(
        270deg,
        #ff6f61,
        #ff9a8b,
        #ff6f61,
        #e8453c
    );
    background-size: 300% 100%;
    animation: btnGradientShift 4s ease infinite;
    /* Внутренний блик сверху */
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.3),
        0 -2px 0 rgba(0,0,0,0.06) inset;
    position: relative;
    overflow: hidden;
    transition: filter 0.25s ease, letter-spacing 0.25s ease;
}

/* Бегущий блик */
.news-card__readmore::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255,255,255,0.32),
        transparent
    );
    transform: skewX(-18deg);
    transition: left 0.6s ease;
}

.news-card__readmore:hover::before {
    left: 130%;
}

.news-card__readmore:hover {
    filter: brightness(1.08) saturate(1.1);
    letter-spacing: 0.9px;
    color: #fff !important;
    transform: none !important;
}

.news-card__readmore:active {
    filter: brightness(0.93);
}

/* Иконки по краям */
.news-card__readmore i {
    font-size: 13px;
    transition: transform 0.25s ease;
    opacity: 0.85;
}

.news-card__readmore:hover i {
    transform: translateX(5px);
    opacity: 1;
}

/* Анимация градиента кнопки */
@keyframes btnGradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ── Навигация ── */
.news-navigation {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: 14px;
    padding: 14px 0 4px;
    flex-wrap: wrap;
}

.news-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 25px;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    color: #fff !important;
    letter-spacing: 0.2px;
}

.news-nav-btn--older {
    background: linear-gradient(90deg, #93c5fd, #3b82f6);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.28);
}

.news-nav-btn--newer {
    background: linear-gradient(90deg, #FF9999, #FF6F61);
    box-shadow: 0 4px 14px rgba(255, 111, 97, 0.28);
}

.news-nav-btn:hover {
    transform: translateY(-2px) scale(1.04) !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18) !important;
    color: #fff !important;
}

/* Пустое состояние */
.news-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 0;
    color: #aaa;
    font-size: 16px;
}

/* ── Анимация карточек ── */
@keyframes newsFadeIn {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

.news-card:nth-child(1)  { animation-delay: 0.05s; }
.news-card:nth-child(2)  { animation-delay: 0.10s; }
.news-card:nth-child(3)  { animation-delay: 0.15s; }
.news-card:nth-child(4)  { animation-delay: 0.20s; }
.news-card:nth-child(5)  { animation-delay: 0.25s; }
.news-card:nth-child(6)  { animation-delay: 0.30s; }
.news-card:nth-child(7)  { animation-delay: 0.35s; }
.news-card:nth-child(8)  { animation-delay: 0.40s; }
.news-card:nth-child(9)  { animation-delay: 0.45s; }
.news-card:nth-child(10) { animation-delay: 0.50s; }

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

@media (max-width: 860px) {
    .news-section {
        padding: 5px 0px 30px;
    }
    .news-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 480px) {
.news-card__thumb img {
    width: 100%;
    /* height: 100%; */
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
}
	
    .news-card__thumb {
        height: 120px;
    }
    .news-card__body {
        padding: 13px 14px 0;
    }
    .news-card__footer {
        margin-left: -14px;
        margin-right: -14px;
    }
    .news-card__title {
        font-size: 15px;
    }
    .news-card__readmore {
        font-size: 13px;
        padding: 13px 14px;
    }
}