/* ============================================================
   blog.css — 블로그 포스트 카드 + 상세 페이지
   럭셔리 미니멀리즘 톤: 보더리스, 넉넉한 여백, 절제된 타이포
   ============================================================ */

/* ── 공통 섹션 헤더 ── */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 60px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-title-lg {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.link-more {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: gap var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.link-more:hover { gap: 12px; }

/* ── HERO 축소형 ── */
.hero--compact {
  min-height: auto;
  padding: 160px 80px 100px;
  gap: 60px;
}

/* 운동 활동 카드 */
.hero-activity-card {
  flex: 0 0 auto;
  width: 280px;
  background: var(--bg-card);
  border: none;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.activity-card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

.activity-card-title {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.activity-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.astat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  transition: background 0.4s ease;
}

.astat:nth-child(2n) { border-right: none; }
.astat:nth-child(n+3) { border-bottom: none; }

/* 2열 전용 (아이템이 2개일 때) — 하단 보더 제거 */
.activity-card-stats--2col .astat {
  border-bottom: none;
  padding: 32px 20px;
}

/* SVG 아이콘 스타일 */
.astat-icon {
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.astat:hover { background: var(--bg-warm); }

.astat-icon { font-size: 1.6rem; line-height: 1; }
.astat-label {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── 포스트 섹션 ── */
.section-posts {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

/* ── 포스트 그리드 ── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.posts-grid--home {
  grid-template-columns: repeat(3, 1fr);
}

/* ── 포스트 카드 (미니멀 보더리스) ── */
.post-card {
  background: var(--bg-card);
  border: none;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  animation: fadeUp 0.5s ease both;
}

.post-card:hover {
  transform: translateY(-6px);
}

/* ── 카드 이미지 영역 ── */
.post-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-warm);
}

.post-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-card:hover .post-card-img { transform: scale(1.05); }

.post-card-img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-warm) 0%, var(--accent-soft) 100%);
  font-size: 3rem;
}

/* 사진 매수 인디케이터 */
.post-card-photo-count {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 5px 12px;
  backdrop-filter: blur(6px);
  letter-spacing: 0.05em;
}

.post-card-photo-count svg { opacity: 0.9; }

/* ── 카드 본문 영역 ── */
.post-card-body {
  padding: 22px 2px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* 카테고리 배지 (절제된 스타일) */
.post-card-category {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cat-running  { color: var(--red); }
.cat-cycling  { color: var(--accent); }
.cat-climbing { color: #7a5ea0; }
.cat-general  { color: var(--text-light); }

.post-card-date {
  font-size: 0.68rem;
  color: var(--text-light);
  letter-spacing: 0.05em;
}

.post-card-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 운동 데이터 미니 표시 */
.post-card-activity {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  padding-top: 4px;
  letter-spacing: 0.03em;
}

/* 카드 하단 (조회수) */
.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 8px;
  margin-top: auto;
}

.post-card-views {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  color: var(--text-light);
  letter-spacing: 0.05em;
}

.post-card-views svg { opacity: 0.6; }

/* 포스트 상세 조회수 */
.post-views {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  color: var(--text-light);
  letter-spacing: 0.05em;
  margin-left: auto;
}

.post-views svg { opacity: 0.5; }

/* ── 블로그 목록 페이지 ── */
.blog-hero {
  padding: 160px 0 60px;
  text-align: center;
}

.blog-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.blog-hero-sub {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 48px;
  letter-spacing: 0.02em;
}

.blog-filter-bar {
  display: inline-flex;
  gap: 4px;
}

.blog-content {
  padding: 60px 0 140px;
}

/* ── 포스트 상세 페이지 ── */
.post-detail {
  padding-top: 72px;
  min-height: 100vh;
}

.post-detail-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 72px 32px 140px;
}

/* 사진 슬라이더 (풀 와이드) */
.photo-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-warm);
  margin-bottom: 56px;
}

.photo-slider-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.photo-slider-track img {
  min-width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}

/* 슬라이더 화살표 (미니멀) */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  background: rgba(255,255,255,0.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text);
  transition: all var(--transition);
  z-index: 2;
}

.slider-btn:hover {
  background: #fff;
  box-shadow: var(--shadow-md);
}

.slider-btn--prev { left: 20px; }
.slider-btn--next { right: 20px; }

/* 슬라이더 도트 */
.slider-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 2;
}

.slider-dot {
  width: 6px; height: 6px;
  background: rgba(255,255,255,0.4);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
}

.slider-dot.active {
  background: #fff;
  transform: scale(1.4);
}

/* 포스트 상세 헤더 */
.post-detail-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.post-detail-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
}

/* 운동 데이터 카드 (미니멀 그리드) */
.activity-data-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

.activity-data-item {
  padding: 24px 20px;
  text-align: center;
  border-right: 1px solid var(--border);
}

.activity-data-item:last-child { border-right: none; }

.activity-data-value {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.activity-data-label {
  font-size: 0.6rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
}

/* 포스트 본문 */
.post-detail-content {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 2;
}

.post-detail-content p { margin-bottom: 24px; }

.post-detail-content img {
  max-width: 100%;
  margin: 24px 0;
}

/* 태그 */
.post-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.post-tag {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
}

/* 뒤로가기 링크 */
.post-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 48px;
  transition: gap var(--transition);
}

.post-back-link:hover { gap: 14px; }

/* ── 모바일 햄버거 메뉴 ── */
.nav-mobile-btn {
  display: none;
  position: relative;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-mobile-btn span {
  display: block;
  position: absolute;
  left: 0;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  transition: all 0.3s ease;
  transform-origin: center center;
}

/* 3본 위치: 상단(0) 중앙(8px) 하단(16px) */
.nav-mobile-btn span:nth-child(1) { top: 0; }
.nav-mobile-btn span:nth-child(2) { top: 8px; }
.nav-mobile-btn span:nth-child(3) { top: 16px; }

/* X 상태: 모두 중앙(8px)으로 이동 후 회전 → 정확히 겹침 */
.nav-mobile-btn.active span:nth-child(1) { top: 8px; transform: rotate(45deg); }
.nav-mobile-btn.active span:nth-child(2) { opacity: 0; }
.nav-mobile-btn.active span:nth-child(3) { top: 8px; transform: rotate(-45deg); }

/* ── 반응형 ── */
@media (max-width: 960px) {
  .hero--compact {
    flex-direction: column;
    padding: 120px 32px 72px;
    text-align: center;
  }
  .hero--compact .hero-actions { justify-content: center; }
  .hero-activity-card { width: 100%; max-width: 300px; }
  .posts-grid,
  .posts-grid--home { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-mobile-btn { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0; right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 24px;
    gap: 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
  }

  .posts-grid,
  .posts-grid--home { grid-template-columns: 1fr; }

  .photo-slider { aspect-ratio: 4 / 3; }
  .activity-data-card { grid-template-columns: repeat(2, 1fr); }
  .activity-data-item { border-right: none; border-bottom: 1px solid var(--border); }
  .activity-data-item:last-child { border-bottom: none; }
}
