/* =====================
   style.css - 자세연구소 블로그
   가독성 최적화 버전
   ===================== */

/* ---- 기본 ---- */
*{box-sizing:border-box;margin:0;padding:0}
html{font-size:16px;-webkit-text-size-adjust:100%}
body{
  font-family:'Noto Sans KR',sans-serif;
  background:#F9F9F6;
  color:#1A1A1A;
  line-height:1.95;
  word-break:keep-all;
  word-wrap:break-word;
  -webkit-font-smoothing:antialiased;
}

/* ---- 레이아웃 ---- */
.container{max-width:780px;margin:0 auto;padding:0 20px}
.site-header{
  background:#fff;
  border-bottom:2px solid #E8500A;
  padding:16px 0;
  position:sticky;top:0;z-index:100;
}
.header-inner{max-width:780px;margin:0 auto;padding:0 20px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.site-title{font-size:20px;font-weight:700;color:#E8500A;text-decoration:none;white-space:nowrap}
.site-tagline{font-size:12px;color:#888;margin-top:2px}
.site-nav{display:flex;gap:0;flex-wrap:wrap}
.site-nav a{font-size:13px;font-weight:500;color:#555;text-decoration:none;padding:6px 12px;border-radius:6px;transition:background .15s}
.site-nav a:hover,.site-nav a.active{background:#FFF0E8;color:#E8500A}

/* ---- 주요 가독성 변수 ---- */
:root{
  --body-size: 16.5px;
  --line-height: 1.95;
  --para-gap: 1.6rem;
  --h2-size: 20px;
  --h3-size: 17px;
  --letter-spacing: 0.01em;
}

/* ---- 글 본문 ---- */
.post-body{
  font-size: var(--body-size);
  line-height: var(--line-height);
  letter-spacing: var(--letter-spacing);
  color: #222;
}

/* 문단 */
.post-body p,
.post-body > div{
  margin-bottom: var(--para-gap);
  font-size: var(--body-size);
  line-height: var(--line-height);
  text-align: justify;
  text-align-last: left;
  -webkit-hyphens: none;
  hyphens: none;
}
.post-body p:last-child,
.post-body > div:last-child{margin-bottom:0}

/* h2 - 주요 섹션 제목 */
.post-body h2{
  font-size: var(--h2-size);
  font-weight: 700;
  color: #111;
  margin-top: 2.8rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #F0EDE8;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.post-body h2:first-child{margin-top:0}

/* h3 - 소항목 */
.post-body h3{
  font-size: var(--h3-size);
  font-weight: 600;
  color: #333;
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
  line-height: 1.5;
}

/* 강조 */
.post-body strong{
  font-weight: 700;
  color: #E8500A;
}

/* 본문 인용 링크 (출처·매체명·전문가 출처) */
.post-body a{
  color: #5B2EAD;
  text-decoration: none;
  border-bottom: 1px dotted rgba(91,46,173,.5);
  transition: color .12s, border-color .12s;
  word-break: keep-all;
}
.post-body a:hover{
  color: #E8500A;
  border-bottom-color: #E8500A;
}

/* 이미지 */
.post-body img{
  width:100%;
  max-width:100%;
  height:auto;
  border-radius:10px;
  margin:1.6rem 0;
  display:block;
  box-shadow:0 2px 12px rgba(0,0,0,.08);
}

/* hr 구분선 */
.post-body hr{
  border:none;
  border-top:1px solid #EDEDED;
  margin:2rem 0;
}

/* 영상 */
.post-body video{
  width:100%;
  max-width:100%;
  border-radius:10px;
  margin:1.6rem 0;
  display:block;
  background:#000;
  box-shadow:0 2px 12px rgba(0,0,0,.08);
}

/* YouTube·Vimeo 임베드 (16:9 반응형) */
.post-body .embed-wrap{
  position:relative;
  padding-bottom:56.25%;
  height:0;
  margin:1.6rem 0;
  border-radius:10px;
  overflow:hidden;
  box-shadow:0 2px 12px rgba(0,0,0,.08);
}
.post-body .embed-wrap iframe{
  position:absolute;
  top:0;left:0;
  width:100%;height:100%;
  border:0;
}

/* ---- 홈 메인 ---- */
.home-main{padding:24px 0 60px}
.empty-state{text-align:center;padding:4rem 0;color:#888;font-size:14px}

/* 헤더 브랜드 (제목+태그라인 스택) */
.site-brand{display:flex;flex-direction:column;gap:2px;min-width:0}

/* 피처드 카드 (홈 첫 페이지 첫 글) */
.featured-card{
  display:block;
  background:#fff;
  border-radius:14px;
  overflow:hidden;
  text-decoration:none;
  color:inherit;
  margin-bottom:18px;
  border:1px solid #E8E8E4;
  transition:transform .18s, box-shadow .18s;
}
.featured-card:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(0,0,0,.06)}
.featured-thumb{
  width:100%;
  aspect-ratio:16/9;
  background:#F0EDE8 center/cover no-repeat;
}
.featured-thumb--placeholder{background:linear-gradient(135deg,#FFF0E8,#FFE0CC)}
.featured-info{padding:18px 20px 22px}
.featured-info .cat-badge{display:inline-block;margin-bottom:8px}
.featured-title{
  font-size:21px;font-weight:700;line-height:1.4;
  color:#111;margin:0 0 8px;
  letter-spacing:-0.01em;
  word-break:keep-all;
}
.featured-excerpt{
  font-size:14px;color:#555;line-height:1.65;
  margin:0 0 10px;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
  word-break:keep-all;
}
.featured-readmore{font-size:13px;color:#E8500A;font-weight:600}

/* 페이지네이션 */
.pagination{
  display:flex;justify-content:center;gap:6px;
  margin-top:24px;padding:0 16px;flex-wrap:wrap;
}
.pagination a{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:36px;height:36px;padding:0 10px;
  background:#fff;border:1px solid #E8E8E4;border-radius:8px;
  font-size:13px;color:#555;text-decoration:none;font-weight:500;
  transition:background .12s,border-color .12s,color .12s;
}
.pagination a:hover{background:#FFF0E8;border-color:#FFCCB0;color:#E8500A}
.pagination a.active{background:#E8500A;border-color:#E8500A;color:#fff}

/* 푸터 CTA */
.footer-cta{margin-top:6px}
.footer-cta a{color:#E8500A;font-weight:500;text-decoration:none}
.footer-cta a:hover{text-decoration:underline}

/* ---- 글 목록 ---- */
.posts-grid{
  display:flex;flex-direction:column;gap:1px;
  background:#E8E8E4;
  border-radius:14px;
  overflow:hidden;
  border:1px solid #E8E8E4;
}
.post-card{
  background:#fff;
  display:flex;
  align-items:center;
  gap:14px;
  padding:16px;
  text-decoration:none;
  color:inherit;
  transition:background .12s;
}
.post-card:hover{background:#FAFAF8}
.post-card-thumb{
  width:84px;height:72px;
  border-radius:8px;
  background:#F0EDE8;
  flex-shrink:0;
  overflow:hidden;
}
.post-card-thumb--placeholder{background:linear-gradient(135deg,#FFF0E8,#FFE0CC)}
.post-card-thumb img{width:100%;height:100%;object-fit:cover}
.post-card-info{flex:1;min-width:0}
.post-card-title{
  font-size:15px;
  font-weight:600;
  line-height:1.5;
  margin-bottom:5px;
  color:#111;
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
.post-card-meta{
  font-size:12px;
  color:#999;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}
.cat-badge{
  background:#FFF0E8;
  color:#E8500A;
  padding:1px 7px;
  border-radius:8px;
  font-size:11px;
  font-weight:500;
}

/* ---- 글 상세 ---- */
.post-page{padding:28px 0 60px}
.post-header{margin-bottom:1.8rem}
.post-title{
  font-size:24px;
  font-weight:700;
  line-height:1.45;
  letter-spacing:-0.015em;
  color:#111;
  margin-bottom:12px;
  word-break:keep-all;
}
.post-meta{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:13px;
  color:#999;
  flex-wrap:wrap;
}
.post-meta .cat{color:#E8500A;font-weight:500}
.post-divider{height:1px;background:#EDEDED;margin:1.6rem 0}

/* ---- FAQ ---- */
.faq-section{
  background:#F9F9F6;
  border-radius:12px;
  padding:1.5rem;
  margin-top:2.8rem;
  border:1px solid #E8E8E4;
}
.faq-title{
  font-size:16px;
  font-weight:700;
  color:#333;
  margin-bottom:1rem;
  display:flex;
  align-items:center;
  gap:6px;
}
.faq-item{
  border-bottom:1px solid #EDEDED;
  padding:0.9rem 0;
}
.faq-item:last-child{border-bottom:none;padding-bottom:0}
.faq-q{
  font-size:14px;
  font-weight:600;
  color:#111;
  cursor:pointer;
  display:flex;
  justify-content:space-between;
  align-items:center;
  line-height:1.55;
  gap:8px;
}
.faq-q::after{content:'+';font-size:18px;color:#aaa;flex-shrink:0;transition:transform .2s}
.faq-item.open .faq-q::after{transform:rotate(45deg);color:#E8500A}
.faq-a{
  display:none;
  font-size:14px;
  color:#444;
  line-height:1.8;
  padding-top:0.6rem;
  word-break:keep-all;
}
.faq-item.open .faq-a{display:block}

/* ---- CTA 마지막 ---- */
.cta-box{
  background:linear-gradient(135deg,#FFF0E8 0%,#FFF8F5 100%);
  border:1.5px solid #FFCCB0;
  border-radius:14px;
  padding:1.6rem;
  margin-top:2.8rem;
  text-align:center;
}
.cta-box p{font-size:14px;color:#555;margin-bottom:1rem;line-height:1.7}
.cta-btn{
  display:inline-block;
  background:#E8500A;
  color:#fff;
  text-decoration:none;
  padding:12px 28px;
  border-radius:50px;
  font-size:15px;
  font-weight:600;
  letter-spacing:0.02em;
  transition:opacity .15s;
}
.cta-btn:hover{opacity:.88}

/* ---- 퓸터 ---- */
.site-footer{
  background:#F0EDE8;
  text-align:center;
  padding:28px 20px;
  font-size:12px;
  color:#999;
  line-height:1.9;
  margin-top:3rem;
}

/* ---- 모바일 반응형 ---- */
@media(max-width:600px){
  :root{
    --body-size: 15.5px;
    --h2-size: 18px;
    --h3-size: 16px;
    --para-gap: 1.3rem;
  }
  .post-title{font-size:20px}
  .post-card{padding:14px}
  .post-card-thumb{width:72px;height:64px}
  .post-card-title{font-size:14.5px}
  .container{padding:0 14px}
  .header-inner{padding:0 14px}
  .site-nav a{padding:5px 8px;font-size:12px}
  .featured-info{padding:14px 16px 18px}
  .featured-title{font-size:18px}
  .home-main{padding:16px 0 40px}
}
