/*
 * 새소식 게시판을 현재 사이트의 밝은 레이아웃과 골드 포인트 톤으로 구성합니다.
 * 참고 사이트의 정보 배치는 유지하되 색과 구분선 처리는 리마스터 톤을 따릅니다.
 */

.news-page {
  --news-ink: #11141b;
  --news-muted: #6d7280;
  --news-line: #e4e6ec;
  --news-yellow: #ffc000;
  background:
    radial-gradient(circle at 12% 28%, rgba(255, 192, 0, 0.06), transparent 30%),
    #ffffff;
}

.news-main .site-container,
.news-page .site-footer .site-container {
  width: min(calc(100% - 96px), 1520px);
}

/* 상단 비주얼 ------------------------------------------------------------- */
.news-hero {
  padding: 48px 0 28px;
}

.news-hero__frame {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  border-radius: 30px;
  background: #11141b;
  isolation: isolate;
}

.news-hero__frame > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.08);
  transform: scale(1.012);
}

.news-hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 9, 13, 0.95) 0%, rgba(7, 9, 13, 0.62) 34%, rgba(7, 9, 13, 0.08) 74%),
    linear-gradient(0deg, rgba(7, 9, 13, 0.52), transparent 60%);
}

.news-hero__copy {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 280px;
  width: min(56%, 720px);
  padding: 52px clamp(40px, 5vw, 82px);
  justify-content: center;
  flex-direction: column;
  color: #ffffff;
}

