/* ========== Base ========== */
:root {
  --accent-color: #111;         /* 번호/포커스 색상 */
  --dot-color: #ccc;            /* 비활성 도트 */
  --dot-active: #000;           /* 활성 도트 */
  --divider: #eee;              /* 항목 하단 경계 */
}

.latest-news-list {
  position: relative;
  overflow: hidden;             /* 슬라이드 영역 외부 감추기 */
  font-family: 'Pretendard', sans-serif;
}

.news-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #111;
}

.news-underline {
  border: none;
  border-bottom: 2px solid #222;
  margin-bottom: 16px;
  width: 100%;
}

/* ========== List ========== */
.latest-news-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.latest-news-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 16px;
  line-height: 1.6;
  padding: 10px 0;
  margin: 0;
  border-bottom: 1px solid var(--divider);
}

.latest-news-list li.empty {
  color: #999;
  border-bottom: none;
}

.latest-news-list li a {
  display: block;
  color: #111;
  text-decoration: none;
  font-weight: 500;
  /* 한 줄 말줄임 처리 */
  overflow: hidden;
  text-overflow: ellipsis;
  /* white-space: nowrap; */
  flex: 1 1 auto;
}

.latest-news-list li a:hover,
.latest-news-list li a:focus {
  text-decoration: underline;
}

/* ========== Number badge ========== */
.news-number {
  display: inline-block;
  width: 1.5em;
  text-align: left;
  font-weight: 700;
  color: var(--accent-color);
  flex: 0 0 auto;
}

/* ========== Slider (display 전환 방식) ========== */
.latest-news-wrapper {
  position: relative;
  overflow: hidden;
}

/* 기본은 숨김, 활성 페이지만 표시 */
.news-slide { display: none; }
.news-slide.active { display: block; }

/* 슬라이드 내부 UL 보정 (중복 정의 정리) */
.news-slide ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ========== Dots ========== */
.news-dots {
  margin-top: 12px;
  text-align: center;
  user-select: none;
}

.news-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 4px;
  border-radius: 50%;
  background: var(--dot-color);
  cursor: pointer;
  transition: transform .15s ease;
}

.news-dot.active { background: var(--dot-active); }

.news-dot:hover,
.news-dot:focus {
  transform: scale(1.15);
  outline: none;
}

/* ========== Responsive ========== */
@media (max-width: 480px) {
  .news-title { font-size: 17px; }
  .latest-news-list li { font-size: 15px; padding: 9px 0; }
  .news-number { width: 1.25em; }
}

/* ========== 감속 모션 선호 시 자동 전환만 부드럽게 ==========
   (자바스크립트 setInterval 전환에는 영향 없음) */
@media (prefers-reduced-motion: reduce) {
  .news-dot { transition: none; }
}
