@charset "utf-8";

/* =========================================================
 * Newsroom (ANG News)
 * - 히어로 슬라이드 + 카테고리 필터 + 검색 + 카드 그리드 + View More
 * - 사이트 공통 토큰 (--primary, --gray*) 재사용
 * ========================================================= */

:root {
  --news-badge-new: #FF3B3B;
}

/* -----------------------------------------------------
 * 1. Hero Slider (컨테이너 안, centered slides + peek)
 * --------------------------------------------------- */
.news-hero {
  position: relative;
  width: 100%;
  margin: 0 0 70px;
  overflow: hidden;            /* 양옆 슬라이드는 컨테이너 경계에서 클리핑 */
}
.news-hero .swiper { width: 100%; height: 480px; overflow: visible; }
.news-hero .swiper-slide {
  width: 72%;                  /* 가운데 슬라이드 폭 - peek 12% × 2 */
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .14);
  transition: opacity .5s ease, transform .5s ease;
  opacity: .38;
  transform: scale(.94);
  background: #f4f4f4;
}
.news-hero .swiper-slide-active {
  opacity: 1;
  transform: scale(1);
}
.news-hero .swiper-slide > a { display: block; width: 100%; height: 100%; color: #fff; }
.news-hero .slide-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.02);
  transition: transform 6s ease;
}
.news-hero .swiper-slide-active .slide-bg { transform: scale(1.08); }
.news-hero .slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.75) 100%);
}
.news-hero .slide-content {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 50px 60px 70px;
  color: #fff;
}
.news-hero .slide-meta {
  display: flex; align-items: center; gap: 14px;
  font-size: 16px; font-weight: 500; margin-bottom: 18px;
  letter-spacing: .02em;
}
.news-hero .slide-meta .divider { width: 1px; height: 14px; background: rgba(255,255,255,.5); }
.news-hero .slide-meta .cat { color: #fff; opacity: .95; }
.news-hero .slide-title {
  font-size: 42px; font-weight: 700; line-height: 1.25;
  max-width: 900px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: keep-all;
}
.news-hero .badge-new {
  position: absolute; top: 24px; right: 24px;
  background: var(--news-badge-new); color: #fff;
  font-size: 13px; font-weight: 700; letter-spacing: .05em;
  padding: 6px 14px; border-radius: 999px;
  text-transform: uppercase;
  z-index: 3;
}

/* Swiper controls */
.news-hero .swiper-button-next,
.news-hero .swiper-button-prev {
  width: 56px; height: 56px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 50%;
  color: #fff;
  transition: background .25s ease;
}
.news-hero .swiper-button-next:hover,
.news-hero .swiper-button-prev:hover { background: var(--primary); border-color: var(--primary); }
.news-hero .swiper-button-next::after,
.news-hero .swiper-button-prev::after { font-size: 18px; font-weight: 700; }
.news-hero .swiper-button-next { right: 32px; }
.news-hero .swiper-button-prev { left: 32px; }

.news-hero .swiper-pagination {
  bottom: 28px !important;
}
.news-hero .swiper-pagination-bullet {
  width: 32px; height: 4px; border-radius: 0;
  background: rgba(255,255,255,.4); opacity: 1;
  transition: background .25s ease, width .35s ease;
}
.news-hero .swiper-pagination-bullet-active {
  background: #fff; width: 56px;
}

/* 이미지 없을 때 - CSS 그라디언트 폴백 (히어로/카드 공용) */
.news-hero .slide-bg.is-fallback,
.news-card .thumb.is-fallback {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

/* 플레이스홀더 슬라이드 3종 (게시글 없을 때) */
.news-hero__placeholder { cursor: default; }
.news-hero__placeholder .slide-bg { background-color: var(--primary); }
.news-hero__placeholder.placeholder-1 .slide-bg {
  background-image: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}
.news-hero__placeholder.placeholder-2 .slide-bg {
  background-image: linear-gradient(135deg, var(--sky-blue) 0%, var(--primary) 100%);
}
.news-hero__placeholder.placeholder-3 .slide-bg {
  background-image: linear-gradient(135deg, var(--navy) 0%, var(--primary-dark) 100%);
}
.news-hero__placeholder .slide-overlay {
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.35) 100%);
}
.news-hero__placeholder .slide-content {
  /* 게시글 없을 때는 가운데 정렬로 더 점잖게 */
  bottom: 50%;
  transform: translateY(50%);
  text-align: center;
  padding: 30px;
}
.news-hero__placeholder .slide-meta {
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 13px;
  opacity: .85;
  margin-bottom: 14px;
}
.news-hero__placeholder .slide-title {
  max-width: 100%;
  font-size: 36px;
}
@media screen and (max-width: 1399px) {
  .news-hero__placeholder .slide-title { font-size: 24px; }
}
@media screen and (max-width: 767px) {
  .news-hero__placeholder .slide-title { font-size: 17px; }
  .news-hero__placeholder .slide-meta { font-size: 11px; letter-spacing: .12em; margin-bottom: 10px; }
}



