/* ============================================================================
   AI 뉴스 (목록 · 기사)
   style.css 의 변수와 .wrap, .sec-head, .h2, .eyebrow, .lead 를 그대로 씁니다.
   위 여백 130px 는 .hero 와 같은 값으로, 고정 상단 메뉴에 글자가 가리지 않게 합니다.
   ============================================================================ */

.news-hero { padding: 130px 0 0; }
.news-hero .h2 { margin: 20px 0 0; }

/* ── 목록 ─────────────────────────────────────────────────────────────────── */

.news-feed { padding-bottom: var(--sec, 96px); }

.news-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  padding: 40px 0 0;
  list-style: none;
  margin: 0;
}

/* 목록 글은 자바스크립트가 아니라 서버가 그려 넣으므로
   main.js 의 [data-fade] 등장 처리(초기 1회 수집) 대신 CSS 로 직접 등장시킵니다. */
@keyframes newsIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.news-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r, 16px);
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
  transition: border-color .3s, transform .3s;
  animation: newsIn .6s var(--reveal-ease, ease) both;
}
.news-card:hover { border-color: var(--n2); transform: translateY(-3px); }

.news-card a {
  display: block;
  padding: 24px;
  text-decoration: none;
  color: inherit;
}
/* 카드 전체를 누를 수 있게 하되, 링크는 제목 하나만 두어 읽기 프로그램이 헷갈리지 않게 합니다 */
.news-card a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }

.news-card__date { font-size: 13px; color: var(--ink-3); }
.news-card__title {
  margin: 10px 0 0;
  font-size: 19px; font-weight: 700; line-height: 1.45;
  letter-spacing: -.02em;
}
.news-card__desc {
  margin: 12px 0 0;
  font-size: 15px; line-height: 1.65; color: var(--ink-2);
}
.news-card__more {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px; font-size: 14px; color: var(--n2);
}
.news-card__more svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.news-empty { padding: 80px 0; text-align: center; color: var(--ink-3); }

/* ── 쪽 넘김 ──────────────────────────────────────────────────────────────── */

.news-pager { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 48px 0 0; }
.news-pager a, .news-pager span {
  min-width: 40px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; text-align: center; text-decoration: none; color: var(--ink-2);
  transition: border-color .2s, background-color .2s;
}
.news-pager a:hover { border-color: var(--n2); background: rgba(255,255,255,.05); }
.news-pager .is-now { border-color: var(--n2); background: rgba(255,255,255,.09); color: #fff; }

/* ── 기사 ─────────────────────────────────────────────────────────────────── */

.article { padding: 130px 0 var(--sec, 96px); }
/* 가로 폭은 사이트 기준 폭(--wrap)에 맞춥니다.
   좁게 잡으면 상단 메뉴·푸터와 왼쪽 선이 어긋나 보입니다. */
.article__inner { max-width: var(--wrap, 1280px); margin-inline: auto; }

.article__meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 14px; color: var(--ink-3); }
.article__title {
  margin: 18px 0 0;
  font-size: clamp(28px, 4.4vw, 46px); font-weight: 800;
  line-height: 1.25; letter-spacing: -.035em;
}
.article__lead { margin: 20px 0 0; font-size: 17px; line-height: 1.7; color: var(--ink-2); }

.article__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; list-style: none; padding: 0; }
.article__tags li {
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; color: var(--ink-3);
}

.article__body { margin-top: 44px; border-top: 1px solid var(--line); padding-top: 8px; }
.article__body h2 {
  margin: 44px 0 0;
  font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; letter-spacing: -.03em;
}
.article__body p { margin: 16px 0 0; font-size: 16.5px; line-height: 1.85; color: var(--ink-2); }

/* 사장님께 무슨 의미인가 */
.article__take {
  margin: 56px 0 0; padding: 28px;
  border: 1px solid var(--line); border-radius: var(--r, 16px);
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
}
.article__take h2 { margin: 0; font-size: 19px; font-weight: 700; }
.article__take ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.article__take li { position: relative; padding-left: 28px; font-size: 15.5px; line-height: 1.7; color: var(--ink-2); }
.article__take li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--n2);
}

/* 참고한 원문 */
.article__src { margin: 48px 0 0; }
.article__src h2 { margin: 0; font-size: 17px; font-weight: 700; }
.article__src p { margin: 8px 0 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.7; }
.article__src ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.article__src a { color: var(--ink-2); font-size: 14.5px; line-height: 1.6; text-decoration: none; }
.article__src a:hover { color: #fff; text-decoration: underline; }
.article__src .src-name { color: var(--ink-4); font-size: 13px; }

.article__back { display: inline-flex; align-items: center; gap: 8px; margin-top: 52px; color: var(--n2); text-decoration: none; font-size: 15px; }
.article__back:hover { text-decoration: underline; }
.article__back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

@media (max-width: 640px) {
  .news-hero { padding-top: 108px; }
  .article { padding-top: 108px; }
  .news-cards { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .news-card { animation: none; }
  .news-card:hover { transform: none; }
}
