﻿/* Created on 18 March 2026 */

.news-container {
  width: 100%;
  max-width: 720px;
  height: 320px;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  border-radius: 16px;
  background: #ffffff;
  /* font-family: -apple-system, BlinkMacSystemFont, sans-serif; */

  /* Smooth + native momentum */
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;

  /* Snap scrolling */
  scroll-snap-type: y mandatory;

  /* Hide scrollbar */
  scrollbar-width: none;
}
.news-container::-webkit-scrollbar {
  display: none;
}

/* Track */
.news-track {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}

/* Card */
.news-item {
  display: flex;
  gap: 14px;
  padding: 14px;
  margin: 8px 12px;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);

  /* Snap each card */
  scroll-snap-align: start;

  transition: transform 0.2s, box-shadow 0.2s;
}

.news-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

/* Image */
.news-item img {
  width: 110px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

/* Content */
.news-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.3;

  display: -webkit-box;
  -webkit-line-clamp: 2;     /* number of lines */
  -webkit-box-orient: vertical;

  overflow: hidden;
}

.meta {
  font-size: 12px;
  color: #777;
}

/* Fade gradients */
.fade-top,
.fade-bottom {
  position: sticky;
  left: 0;
  width: 100%;
  height: 40px;
  pointer-events: none;
  z-index: 5;
}

.fade-top {
  top: 0;
  background: linear-gradient(to bottom, white, transparent);
}

.fade-bottom {
  bottom: 0;
  background: linear-gradient(to top, white, transparent);
}

/* Mobile */
@media (max-width: 500px) {
  .news-container {
    height: 280px;
  }

  .news-item img {
    width: 90px;
    height: 70px;
  }

  .title {
    font-size: 14px;
  }
}