@media screen and (max-width: 1399px) {
  .news-hero { margin-bottom: 50px; }
  .news-hero .swiper { height: 380px; }
  .news-hero .swiper-slide { border-radius: 12px; width: 76%; }
  .news-hero .slide-content { padding: 40px 40px 60px; }
  .news-hero .slide-title { font-size: 26px; }
  .news-hero .slide-meta { font-size: 14px; }
  .news-hero .badge-new { top: 18px; right: 18px; }
  .news-hero .swiper-button-next { right: 20px; }
  .news-hero .swiper-button-prev { left: 20px; }
  .news-hero .swiper-button-next,
  .news-hero .swiper-button-prev { width: 44px; height: 44px; }
}
@media screen and (max-width: 767px) {
  .news-hero { margin-bottom: 35px; }
  .news-hero .swiper { height: 280px; }
  .news-hero .swiper-slide { border-radius: 10px; width: 86%; }
  .news-hero .slide-content { padding: 24px 20px 50px; }
  .news-hero .slide-title { font-size: 18px; line-height: 1.35; }
  .news-hero .slide-meta { font-size: 12px; gap: 10px; margin-bottom: 10px; }
  .news-hero .badge-new { top: 14px; right: 14px; font-size: 11px; padding: 5px 10px; }
  .news-hero .swiper-button-next,
  .news-hero .swiper-button-prev { display: none; }
  .news-hero .swiper-pagination { bottom: 12px !important; }
  .news-hero .swiper-pagination-bullet { width: 20px; }
  .news-hero .swiper-pagination-bullet-active { width: 34px; }
}

/* -----------------------------------------------------
 * 2. Toolbar (Category + Search)
 * --------------------------------------------------- */
.news-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 30px; flex-wrap: wrap;
  padding: 0 0 50px;
  border-bottom: 1px solid var(--light-gray1);
  margin-bottom: 60px;
}
.news-cats {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.news-cat-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 42px; padding: 0 22px;
  border-radius: 999px;
  font-size: 16px; font-weight: 500; color: var(--gray1);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
  flex-shrink: 0;                       /* 좁은 컨테이너에서 버튼 squash 방지 */
  text-decoration: none;
}
.news-cat-btn:hover { color: var(--primary); }
.news-cat-btn.active {
  background: var(--primary); color: #fff;
  border-color: var(--primary);
}

.news-search { position: relative; width: 280px; flex-shrink: 0; }
.news-search input {
  width: 100%; height: 44px;
  border: 1px solid var(--light-gray1);
  border-radius: 999px;
  padding: 0 50px 0 22px;
  font-size: 15px; color: #000;
  background: #fff;
  outline: none;
  font-family: inherit;
}
.news-search input::placeholder { color: var(--gray3); }
.news-search input:focus { border-color: var(--primary); }
.news-search button {
  position: absolute; top: 50%; right: 6px;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  border: none; background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: background .2s ease;
}
.news-search button:hover { background: var(--primary-dark); }
.news-search button svg { width: 14px; height: 14px; }

@media screen and (max-width: 1399px) {
  .news-toolbar { padding-bottom: 35px; margin-bottom: 40px; gap: 20px; }
  .news-cat-btn { height: 38px; padding: 0 18px; font-size: 14px; }
  .news-search { width: 240px; }
  .news-search input { height: 40px; font-size: 14px; padding-right: 46px; }
  .news-search button { width: 30px; height: 30px; }
}
@media screen and (max-width: 767px) {
  .news-toolbar { padding-bottom: 25px; margin-bottom: 30px; flex-direction: column; align-items: stretch; gap: 15px; }
  .news-cats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);             /* 3열 × 2행 */
    gap: 8px;
    margin: 0;
  }
  .news-cat-btn {
    height: auto; min-height: 38px;                    /* 긴 영문 줄바꿈 시 자동 확장 */
    padding: 6px 8px;
    font-size: 12px;
    line-height: 1.25;
    white-space: normal;                               /* 텍스트 줄바꿈 허용 */
    word-break: keep-all;                              /* 한글 단어 중간에서 안 끊기게 */
    text-align: center;
    min-width: 0;                                      /* grid item 이 콘텐츠보다 작아질 수 있게 */
  }
  .news-search { width: 100%; }
}

/* -----------------------------------------------------
 * 3. Card Grid
 * --------------------------------------------------- */
