/* ═══════════════════════════════════════════════════════════════
   jc-news — Joyconnect News 공통 섹션 (home · business · joyconnect 공유)
   joyconnect 디자인 기준
═══════════════════════════════════════════════════════════════ */

/* ── 섹션 ── */
.jc-news {
  background: #ffffff;
  padding: 120px 0;
}

/* ── 내부 컨테이너 ── */
.jc-news__inner {
  width: var(--jc-news-content-width, min(1200px, calc(100% - 160px)));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* ── 헤드 ── */
.jc-news__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.jc-news__title {
  color: #f4b540;
  width: 385px;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.5px;
  margin: 0;
  font-family: "Pretendard", sans-serif;
}

/* jc-btn 시스템 위임 — desktop은 shared md round gray CTA 사용, hover 톤만 보정 */
.jc-news__btn {
  /* news 배경(#fff)이 밝아서 rgba(white,0.1) hover가 안 보임 — 회색으로 오버라이드 */
  --jc-btn-bg-hover: rgba(158, 158, 158, 0.12);
  --jc-btn-bg-active: rgba(158, 158, 158, 0.28);
  white-space: nowrap;
}
.jc-news__btn .jc-btn__icon {
  flex-shrink: 0;
  display: block;
}

/* ── 카드 그리드 ── */
.jc-news__grid {
  display: block;
  overflow: visible;
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin: 0;
}

.jc-news__grid--marquee {
  overflow: visible;
}

.jc-news__track {
  display: block;
  width: 100%;
  animation: none;
  will-change: auto;
}

.jc-news__track.is-static {
  animation: none;
}

.jc-news__lane {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
  width: 100%;
  padding-right: 0;
}

.jc-news__lane[aria-hidden="true"] {
  display: none;
}

@media (min-width: 1025px) {
  .jc-news__lane > .jc-news__card:nth-child(n + 4) {
    display: none;
  }
}

/* ── 카드 ── */
.jc-news__card {
  min-width: 0;
  width: 100%;
  height: 400px;
  background: #ffffff;
  border-radius: 6px;
  padding: 24px;
  box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  flex-shrink: 1;
  position: relative;
  overflow: hidden;
  transition: background 0.2s ease;
}

.jc-news__card--placeholder {
  opacity: 1;
}

.jc-news__card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
  border-radius: inherit;
}

/* ── 카드 Hover (Figma: #FFECCA → #FEF9F0) ── */
.jc-news__card:is(:hover, :focus-within) {
  background: linear-gradient(180deg, #ffecca 0%, #fef9f0 100%);
}

/* ── 미디어 (썸네일) ── */
.jc-news__media {
  width: 100%;
  height: auto;
  aspect-ratio: 378.67 / 240;
  border-radius: 6px;
  background: #ececec center / cover no-repeat;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.jc-news__media.has-image {
  background-color: transparent;
}

/* ── 카피 (텍스트 영역) ── */
.jc-news__copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.jc-news__card-title {
  font-size: 20px;
  font-weight: 500;
  color: #000000;
  margin: 0;
  line-height: 1.4;
  font-family: "Pretendard", sans-serif;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.4em * 2);
}

.jc-news__card--placeholder .jc-news__card-title {
  color: #000000;
}

.jc-news__card-date {
  font-size: 14px;
  line-height: 1.4;
  color: #b4b4b4;
  font-family: "Pretendard", sans-serif;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   반응형
═══════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .jc-news {
    padding: 80px 0;
    background: #f9f9f9;
  }
  .jc-news__inner {
    width: var(--jc-news-content-width, calc(100% - 160px));
    gap: 36px;
  }
  .jc-news__title {
    font-size: 28px;
  }
  .jc-news__lane {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .jc-news__card {
    height: auto;
    padding: 16px;
  }
  .jc-news__media {
    height: auto;
    aspect-ratio: 378.67 / 240;
  }
  .jc-news__card-title {
    font-size: 14px;
    line-height: 1.3;
    min-height: calc(1.3em * 2);
  }
  .jc-news__card-date {
    font-size: 13px;
    line-height: 1.3;
  }
}

@media (max-width: 640px) {
  .jc-news {
    padding: 20px 0;
    background: #ffffff;
  }
  .jc-news__inner {
    width: var(--jc-news-content-width, calc(100% - 40px));
    gap: 16px;
    align-items: center;
  }
  .jc-news__head {
    display: contents;
  }
  .jc-news__title {
    order: 1;
    width: 100%;
    font-size: 20px;
    line-height: 1.3;
  }
  .jc-news__grid {
    order: 2;
    width: 100%;
    overflow: visible;
    padding: 0;
    margin: 0;
  }
  .jc-news__track {
    animation: none !important;
    width: 100%;
    will-change: auto;
  }
  .jc-news__lane {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-right: 0;
  }
  .jc-news__btn.jc-btn--round.jc-btn--md.jc-btn--gray {
    order: 3;
    align-self: center;
    width: fit-content;
    margin: 0 auto;
    --jc-btn-height: 32px;
    --jc-btn-font-size: 12px;
    --jc-btn-gap: 4px;
    --jc-btn-min-width: 80px;
    max-width: 280px;
  }
  .jc-news__card {
    min-width: 0;
    width: 100%;
    max-width: none;
    height: auto;
    padding: 4px;
    border-radius: 5.579px;
    gap: 0;
  }
  .jc-news__media {
    height: auto;
    aspect-ratio: 142 / 97;
    margin: 0;
    border-radius: 5.579px;
  }
  .jc-news__copy {
    display: none;
  }
}
