/* ===== NEWSセクション（最終版） ===== */
.news-section {
  background-color: #2d3a5b;
  color: #fff;
  padding: 20px 16px;
  position: relative;
}

.news-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.news-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.news-controls {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.news-controls button {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
}

.news-slider {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 60px;
}

.news-item {
  display: none;
  animation: fadeSlideIn 0.5s ease forwards;
}

.news-item.active {
  display: block;
  animation: fadeSlideIn 0.5s ease forwards;
}

.news-meta {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.news-item[data-category="blog"] .news-meta {
  color: #c59d00;
}
.news-item[data-category="press"] .news-meta {
  color: #1d81c8;
}
.news-item[data-category="news"] .news-meta {
  color: #6cab27;
}

.news-text {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  transition: color 0.3s;
}

.news-text:hover {
  color: #ffdf80;
  cursor: pointer;
}

/* 進行バー（上下） */
.news-progress {
  background: transparent;
  width: 100%;
  height: 4px;
  overflow: hidden;
  position: absolute;
  left: 0;
}
.news-progress.top {
  top: 0;
}
.news-progress.bottom {
  bottom: 0;
}
.news-progress .bar {
  height: 100%;
  background: none;
  position: relative;
  overflow: hidden;
}
.news-progress .bar::before {
  content: '';
  position: absolute;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #facc15, #38bdf8, #a3e635);
  transform: translateX(-100%);
  animation: marqueeBar 5s linear forwards;
}
@media (min-width: 769px) {
  .news-section {
    padding-left: 50px;
  }
}

@keyframes marqueeBar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(0); }
}

@keyframes fadeSlideIn {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== モバイル対応（カード風） ===== */
@media (max-width: 768px) {
  .news-container {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .news-controls {
    display: none;
  }

  .news-slider {
    background-color: #fff; /* ← カード感残す */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 0;             /* ← padding は .news-item 側に移す */
    border-radius: 12px;
  }

  .news-title {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .news-meta {
    font-size: 11px;
  }

  .news-text {
    font-size: 14px;
    color: #333;
  }

  .news-text:hover {
    color: #facc15;
  }

  .news-progress .bar::before {
    background: linear-gradient(90deg, #2d3a5b, #a1a1aa);
  }

  /* === カテゴリ別 カラーカード背景（モバイル専用） === */
.news-item[data-category="blog"] {
  background-color: #fdf1d6;
}

.news-item[data-category="news"] {
  background-color: #d0f0f5;
}

.news-item[data-category="press"] {
  background-color: #ffe4e1;
}

/* カード風共通スタイル */
  .news-item {
    padding: 16px;
    border-radius: 12px;
    margin: 0;
    width: 100%;
    height: 100%;
  }
}