.news-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 60px 32px;
  list-style: none; padding: 0; margin: 0;
}
.news-grid > li { display: flex; }
.news-card {
  display: flex; flex-direction: column;
  width: 100%;
  text-decoration: none; color: inherit;
  transition: transform .25s ease;
}
.news-card .thumb {
  position: relative;
  width: 100%; aspect-ratio: 16 / 11;
  overflow: hidden;
  border-radius: 10px;
  background: var(--light-gray4);
  border: 1px solid var(--light-gray2);
}
.news-card .thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .55s ease;
}
.news-card .thumb .badge-new {
  position: absolute; top: 14px; right: 14px;
  background: var(--news-badge-new); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: .05em;
  padding: 5px 10px; border-radius: 999px;
  text-transform: uppercase;
  z-index: 2;
}
.news-card .body {
  display: flex; flex-direction: column;
  padding: 22px 4px 0;
  flex: 1 1 auto;
}
.news-card .cat {
  display: block;
  font-size: 14px; font-weight: 600;
  color: var(--primary);
  margin-bottom: 12px;
  letter-spacing: .01em;
}
.news-card .title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 20px; font-weight: 700; line-height: 1.4;
  color: #111;
  word-break: keep-all;
  min-height: 2.8em;
}
.news-card .date {
  display: block;
  margin-top: auto;
  padding-top: 18px;
  font-size: 14px; color: var(--gray2);
}

@media (hover: hover) {
  .news-card:hover { transform: translateY(-4px); }
  .news-card:hover .thumb img { transform: scale(1.06); }
  .news-card:hover .title { color: var(--primary); }
}

@media screen and (max-width: 1399px) {
  .news-grid { grid-template-columns: repeat(3, 1fr); gap: 45px 22px; }
  .news-card .body { padding-top: 18px; }
  .news-card .cat { font-size: 13px; margin-bottom: 8px; }
  .news-card .title { font-size: 17px; }
  .news-card .date { font-size: 13px; padding-top: 14px; }
}
@media screen and (max-width: 767px) {
  .news-grid { grid-template-columns: repeat(1, 1fr); gap: 36px; }
  .news-card .thumb { aspect-ratio: 16 / 10; }
  .news-card .title { font-size: 16px; }
}

/* Empty state */
.news-empty {
  grid-column: 1 / -1;
  padding: 80px 20px;
  text-align: center;
  color: var(--gray2);
  font-size: 17px;
  border: 1px solid var(--light-gray1);
  border-radius: 12px;
  background: var(--light-gray5);
}

/* Loading shimmer */
.news-grid.is-loading { opacity: .5; pointer-events: none; transition: opacity .2s; }

/* -----------------------------------------------------
 * 4. View More button
 * --------------------------------------------------- */
.news-more-wrap {
  display: flex; justify-content: center;
  padding-top: 80px;
}
.news-more {
  display: inline-flex; align-items: center; gap: 12px;
  height: 60px; padding: 0 42px;
  border: 1px solid var(--gray3);
  border-radius: 999px;
  background: #fff;
  font-size: 16px; font-weight: 500; color: #111;
  cursor: pointer;
  transition: all .2s ease;
  font-family: inherit;
}
.news-more::after {
  content: '';
  width: 14px; height: 14px;
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12l7 7 7-7'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform .25s ease;
}
.news-more:hover {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.news-more:hover::after {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12l7 7 7-7'/%3E%3C/svg%3E");
  transform: translateY(2px);
}
.news-more.is-loading { pointer-events: none; opacity: .6; }
.news-more.is-loading::after { animation: news-spin 1s linear infinite; }
.news-more[disabled],
.news-more.is-done {
  display: none;
}
@keyframes news-spin {
  to { transform: rotate(360deg); }
}

@media screen and (max-width: 1399px) {
  .news-more-wrap { padding-top: 60px; }
  .news-more { height: 52px; padding: 0 34px; font-size: 15px; }
}
@media screen and (max-width: 767px) {
  .news-more-wrap { padding-top: 40px; }
  .news-more { height: 48px; padding: 0 28px; font-size: 14px; }
}

/* -----------------------------------------------------
 * 5. Detail view header tweaks (notice-view)
 * --------------------------------------------------- */
.board-view-head .badge-new {
  display: inline-flex; align-items: center;
  vertical-align: middle;
  background: var(--news-badge-new); color: #fff;
  font-size: 13px; font-weight: 700; line-height: 1; letter-spacing: .05em;
  padding: 7px 12px; border-radius: 999px;
  margin-left: 14px;
  transform: translateY(-5px);
  text-transform: uppercase;
}
@media screen and (max-width: 1399px) {
  .board-view-head .badge-new { font-size: 11px; padding: 6px 10px; margin-left: 10px; transform: translateY(-3px); }
}
@media screen and (max-width: 767px) {
  .board-view-head .badge-new { font-size: 10px; padding: 5px 9px; margin-left: 8px; transform: translateY(-2px); }
}
.board-view-head .cat {
  display: inline-block;
  font-size: 16px; font-weight: 600;
  color: var(--primary);
  margin-bottom: 12px;
}
