/* 뉴스 페이지 전용 스타일 (news-kr.html)
   기존 사이트 CSS 위에 얹어 쓰며, 본문 클래스는 모두 nw- 로 시작한다.
   머리말·꼬리말은 사이트 검정 그대로 두고 본문만 밝게. */

body.nw-page {
  --nw-bg: #f7f8fa;
  --nw-surface: #fff;
  --nw-line: #e4e8ee;
  --nw-text: #101828;
  --nw-sub: #667085;
  --nw-accent: #009ade;
  --nw-accent-text: #0079b3;
  --nw-chip-bg: #e6f4fb;
  --nw-navy: #0e2a47;

  background-color: var(--nw-bg);
  min-width: 0;
  color: var(--nw-text);
  font-family: Pretendard, sans-serif;
}

/* 꼬리말은 자체 배경이 없어 본문 밝은 바탕이 비치므로 사이트 검정을 깐다 */
body.nw-page .section.footer {
  border-top: 0;
  background-color: #1d1d1d;
}

.nw-page [hidden] {
  display: none !important;
}

/* ---------- 본문 공통 ---------- */

.nw-main {
  padding: 92px 0 96px;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.nw-wrap {
  width: min(1200px, 100% - 64px);
  margin: 0 auto;
}

.nw-head {
  margin: 40px 0 36px;
}

.nw-eyebrow {
  margin: 0 0 10px;
  color: var(--nw-accent-text);
  font-family: Poppins, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2px;
}

.nw-title {
  margin: 0;
  color: var(--nw-text);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.25;
}

.nw-desc {
  margin: 12px 0 0;
  color: var(--nw-sub);
  font-size: 16px;
  line-height: 1.6;
}

.nw-section {
  /* 쪽 번호를 누르면 목록 머리로 올라간다. 고정 머리말에 가리지 않게 띄운다 */
  scroll-margin-top: 96px;
}

.nw-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 20px;
}

/* 구분 단추가 숨어도 연도 선택은 오른쪽에 둔다 */
.nw-year {
  margin: 0 0 0 auto;
}

.nw-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nw-filter {
  min-height: 36px;
  padding: 7px 16px;
  border: 1px solid var(--nw-line);
  border-radius: 999px;
  background-color: var(--nw-surface);
  color: #475467;
  font-family: Pretendard, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}

.nw-filter:hover {
  border-color: var(--nw-accent);
  color: var(--nw-accent-text);
}

.nw-filter[aria-pressed="true"] {
  border-color: var(--nw-navy);
  background-color: var(--nw-navy);
  color: #fff;
}

.nw-meta {
  margin: 0;
  color: var(--nw-sub);
  font-family: Poppins, sans-serif;
  font-size: 12.5px;
}

.nw-media {
  min-width: 0;
  overflow: hidden;
  color: var(--nw-sub);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nw-out {
  flex-shrink: 0;
  color: var(--nw-accent-text);
  font-size: 13px;
  font-weight: 600;
}

.nw-empty {
  margin: 0;
  padding: 40px 0;
  color: var(--nw-sub);
  font-size: 14px;
  text-align: center;
}

.nw-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- 카드 그리드 ---------- */

.nw-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nw-grid > li {
  display: flex;
}

/* 카드: 사진 없이 날짜 · 제목 · 언론사만 둔다. 위쪽 파랑 선은 마우스를 올리면 진해진다 */
.nw-card {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
  padding: 22px 22px 20px;
  border: 1px solid var(--nw-line);
  border-top: 3px solid var(--nw-chip-bg);
  border-radius: 16px;
  background-color: var(--nw-surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 16px 40px -28px rgba(16, 24, 40, .35);
  color: inherit;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.nw-card:hover {
  border-top-color: var(--nw-accent);
  transform: translateY(-4px);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 24px 48px -28px rgba(0, 154, 222, .45);
}

/* 구분 딱지: 언론 보도는 연한 파랑, 회사 소식은 남색. 회사 소식이 한 건이라도 있을 때만 붙는다 */
.nw-type {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background-color: var(--nw-chip-bg);
  color: var(--nw-accent-text);
  font-family: Pretendard, sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.5;
}

.nw-type-own {
  background-color: var(--nw-navy);
  color: #fff;
}

.nw-card-title {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--nw-text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.nw-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--nw-line);
}

/* 연도 선택 */
.nw-year select {
  min-height: 40px;
  padding: 8px 36px 8px 16px;
  border: 1px solid var(--nw-line);
  border-radius: 8px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 14px center no-repeat,
    var(--nw-surface);
  color: var(--nw-text);
  font-family: Pretendard, sans-serif;
  font-size: 13px;
  font-weight: 600;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

/* 쪽 번호 (body 의 nw-page 와 겹치지 않게 nw-pagenum 으로 쓴다) */
.nw-pages {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
}

.nw-pagenum {
  width: 36px;
  height: 36px;
  border: 1px solid var(--nw-line);
  border-radius: 8px;
  background-color: var(--nw-surface);
  color: #475467;
  font-family: Poppins, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.nw-pagenum:hover {
  border-color: var(--nw-accent);
  color: var(--nw-accent-text);
}

.nw-pagenum[aria-current="page"] {
  border-color: var(--nw-navy);
  background-color: var(--nw-navy);
  color: #fff;
}

/* ---------- 반응형 ---------- */

@media screen and (max-width: 991px) {
  .nw-main {
    padding-top: 104px;
  }

  .nw-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }

  .nw-card {
    padding: 20px 18px 18px;
  }

  .nw-card-title {
    font-size: 15px;
  }
}

@media screen and (max-width: 767px) {
  .nw-wrap {
    width: calc(100% - 40px);
  }

  .nw-head {
    margin: 32px 0 28px;
  }

  .nw-title {
    font-size: 30px;
  }

  .nw-desc {
    font-size: 15px;
  }

  /* 휴대폰: 한 줄에 한 장, 글 길이만큼만 높게 */
  .nw-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .nw-card {
    gap: 8px;
    min-height: 0;
    padding: 16px 18px;
    border-radius: 14px;
  }

  .nw-card-title {
    font-size: 15px;
  }

  .nw-card-foot {
    padding-top: 10px;
  }
}
