/* ==========================================================================
   NEWS SECTION (M2 Block)
   ========================================================================== */

/* Desktop Grid (>= 992px) */
@media (min-width: 992px) {
  #news .news-grid:not(.owl-carousel) {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
    margin-top: 48px;
    width: 100%;
  }
}

/* Card Styles */
#news .news-card {
  width: 100%;
  background: rgba(9, 34, 68, 0.65);
  border: 1px solid rgba(137, 182, 226, 0.2);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  box-sizing: border-box;
  backdrop-filter: blur(8px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

#news .news-card:hover {
  border-color: rgba(137, 182, 226, 0.45);
  background: rgba(9, 60, 109, 0.4);
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(4, 14, 30, 0.6);
}

#news .news-card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: 280px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-bottom: 1px solid rgba(137, 182, 226, 0.15);
  transition: transform 0.4s ease;
}

#news .news-card:hover .news-card__image {
  transform: scale(1.03);
}

#news .news-card__body {
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  box-sizing: border-box;
}

#news .news-card__date {
  font-family: var(--font-heading, inherit);
  font-size: 12px;
  font-weight: 700;
  color: #89B6E2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

#news .news-card__title {
  font-family: var(--font-heading, inherit);
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.35;
  margin-bottom: 10px;
}

#news .news-card__text {
  font-size: 13.5px;
  line-height: 1.55;
  color: #A0BBD8;
  margin-bottom: 20px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#news .news-card__link {
  font-family: var(--font-heading, inherit);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #89B6E2;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  margin-top: auto;
  align-self: flex-start;
}

#news .news-card__link:hover {
  color: #FFFFFF;
  transform: translateX(4px);
}

/* ==========================================================================
   OWL CAROUSEL & МОБИЛЬНАЯ АДАПТАЦИЯ (< 992px)
   ========================================================================== */
@media (max-width: 991px) {
  #news .news-grid {
    display: block !important;
    width: 100% !important;
    margin-top: 32px;
  }

  #news .news-grid.owl-carousel {
    display: block !important;
    width: 100% !important;
    margin-top: 32px;
  }

  #news .news-grid.owl-carousel .owl-stage-outer {
    width: 100% !important;
    overflow: hidden !important;
  }

  #news .news-grid.owl-carousel .owl-stage {
    display: flex !important;
  }

  #news .news-grid.owl-carousel .owl-item {
    display: flex !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  #news .news-grid .news-card,
  #news .news-grid.owl-carousel .news-card {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
  }

  #news .news-card__image {
    height: 250px;
    aspect-ratio: 4 / 3;
  }

  /* Owl Dots Navigation */
  #news .owl-dots {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    width: 100%;
  }

  .owl-theme #news .owl-dots .owl-dot span,
  #news .owl-dot span {
    display: none !important;
  }

  #news .owl-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(137, 182, 226, 0.25) !important;
    border: none;
    padding: 0;
    transition: all 0.25s ease;
    cursor: pointer;
  }

  #news .owl-dot.active {
    width: 26px;
    border-radius: 5px;
    background: #0966A2 !important;
    box-shadow: 0 0 10px rgba(9, 102, 162, 0.6);
  }
}

@media (max-width: 575px) {
  #news .news-card__image {
    height: 240px;
    aspect-ratio: 4 / 3;
  }
  #news .news-card__body {
    padding: 18px 16px;
  }
  #news .news-card__title {
    font-size: 15.5px;
  }
}
