/* ==============================
   news.css — 뉴스룸 페이지
   ============================== */

/* ---------- Featured 슬라이드 ---------- */
.news-featured-wrap { position: relative; }
.news-featured-wrap .news-featured {
  animation: featFadeIn 0.5s ease;
}
@keyframes featFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 페이징 ---------- */
.news-pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 6px; margin-top: 40px; padding-top: 32px;
  border-top: 1px solid #E1E6EE;
}
.page-num {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  font-size: 14px; font-weight: 600; color: #6B7585;
  text-decoration: none; transition: all .2s;
}
.page-num:hover { background: #F5F7FA; color: #0A1F44; }
.page-num.active {
  background: #1E5EFF; color: #fff;
}
.page-arrow {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid #E1E6EE; color: #6B7585;
  text-decoration: none; transition: all .2s;
}
.page-arrow:hover { border-color: #1E5EFF; color: #1E5EFF; }



/* ---------- NEWS SECTION ---------- */
.news-section {
  background: #fff;
  padding: 96px 80px;
}
.news-section .container {
  max-width: 1280px;
  margin: 0 auto;
}

/* ---------- TAB FILTER ---------- */
.news-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.news-tab {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid #E1E6EE;
  background: #fff;
  color: #6B7585;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}
.news-tab.active {
  border-color: #1E5EFF;
  background: #1E5EFF;
  color: #fff;
}

/* ---------- NEWS GRID ---------- */
.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* ---------- FEATURED ARTICLE ---------- */
.news-featured {
  position: sticky;
  top: 104px;
  display: block;
}
.news-featured-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(150deg, #0A1F44, #1E5EFF);
  display: flex;
  align-items: flex-end;
  padding: 28px;
}
.news-featured-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.news-featured-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: #1E5EFF;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  z-index: 1;
}
.news-featured-overlay {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 600;
}
.news-featured-body {
  padding: 28px 4px 0;
}
.news-featured-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.news-cat-badge {
  font-size: 12px;
  font-weight: 700;
  color: #1E5EFF;
  background: #EEF3FF;
  padding: 4px 10px;
  border-radius: 999px;
}
.news-date {
  font-size: 13px;
  color: #6B7585;
}
.news-featured-title {
  font-size: 26px;
  font-weight: 800;
  color: #0A1F44;
  line-height: 1.4;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}
.news-featured-excerpt {
  font-size: 16px;
  color: #4A5468;
  line-height: 1.7;
  margin: 0;
}

/* ---------- NEWS LIST ---------- */
.news-list {
  display: flex;
  flex-direction: column;
}
.news-row {
  display: flex;
  gap: 16px;
  align-items: center;
  height: 90px;
  padding: 0 12px;
  border-radius: 8px;
  border-bottom: 1px solid #EEF1F6;
  transition: background 0.2s ease;
}
.news-row:last-child {
  border-bottom: none;
}
.news-row:hover {
  background: #F5F7FA;
}
.news-row:hover .news-row-title {
  color: #1E5EFF;
}
.news-row-thumb {
  flex: none;
  width: 100px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(150deg, #13315C, #3A6DF0);
}
.news-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.news-row-info {
  flex: 1;
  min-width: 0;
}
.news-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.news-row-cat {
  font-size: 11px;
  font-weight: 700;
  color: #1E5EFF;
}
.news-row-date {
  font-size: 12px;
  color: #9AA3B2;
}
.news-row-title {
  font-size: 15px;
  font-weight: 600;
  color: #0A1F44;
  line-height: 1.45;
  transition: color 0.2s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- REVEAL ANIMATION ---------- */
.reveal-news {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.reveal-news.visible {
  opacity: 1;
  transform: none;
}
.reveal-news-row {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.reveal-news-row.visible {
  opacity: 1;
  transform: none;
}

/* ---------- FOOTER GRID ---------- */
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1439px) {
  .news-section {
    padding-left: 48px;
    padding-right: 48px;
  }
}
@media (max-width: 1279px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
  .news-featured {
    position: static;
  }
}
@media (max-width: 767px) {
  .news-section {
    padding: 56px 20px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* News grid: single column on mobile */
  .news-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Featured article: full width, reduced image height */
  .news-featured {
    position: static;
  }
  .news-featured-thumb {
    aspect-ratio: 16 / 10;
    padding: 20px;
    border-radius: 10px;
  }
  .news-featured-badge {
    top: 14px;
    left: 14px;
    font-size: 11px;
    padding: 5px 10px;
  }
  .news-featured-body {
    padding: 20px 0 0;
  }
  .news-featured-title {
    font-size: 20px;
    margin-bottom: 10px;
  }
  .news-featured-excerpt {
    font-size: 14px;
  }

  /* News rows: smaller thumbnail, tighter layout */
  .news-row {
    height: auto;
    padding: 12px 0;
    gap: 12px;
  }
  .news-row-thumb {
    width: 72px;
    height: 48px;
    border-radius: 6px;
  }
  .news-row-title {
    font-size: 14px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .news-row-meta {
    margin-bottom: 4px;
  }
  .news-row-cat {
    font-size: 10px;
  }
  .news-row-date {
    font-size: 11px;
  }

  /* Tab buttons: horizontal scroll on mobile */
  .news-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 32px;
    padding-bottom: 4px;
  }
  .news-tabs::-webkit-scrollbar {
    display: none;
  }
  .news-tab {
    flex-shrink: 0;
    height: 36px;
    padding: 0 16px;
    font-size: 13px;
  }
}
@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  /* Very small screens: stack news row vertically */
  .news-row-thumb {
    width: 64px;
    height: 42px;
  }
}

/* Disable hover effects on touch devices */
@media (hover: none), (pointer: coarse) {
  .news-row:hover {
    background: transparent;
  }
  .news-row:hover .news-row-title {
    color: #0A1F44;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-news,
  .reveal-news-row {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