.news-hero__copy p {
  color: var(--news-yellow);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.news-hero__copy h1 {
  margin: 5px 0 12px;
  font-size: clamp(40px, 3.8vw, 62px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.news-hero__copy > span {
  color: rgba(255, 255, 255, 0.74);
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.7;
}

/* 게시판 ---------------------------------------------------------------- */
.news-board {
  padding-bottom: 120px;
}

.news-board__inner {
  scroll-margin-top: 104px;
}

.news-board__tabs {
  display: grid;
  overflow: hidden;
  border: 1px solid #d9dce2;
  border-radius: 16px;
  background: #f4f5f7;
  box-shadow: 0 18px 44px rgba(18, 24, 38, 0.08);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.news-board__tab {
  position: relative;
  display: grid;
  min-height: 80px;
  padding: 0 8px;
  place-items: center;
  border: 0;
  background: transparent;
  color: #7a7f89;
  font-size: clamp(15px, 1.2vw, 19px);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}

.news-board__tab + .news-board__tab::before {
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 0;
  width: 1px;
  background: #d9dce2;
  content: "";
}

.news-board__tab:hover,
.news-board__tab:focus-visible {
  color: var(--news-ink);
}

.news-board__tab.is-active {
  background: linear-gradient(110deg, #ffc000, #ffad00);
  color: var(--news-ink);
}

.news-board__tab.is-active::before,
.news-board__tab.is-active + .news-board__tab::before {
  opacity: 0;
}

.news-board__tab:focus-visible,
.news-board__page:focus-visible,
.news-board__row:focus-visible,
.news-board__write:focus-visible,
.news-board__search-button:focus-visible {
  outline: 3px solid rgba(255, 192, 0, 0.55);
  outline-offset: 2px;
}

/* 도구 영역 ------------------------------------------------------------- */
.news-board__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 30px 0 18px;
}

.news-board__count {
  color: var(--news-muted);
  font-size: 15px;
  font-weight: 700;
}

.news-board__count strong {
  color: var(--news-ink);
}

.news-board__search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.news-board__select,
.news-board__input {
  min-height: 46px;
  border: 1px solid var(--news-line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--news-ink);
  font-size: 14px;
  font-weight: 600;
}

.news-board__select {
  padding: 0 34px 0 14px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #9a9ea8 50%),
    linear-gradient(135deg, #9a9ea8 50%, transparent 50%);
  background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.news-board__input {
  width: clamp(180px, 22vw, 280px);
  padding: 0 14px;
}

.news-board__input::placeholder {
  color: #a3a7b0;
  font-weight: 500;
}

.news-board__select:focus-visible,
.news-board__input:focus-visible {
  border-color: #d0a000;
  outline: none;
}

.news-board__search-button {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: var(--news-ink);
  cursor: pointer;
  transition: background 180ms ease;
}

.news-board__search-button:hover {
  background: #2a2f3a;
}

.news-board__search-button span[aria-hidden="true"] {
  display: block;
  width: 13px;
  height: 13px;
  border: 2px solid var(--news-yellow);
  border-radius: 50%;
}

.news-board__search-button span[aria-hidden="true"]::after {
  position: absolute;
  top: 26px;
  left: 26px;
  width: 7px;
  height: 2px;
  background: var(--news-yellow);
  content: "";
  transform: rotate(45deg);
}

/* 목록 ----------------------------------------------------------------- */
.news-board__table {
  overflow: hidden;
  border: 1px solid var(--news-line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(18, 24, 38, 0.06);
}

.news-board__head {
    display: grid;
    padding: 0 16px;
    border-bottom: 1px solid var(--news-line);
    background: #fbfbfc;
    color: var(--news-muted);
    font-size: 13px;
    font-weight: 800;
    grid-template-columns: 84px minmax(0, 1fr) 110px 100px 88px;
    align-items: center;
    min-height: 52px;
    text-align: center;
}

.news-board__head span:nth-child(2) {
  text-align: left;
}

.news-board__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-board__item + .news-board__item {
  border-top: 1px solid #f0f1f4;
}

.news-board__row {
    display: grid;
    min-height: 62px;
    padding: 0 16px;
    align-items: center;
    color: var(--news-ink);
    grid-template-columns: 84px minmax(0, 1fr) 110px 100px 88px;
    text-align: center;
    text-decoration: none;
    transition: background 180ms ease;
}

.news-board__row:hover {
  background: #fffdf5;
}

.news-board__category {
  justify-self: center;
  color: var(--news-muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.news-board__title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.news-board__title b {
  overflow: hidden;
  font-size: clamp(14px, 1.1vw, 16px);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-board__row:hover .news-board__title b {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 고정 게시글은 골드 핀 표시와 굵은 제목으로 구분합니다. */
.news-board__pin {
  display: block;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  background: var(--news-yellow);
  clip-path: polygon(50% 0%, 62% 26%, 100% 34%, 72% 58%, 82% 100%, 50% 76%, 18% 100%, 28% 58%, 0% 34%, 38% 26%);
}

.news-board__item.is-pinned {
  background: #fffcf1;
}

.news-board__item.is-pinned .news-board__title b {
  font-weight: 800;
}

.news-board__author,
.news-board__date,
.news-board__views {
  color: var(--news-muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.news-board__empty {
  padding: 68px 20px;
  color: var(--news-muted);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

/* 페이지네이션 ---------------------------------------------------------- */
.news-board__pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 30px;
}

.news-board__pagination[hidden] {
  display: none;
}

.news-board__page {
  display: grid;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--news-ink);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.news-board__page:hover:not(:disabled) {
  background: #f4f5f7;
}

.news-board__page.is-active {
  background: var(--news-ink);
  color: var(--news-yellow);
}

.news-board__page--control {
  border-color: var(--news-line);
  color: var(--news-muted);
  font-weight: 500;
}

.news-board__page:disabled {
  color: #c4c7cf;
  cursor: default;
}

/* 글쓰기 --------------------------------------------------------------- */
.news-board__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

.news-board__write {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(110deg, #ffc000, #ffad00);
  color: var(--news-ink);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: filter 160ms ease;
}

.news-board__write:hover {
  filter: brightness(1.05);
}

.news-main {
    padding: 48px 0 120px;
}


/* 반응형 --------------------------------------------------------------- */
@media (max-width: 1199px) {
  .news-main .site-container,
  .news-page .site-footer .site-container {
    width: calc(100% - 64px);
  }

  .news-board__tab {
    min-height: 66px;
  }

  .news-board__head,
  .news-board__row {
    grid-template-columns: 78px minmax(0, 1fr) 92px 96px;
  }

  .news-board__head span:nth-child(5),
  .news-board__views {
    display: none;
  }
}

@media (max-width: 899px) {
  .news-main .site-container,
  .news-page .site-footer .site-container {
    width: calc(100% - 32px);
  }

  .news-hero {
    padding: 28px 0 20px;
  }

  .news-hero__frame,
  .news-hero__copy {
    min-height: 220px;
  }

  .news-hero__copy {
    width: 100%;
    padding: 34px 26px;
  }

  .news-board__tab::before {
    display: none;
  }

  .news-board__toolbar {
    display: block;
  }

  .news-board__search {
    margin-top: 14px;
  }

  .news-board__input {
    width: 100%;
    flex: 1;
  }

  /* 좁은 화면에서는 표 형태를 버리고 카드형으로 정보를 쌓습니다. */
  .news-board__head {
    display: none;
  }

  .news-board__row {
    display: grid;
    min-height: 0;
    padding: 18px 20px;
    gap: 8px 12px;
    grid-template-columns: auto minmax(0, 1fr);
    text-align: left;
  }

  .news-board__category {
    justify-self: start;
    grid-column: 1;
  }

  .news-board__title {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .news-board__title b {
    font-size: 15px;
    white-space: normal;
  }

  .news-board__author {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .news-board__date {
    grid-column: 1;
    grid-row: 3;
  }

  .news-board__views {
    display: block;
    grid-column: 2;
    grid-row: 3;
    justify-self: end;
  }

  .news-board__actions {
    justify-content: stretch;
  }

  .news-board__write {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 599px) {
  .news-board__tab {
    min-height: 54px;
    font-size: 14px;
  }

  .news-board__page {
    min-width: 32px;
    height: 32px;
  }
}

/* 상세 화면 ------------------------------------------------------------- */
.news-detail-main {
  padding: 48px 0 120px;
}

.news-detail__breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--news-muted);
  font-size: 14px;
  font-weight: 600;
}

.news-detail__breadcrumb a {
  color: var(--news-muted);
  text-decoration: none;
}

.news-detail__breadcrumb a:hover {
  color: var(--news-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.news-detail__breadcrumb strong {
  min-width: 0;
  overflow: hidden;
  color: var(--news-ink);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-detail__article {
  overflow: hidden;
  border: 1px solid var(--news-line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(18, 24, 38, 0.06);
}

.news-detail__article[hidden] {
  display: none;
}

.news-detail__header {
  position: relative;
  padding: 34px clamp(24px, 3vw, 42px) 26px;
  border-bottom: 1px solid var(--news-line);
  background: #fbfbfc;
}

.news-detail__badge {
  display: inline-block;
  color: var(--news-muted);
  font-size: 12px;
  font-weight: 700;
}

.news-detail__header h1 {
  margin: 14px 0 0;
  color: var(--news-ink);
  font-size: clamp(24px, 2.4vw, 36px);
  font-weight: 800;
  line-height: 1.32;
  letter-spacing: -0.04em;
  word-break: keep-all;
}

.news-detail__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  color: var(--news-muted);
  font-size: 14px;
  font-weight: 600;
}

.news-detail__meta span[aria-hidden="true"] {
  width: 1px;
  height: 11px;
  background: #c9ccd4;
}

.news-detail__meta b {
  color: var(--news-ink);
  font-weight: 700;
}

.news-detail__tools {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.news-detail__tool {
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid var(--news-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--news-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease;
}

.news-detail__tool:hover {
  border-color: #d0a000;
  color: var(--news-ink);
}

.news-detail__body {
  padding: 34px clamp(24px, 3vw, 42px) 12px;
  color: #2f333c;
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.85;
  word-break: keep-all;
}

.news-detail__body p + p {
  margin-top: 20px;
}

.news-detail__reaction {
  display: flex;
  justify-content: center;
  padding: 22px clamp(24px, 3vw, 42px) 34px;
}

.news-detail__like {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 8px;
  padding: 0 22px;
  border: 1px solid var(--news-line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--news-muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.news-detail__like:hover {
  border-color: #d0a000;
  color: var(--news-ink);
}

.news-detail__like.is-active {
  border-color: rgba(191, 140, 0, 0.5);
  background: rgba(255, 192, 0, 0.12);
  color: #8a6400;
}

.news-detail__like-icon {
  display: block;
  width: 14px;
  height: 14px;
  background: currentcolor;
  clip-path: polygon(50% 100%, 4% 56%, 4% 26%, 26% 6%, 50% 24%, 74% 6%, 96% 26%, 96% 56%);
  opacity: 0.72;
}

.news-detail__like:focus-visible,
.news-detail__tool:focus-visible,
.news-detail__back:focus-visible,
.news-comments__submit:focus-visible,
.news-comments__input:focus-visible,
.news-comments__actions button:focus-visible {
  outline: 3px solid rgba(255, 192, 0, 0.55);
  outline-offset: 2px;
}

.news-detail__missing {
  padding: 84px 20px;
  border: 1px solid var(--news-line);
  border-radius: 16px;
  background: #ffffff;
  color: var(--news-muted);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

.news-detail__missing[hidden] {
  display: none;
}

.news-detail__missing a {
  display: block;
  margin-top: 12px;
  color: #8a6400;
  font-weight: 800;
}

/* 댓글 (서버 연동 전 UI) ------------------------------------------------ */
.news-comments {
  margin-top: 30px;
  padding: 30px clamp(24px, 3vw, 42px) 34px;
  border: 1px solid var(--news-line);
  border-radius: 16px;
  background: #ffffff;
}

.news-comments[hidden] {
  display: none;
}

.news-comments__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.news-comments__head h2 {
  margin: 0;
  color: var(--news-ink);
  font-size: 19px;
  font-weight: 800;
}

.news-comments__head h2 b {
  color: #8a6400;
}

.news-comments__form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin: 18px 0 26px;
}

.news-comments__input {
  flex: 1;
  min-height: 84px;
  padding: 14px;
  border: 1px solid var(--news-line);
  border-radius: 10px;
  background: #fbfbfc;
  color: var(--news-ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
}

.news-comments__input::placeholder {
  color: #a3a7b0;
}

.news-comments__submit {
  min-height: 84px;
  padding: 0 24px;
  border: 0;
  border-radius: 10px;
  background: var(--news-ink);
  color: var(--news-yellow);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: background 160ms ease;
}

.news-comments__submit:hover {
  background: #2a2f3a;
}

.news-comments__list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--news-line);
  list-style: none;
}

.news-comments__item {
  padding: 20px 0;
  border-bottom: 1px solid #f0f1f4;
}

.news-comments__item:last-child {
  border-bottom: 0;
}

.news-comments__author {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--news-muted);
  font-size: 13px;
}

.news-comments__author b {
  color: var(--news-ink);
  font-size: 14px;
  font-weight: 800;
}

.news-comments__item p {
  margin: 10px 0 0;
  color: #2f333c;
  font-size: 15px;
  line-height: 1.7;
}

.news-comments__actions {
  display: flex;
  gap: 14px;
  margin-top: 12px;
}

.news-comments__actions button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--news-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.news-comments__actions button:hover {
  color: var(--news-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.news-detail__footer {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.news-detail__back {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  padding: 0 30px;
  border: 1px solid var(--news-line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--news-ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease;
}

.news-detail__back:hover {
  border-color: #d0a000;
  background: #fffdf5;
}

@media (max-width: 899px) {
  .news-detail-main {
    padding: 28px 0 80px;
  }

  .news-comments__form {
    display: block;
  }

  .news-comments__submit {
    width: 100%;
    min-height: 48px;
    margin-top: 10px;
  }

  .news-detail__back {
    width: 100%;
    justify-content: center;
  }
}
