/* ========================================
   БЛОГ / НОВОСТНАЯ СЕТКА (СЛАЙДЕР)
   ======================================== */

.news-section {
  padding: 70px 0 0;
  background-color: var(--color-bg-light, #f8fafc);
  border-top: 1px solid var(--color-border, #e2e8f0);
  position: relative;
  z-index: 10;
}

.new-container {
  margin-bottom: 60px;
}

.news-page {
  padding: 70px 0 0;
}

.news-header-wrap, .news-page-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 20px;
}

/* Обертка слайдера */
.news-slider-wrapper {
  position: relative;
  width: 100%;
}

/* Сетка новостей: на десктопе сетка по 3 в ряд */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
  gap: 16px;
  margin-bottom: -20px;
}

.news-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--color-border, #e2e8f0);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 35px rgba(5, 60, 60, 0.12);
  border-color: rgba(46, 219, 165, 0.4);
}

.news-card-image-wrap {
  position: relative;
  width: 100%;
  height: 160px;
  background: #0f172a;
  overflow: hidden;
}

.news-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-card:hover .news-card-img {
  transform: scale(1.05);
}

.news-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

.badge-law {
  background: #053c3c;
  color: #2edba5;
  border: 1px solid rgba(46, 219, 165, 0.3);
}

.badge-tech {
  background: #0284c7;
  color: #ffffff;
}

.badge-market {
  background: #d97706;
  color: #ffffff;
}

.news-card-content {
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--color-text-muted, #64748b);
  margin-bottom: 10px;
}

.news-meta i {
  color: var(--color-primary-light, #00966a);
  margin-right: 4px;
}

.news-title {
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
  margin-bottom: 5px;
}

.news-title a {
  color: var(--color-text, #0f172a);
  text-decoration: none;
  transition: color 0.2s ease;
}

.news-title a:hover {
  color: var(--color-primary-light, #00966a);
}

.news-excerpt {
  font-size: 14px;
  color: #475569;
  line-height: 1.55;
  margin-bottom: 10px;
  flex-grow: 1;
  white-space: pre-line;
}

.news-link-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-primary, #053c3c);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: gap 0.2s ease, color 0.2s ease;
}

.news-link-more i {
  font-size: 12px;
  color: var(--color-primary-light, #00966a);
}

.news-link-more:hover {
  color: var(--color-primary-light, #00966a);
  gap: 12px;
}

/* ========================================
   АДАПТИВНОСТЬ И СЛАЙДЕР ДЛЯ МОБИЛЬНЫХ/ПЛАНШЕТОВ
   ======================================== */

@media (max-width: 992px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Смартфоны и планшеты (до 768px): превращаем сетку в горизонтальный слайдер (свайп пальцем) */
@media (max-width: 768px) {
  .news-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    grid-template-columns: none;
    gap: 16px;
    margin-top: 24px;
    padding-bottom: 15px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .news-grid::-webkit-scrollbar {
    height: 6px;
  }
  .news-grid::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
  }

  .news-card {
    flex: 0 0 92%; /* Карточка занимает 85% экрана, показывая часть следующей для удобного свайпа */
    max-width: 320px;
    scroll-snap-align: start;
  }

  .news-card-image-wrap {
    height: 180px;
  }
}

/* Контейнер для центрирования кнопки под новостями */
.news-center-actions {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

/* Баннер-зеркало с огнем под новостями */
.news-mirror-banner {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    height: 70px;
    margin-top: 60px;
    overflow: hidden;
    background: #021f1f;
    border-top: 1px solid rgba(46, 219, 165, 0.2);
    border-bottom: 1px solid rgba(46, 219, 165, 0.2);
}

/* Холст с огненным шейдером */
.news-flame-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Контент поверх огня (кнопка по центру) */
.news-mirror-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Стиль зеркальной кнопки */
.news-mirror-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 30px;
    background: var(--color-glass-bg, rgba(5, 60, 60, 0.20));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(46, 219, 165, 0.4);
    border-radius: 50px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.25);
    transition: all 0.3s ease;
}

.news-mirror-btn:hover {
    background: rgba(5, 60, 60, 0.95);
    border-color: #2edba5;
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(46, 219, 165, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.4);
    color: #2edba5;
}

.news-mirror-btn i {
    color: #2edba5;
    transition: transform 0.3s ease;
}

.news-mirror-btn:hover i {
    transform: translateX(4px);
}