/* ===== Utility ===== */
.hidden { display: none !important; }

/* ===== News section ===== */
.news-section { background: var(--bg); }

.news-loading,
.news-empty {
  text-align: center;
  padding: 64px 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ===== News list ===== */
.news-grid {
  display: flex;
  flex-direction: column;
  max-width: 960px;
  margin: 0 auto;
}

/* ===== News card ===== */
.news-card {
  border-bottom: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  transition: background var(--transition);
  scroll-margin-top: 72px;
}
.news-card:first-child { border-top: 1px solid var(--border); }
.news-card.open { background: var(--bg-light); }

/* ===== Card header (always visible) ===== */
.news-card-header {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 24px;
  padding: 28px 20px;
  transition: background var(--transition);
}
.news-card:hover .news-card-header,
.news-card.open .news-card-header { background: var(--bg-light); }

/* ===== Thumbnail ===== */
.news-card-img {
  flex-shrink: 0;
  width: 200px;
  height: 134px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--border);
}
.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== Text body (header part) ===== */
.news-card-body {
  flex: 1;
  min-width: 0;
}
.news-card-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
  display: block;
}
.news-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
  line-height: 1.35;
  transition: color var(--transition);
}
.news-card:hover .news-card-title,
.news-card.open .news-card-title { color: var(--accent); }
.news-card.open .news-card-excerpt { display: none; }
.news-card.open .news-card-img { display: none; }
.news-card-excerpt {
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ===== Chevron ===== */
.news-card-chevron {
  display: block;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.28s ease, border-color 0.22s ease;
  flex-shrink: 0;
  align-self: center;
  margin-left: 4px;
}
.news-card.open .news-card-chevron {
  transform: rotate(-135deg);
  border-color: var(--accent);
}

/* ===== Accordion detail ===== */
.news-card-detail {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.38s ease;
}
.news-card.open .news-card-detail {
  grid-template-rows: 1fr;
}
.news-card-detail-inner {
  overflow: hidden;
  min-height: 0;
}
.news-card-detail-content {
  padding: 4px 20px 36px;
}

/* ===== Carousel ===== */
.news-carousel {
  position: relative;
  margin-bottom: 20px;
  user-select: none;
}

.carousel-track { position: relative; }

.carousel-slide { display: none; }
.carousel-slide.active { display: block; }

.carousel-media {
  width: 100%;
  display: block;
  border-radius: 10px;
}
img.carousel-media {
  max-height: 480px;
  object-fit: cover;
}
video.carousel-media {
  max-height: 440px;
  background: #000;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.22);
  transition: background var(--transition), transform var(--transition);
  color: var(--primary);
  padding: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.carousel-btn:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.08);
}
.carousel-btn-prev { left: 10px; }
.carousel-btn-next { right: 10px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  border: none;
  padding: 0;
}
.carousel-dot.active {
  background: var(--accent);
  transform: scale(1.25);
}
.news-detail-text {
  font-size: 0.97rem;
  line-height: 1.85;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .news-card-header { flex-direction: column; gap: 14px; padding: 20px 16px; }
  .news-card-img { width: 100%; height: 200px; }
  .news-card-chevron { align-self: flex-start; margin-top: 2px; }
  .news-card-detail-content { padding: 4px 16px 28px; }
}
