@charset "UTF-8";
/* ============================================================
   NEWNEEK 클론 — 04-components.css
   공통 컴포넌트: 카드/칩/AD 배너/사이드바 위젯/버튼
   GeneratePress 변환 시 매핑: docs/wordpress-mapping.md
   ============================================================ */

/* ---------- 썸네일 공통 ---------- */
.thumb {
  position: relative;
  aspect-ratio: var(--thumb-ratio);
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-skeleton);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 메타 (카테고리 · 날짜) ---------- */
.meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--sp-2);
}

.meta__category {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--text-body);
}

.meta__date {
  font-size: var(--fs-xs);
  color: var(--text-subtle);
}

/* ---------- 기본 아티클 카드 (메인 그리드 / 관련 아티클) ----------
   LOOP-GRID 아이템: 데스크톱 세로형(이미지 상단), 모바일 가로형(썸네일 우측 103px) */
.post-card {
  display: grid;
  grid-template-columns: auto 103px;
  align-items: center;
  gap: var(--sp-4);
}

.post-card .thumb {
  order: 2;
}

.post-card__body {
  order: 1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: var(--sp-2);
}

.post-card__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  color: var(--text-strong);
}

.post-card:hover .post-card__title {
  color: var(--color-primary);
}

.post-card .meta {
  flex-direction: row;
}

@media (min-width: 768px) {
  .post-card {
    grid-template-columns: 4fr 6fr;
    gap: var(--sp-3);
  }

  .post-card .thumb {
    order: 1;
  }

  .post-card__body {
    order: 2;
  }
}

@media (min-width: 1024px) {
  .post-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .post-card .thumb {
    order: 0;
    width: 100%;
  }

  .post-card__body {
    order: 0;
    width: 100%;
  }

  .post-card__title {
    font-size: var(--fs-lg);
  }
}

/* ---------- 피처드 카드 (메인/카테고리 상단 대형) ---------- */
.feature-card {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: var(--sp-3);
}

.feature-card__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--text-strong);
}

.feature-card__summary {
  margin-top: var(--sp-2);
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
  color: var(--text-body);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feature-card .meta {
  margin-top: var(--sp-2);
}

@media (min-width: 768px) {
  .feature-card {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-8);
  }

  .feature-card__title {
    font-size: var(--fs-2xl);
  }

  .feature-card__summary {
    margin-top: var(--sp-3);
    font-size: var(--fs-base);
  }

  .feature-card .meta {
    margin-top: var(--sp-4);
  }
}

/* ---------- 카테고리 피처드 (5:7 비율) ---------- */
.feature-card--category {
  margin-bottom: var(--sp-6);
}

@media (min-width: 768px) {
  .feature-card--category {
    grid-template-columns: 5fr 7fr;
    margin-bottom: var(--sp-8);
  }

  .feature-card--category .feature-card__title {
    font-size: var(--fs-xl);
  }
}

/* ---------- 가로형 리스트 카드 (카테고리/태그 리스트) ---------- */
.row-card {
  display: grid;
  grid-template-columns: 103px auto;
  align-items: center;
  gap: var(--sp-4);
}

.row-card__title {
  margin-bottom: var(--sp-3);
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  color: var(--text-strong);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.row-card__summary {
  display: none;
  margin-bottom: var(--sp-3);
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
  color: var(--text-subtle);
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.row-card__author {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--text-body);
}

.row-card .meta__date {
  margin-left: var(--sp-2);
}

.row-card:hover .row-card__title {
  color: var(--color-primary);
}

@media (min-width: 768px) {
  .row-card {
    grid-template-columns: 4fr 6fr;
  }
}

@media (min-width: 1024px) {
  .row-card__title {
    font-size: var(--fs-lg);
  }

  .row-card__summary {
    display: -webkit-box;
    font-size: var(--fs-base);
    color: var(--text-body);
    -webkit-line-clamp: 2;
  }
}

/* ---------- 칩 ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 5px var(--sp-3);
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--text-body);
}

.chip--outline {
  height: 30px;
  padding: 6px 14px;
  border: 1px solid var(--border-default);
  background: var(--bg-subtle);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  line-height: 1.15;
  color: var(--text-body);
}

.chip--primary {
  align-self: flex-start;
  height: auto;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-md);
  background: var(--color-primary-50);
  font-size: var(--fs-xs);
  color: var(--color-primary);
}

/* ---------- AD 배너 ---------- */
.ad-banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.ad-banner img {
  width: 100%;
  height: auto;
}

.ad-banner__badge {
  position: absolute;
  top: var(--sp-2);
  right: var(--sp-2);
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.45);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  color: var(--text-inverse);
}

