/* =====================================================================
   늘온한의원 — 블로그(/blog) 전용 스타일
   홈 테마(index.css)와 동일 토큰 사용: Pretendard / 포인트 #FDCC00 / 브랜드 #3B1E1E
   index.css 가 함께 로드되므로(* 폰트·색상) 여기서는 블로그 레이아웃만 정의한다.
   ===================================================================== */

:root {
  --nl-ink: #121212;
  --nl-sub: #767676;
  --nl-line: #e7e7e7;
  --nl-point: #fdcc00;
  --nl-brand: #3b1e1e;
  --nl-bg: #fafafa;
}

.nl-blog {
  background: var(--nl-bg);
  min-height: 60vh;
  /* 고정 헤더(약 82px) 아래로 내용 시작 */
  padding: 140px 20px 100px;
}

.nl-blog * {
  box-sizing: border-box;
}

/* index.css 는 header/footer/section 태그를 전역으로 스타일(고정 헤더 등)한다.
   블로그 본문 내부에 그런 태그가 와도 레이아웃이 깨지지 않도록 방어적으로 초기화. */
.nl-blog header,
.nl-blog footer,
.nl-blog section {
  position: static;
  top: auto;
  left: auto;
  width: auto;
  height: auto;
  background: none;
  border: 0;
  z-index: auto;
}

.nl-blog__inner {
  max-width: 1100px;
  margin: 0 auto;
}

/* ---------- 히어로 ---------- */
.nl-hero {
  text-align: center;
  padding: 8px 0 48px;
}

.nl-hero__eyebrow {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 4px;
  color: var(--nl-point);
  font-weight: 700;
  margin-bottom: 14px;
}

.nl-hero__title {
  font-family: "NotoSerifKR", "Nanum Myeongjo", serif;
  font-size: 40px;
  font-weight: 400;
  color: var(--nl-brand);
  letter-spacing: -1px;
  line-height: 1.25;
}

.nl-hero__desc {
  margin-top: 14px;
  color: var(--nl-sub);
  font-size: 16px;
  line-height: 1.7;
}

/* ---------- 목록 그리드 ---------- */
.nl-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 8px;
}

.nl-card {
  background: #fff;
  border: 1px solid var(--nl-line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.nl-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}

.nl-card__thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f0efec;
}

.nl-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

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

.nl-card__thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cfc9c0;
  font-family: "NotoSerifKR", serif;
  font-size: 30px;
  letter-spacing: 2px;
}

.nl-card__body {
  padding: 22px 22px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.nl-card__date {
  font-size: 13px;
  color: var(--nl-point);
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.nl-card__title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--nl-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nl-card__excerpt {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--nl-sub);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.nl-card__more {
  margin-top: 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--nl-ink);
}

.nl-card__more::after {
  content: " →";
  color: var(--nl-point);
}

/* ---------- 빈 상태 ---------- */
.nl-empty {
  text-align: center;
  padding: 80px 0;
  color: var(--nl-sub);
  font-size: 17px;
}

/* ---------- 페이지네이션 ---------- */
.nl-pagination {
  margin-top: 56px;
  display: flex;
  justify-content: center;
}

.nl-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  margin: 0 4px;
  border: 1px solid var(--nl-line);
  border-radius: 8px;
  background: #fff;
  color: var(--nl-ink);
  font-weight: 600;
  font-size: 15px;
  transition: 0.2s;
}

.nl-pagination .page-numbers:hover {
  border-color: var(--nl-point);
  color: var(--nl-brand);
}

.nl-pagination .page-numbers.current {
  background: var(--nl-point);
  border-color: var(--nl-point);
  color: var(--nl-brand);
}

.nl-pagination .page-numbers.dots {
  border: none;
  background: transparent;
}

/* ---------- 글 상세(single) ---------- */
.nl-single {
  max-width: 780px;
  margin: 0 auto;
}

.nl-single__head {
  text-align: center;
  padding-bottom: 34px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--nl-line);
}

.nl-single__date {
  font-size: 14px;
  color: var(--nl-point);
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.nl-single__title {
  font-family: "NotoSerifKR", "Nanum Myeongjo", serif;
  font-size: 34px;
  line-height: 1.35;
  font-weight: 400;
  color: var(--nl-brand);
  letter-spacing: -0.5px;
}

.nl-single__content {
  font-size: 17px;
  line-height: 1.9;
  color: #2a2a2a;
  word-break: keep-all;
}

.nl-single__content p {
  margin: 0 0 1.4em;
}

.nl-single__content h2,
.nl-single__content h3,
.nl-single__content h4 {
  margin: 1.8em 0 0.7em;
  font-weight: 700;
  color: var(--nl-ink);
  line-height: 1.4;
}

.nl-single__content h2 { font-size: 25px; }
.nl-single__content h3 { font-size: 21px; }

.nl-single__content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 10px 0;
}

.nl-single__content a {
  color: #008ad9;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nl-single__content ul,
.nl-single__content ol {
  margin: 0 0 1.4em;
  padding-left: 1.3em;
}

.nl-single__content li {
  list-style: revert;
  margin-bottom: 0.5em;
}

.nl-single__content blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 22px;
  border-left: 4px solid var(--nl-point);
  color: var(--nl-sub);
  font-style: italic;
}

.nl-single__foot {
  margin-top: 56px;
  padding-top: 30px;
  border-top: 1px solid var(--nl-line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.nl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--nl-line);
  background: #fff;
  color: var(--nl-ink);
  font-weight: 600;
  font-size: 15px;
  transition: 0.2s;
}

.nl-btn:hover {
  border-color: var(--nl-point);
  color: var(--nl-brand);
}

.nl-btn--primary {
  background: var(--nl-point);
  border-color: var(--nl-point);
  color: var(--nl-brand);
}

/* ---------- GNB BLOG 활성 ---------- */
header .gnb li.gnb-blog.active a {
  color: var(--nl-point);
  font-weight: 700;
}

/* ---------- 반응형 ---------- */
@media (max-width: 900px) {
  .nl-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .nl-blog {
    padding: 100px 16px 70px;
  }
  .nl-hero {
    padding: 4px 0 34px;
  }
  .nl-hero__title {
    font-size: 30px;
  }
  .nl-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .nl-single__title {
    font-size: 26px;
  }
  .nl-single__content {
    font-size: 16px;
    line-height: 1.85;
  }
  .nl-single__foot {
    justify-content: center;
  }
}