/* 그레이 인라인 AD (카테고리 리스트 내) */
.ad-card {
  position: relative;
  display: flex;
  height: 96px;
  width: 100%;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  padding-inline: var(--sp-5);
}

@media (min-width: 768px) {
  .ad-card {
    height: 120px;
    gap: var(--sp-5);
  }
}

.ad-card__title {
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  color: var(--text-strong);
  margin-bottom: var(--sp-1);
}

.ad-card__desc {
  font-size: var(--fs-sm);
  color: var(--text-subtle);
}

.ad-card__thumb {
  width: 96px;
  height: 64px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

/* ---------- 구독 유도 스티키 바 (메인 하단) ---------- */
.subscribe-bar {
  position: sticky;
  bottom: 0;
  z-index: 50;
  width: 100%;
  padding: var(--sp-5) var(--sp-4);
  background: rgba(255, 107, 0, 0.95);
}

.subscribe-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.subscribe-bar__title {
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  color: var(--text-strong);
}

@media (min-width: 768px) {
  .subscribe-bar__title {
    font-size: var(--fs-xl);
  }
}

.subscribe-bar__desc {
  margin-top: var(--sp-1);
  font-size: var(--fs-sm);
  color: var(--text-body);
}

.subscribe-bar .btn-cta {
  flex-shrink: 0;
  background: var(--text-strong);
  color: var(--text-inverse);
}

/* ---------- CTA 버튼 ---------- */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  height: 44px;
  padding-inline: var(--sp-4);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  white-space: nowrap;
}

.btn-cta--outline {
  border: 1px solid var(--border-default);
  background: var(--bg-page);
  color: var(--text-body);
}

.btn-cta--outline:hover {
  background: var(--bg-subtle);
}

.btn-cta--block {
  width: 100%;
}

/* ---------- 페이지네이션 / 더보기 ---------- */
.more-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  height: 48px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-page);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--text-body);
}

.more-btn:hover {
  background: var(--bg-subtle);
}

/* ---------- 사이드바 위젯 (싱글 포스트) ---------- */
.sidebar {
  display: none;
  position: sticky;
  top: 60px;
  z-index: 40;
  width: var(--sidebar-w);
  flex-shrink: 0;
  flex-direction: column;
  gap: var(--sp-8);
}

@media (min-width: 1024px) {
  .sidebar {
    display: flex;
  }
}

/* 큰 이슈 카드 */
.issue-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-page);
}

.issue-card__title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--text-strong);
}

.issue-card__desc {
  margin-top: var(--sp-1);
  font-size: var(--fs-xs);
  color: var(--text-subtle);
}

.issue-card .icon-btn {
  color: var(--text-subtle);
}

/* 파워링크 (AD) */
.power-link {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.power-link__heading {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  color: var(--text-strong);
}

.power-link__badge {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--bg-soft);
  font-size: var(--fs-2xs);
  color: var(--text-subtle);
}

.power-link__item {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.power-link__item-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--text-body);
  line-height: var(--lh-snug);
}

.power-link__item:hover .power-link__item-title {
  text-decoration: underline;
}

.power-link__item-desc {
  font-size: var(--fs-xs);
  color: var(--text-subtle);
}

/* TOP 3 랭킹 리스트 — LOOP-GRID: 사이드바 인기글 */
.rank-list__heading {
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  color: var(--text-strong);
  margin-bottom: var(--sp-4);
}

.rank-list {
  display: flex;
  flex-direction: column;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding-block: var(--sp-3);
}

.rank-item + .rank-item {
  border-top: 1px solid var(--border-light);
}

.rank-item__no {
  flex-shrink: 0;
  width: 20px;
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--text-strong);
  text-align: center;
}

.rank-item__body {
  flex: 1;
  min-width: 0;
}

.rank-item__title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--text-strong);
  line-height: var(--lh-snug);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-item:hover .rank-item__title {
  color: var(--color-primary);
}

.rank-item__category {
  margin-top: var(--sp-1);
  font-size: var(--fs-xs);
  color: var(--text-subtle);
}

.rank-item__thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: var(--bg-skeleton);
}

.rank-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 사이드바 배너 + CTA */
.sidebar-banner {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

/* ---------- 별점 ---------- */
.rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  padding-block: var(--sp-8);
}

.rating__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--text-strong);
}

.rating__stars {
  display: flex;
  gap: var(--sp-2);
}

.rating__star {
  width: 32px;
  height: 32px;
  color: var(--bg-skeleton);
}

/* ---------- 태그 칩 목록 ---------- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

/* ---------- 구분선 ---------- */
.divider {
  border: 0;
  border-top: 1px solid var(--border-light);
}
