/*
Theme Name: 미소미함 셸 (Misomiham Shell)
Description: 연세미소미함치과 블로그용 최소 셸 테마. the_content 필터에 아무것도 주입하지 않고, 글 하단 1세트(관련글·원장·예약 CTA)는 본문에 해당 블록이 없을 때만 템플릿에서 출력합니다. 공유 CSS·병원 스키마·병원정보는 "미소미함 코어" 플러그인이 담당합니다. 단일 글은 사이드바 없는 풀폭.
Version: 1.7.1
Author: 애드노하우
Text Domain: misomiham-shell
*/

:root{
  --g:#3D7260;--g2:#2A5646;--cream:#F5F0E8;--line:#E0D6C6;
  --dark:#241F1A;--text:#3A342D;--muted:#877E72;--white:#fff;
  --measure:820px;              /* 본문 읽기 폭 — 넓히려면 이 값만 조정 */
  --wrap:1100px;                /* 헤더/푸터/목록 컨테이너 폭 */
  /* v1.2.3: --sh2 / --gold / --beige 는 코어 플러그인 공유 CSS 의 :root 가 정본이다
     (--gold:#B08A4F 등). 테마가 같은 이름을 선언하면 나중에 로드되는 테마 값이
     전역으로 이겨 본문 콘텐츠 색까지 바뀌므로, 선언하지 않고 사용처에서 var(,폴백)
     형태로만 쓴다 — 플러그인이 없을 때만 폴백이 적용된다. */
}
*{box-sizing:border-box;}
body{margin:0;font-family:'Noto Sans KR',sans-serif;color:var(--text);background:#FAFAF7;line-height:1.7;}
a{color:var(--g);}
img{max-width:100%;height:auto;}
.container{max-width:var(--wrap);margin:0 auto;padding:0 20px;}

/* ── 헤더 ── */
.site-header{position:sticky;top:0;z-index:50;background:var(--white);border-bottom:1px solid var(--line);}
.site-header-inner{display:flex;align-items:center;gap:18px;height:64px;}
.site-logo{display:flex;align-items:center;gap:10px;font-family:'Noto Serif KR',serif;font-weight:700;color:var(--dark);text-decoration:none;font-size:16px;flex-shrink:0;}
.site-logo img{height:34px;width:auto;}
.site-nav{flex:1;overflow-x:auto;-webkit-overflow-scrolling:touch;}
.site-nav ul{list-style:none;display:flex;gap:4px;margin:0;padding:0;white-space:nowrap;}
.site-nav a{display:block;padding:8px 12px;color:var(--text);text-decoration:none;font-size:14px;font-weight:600;border-radius:6px;}
.site-nav a:hover,.site-nav .current-menu-item>a,.site-nav .current-cat>a{background:var(--cream);color:var(--g2);}
.header-actions{display:flex;align-items:center;gap:10px;flex-shrink:0;}
.header-tel{flex-shrink:0;background:var(--g);color:#fff;padding:9px 16px;border-radius:30px;font-weight:700;font-size:14px;text-decoration:none;white-space:nowrap;}
.header-tel:hover{background:var(--g2);color:#fff;}
.nav-toggle{display:none;flex-direction:column;justify-content:center;gap:5px;width:40px;height:40px;background:none;border:1px solid var(--line);border-radius:8px;cursor:pointer;padding:0 9px;}
.nav-toggle span{display:block;height:2px;background:var(--dark);border-radius:2px;transition:transform .2s,opacity .2s;}
.nav-toggle.is-open span:nth-child(1){transform:translateY(7px) rotate(45deg);}
.nav-toggle.is-open span:nth-child(2){opacity:0;}
.nav-toggle.is-open span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}

/* ── 본문 ── */
.site-main{}
.page-pad{padding-top:28px;padding-bottom:48px;}
.breadcrumb{max-width:var(--measure);margin:0 auto 14px;font-size:12px;color:var(--muted);}
.breadcrumb a{color:var(--muted);text-decoration:none;}
.breadcrumb a:hover{text-decoration:underline;}
.single-head{max-width:var(--measure);margin:0 auto 22px;}
.single-head h1{font-family:'Noto Serif KR',serif;font-size:clamp(20px,4vw,27px);line-height:1.35;color:var(--dark);margin:0 0 12px;}
.single-meta{display:flex;gap:14px;font-size:13px;color:var(--muted);align-items:center;flex-wrap:wrap;}
.single-meta .cat{color:var(--g);font-weight:700;}
.single-main{max-width:var(--measure);margin:0 auto;}   /* 풀폭 = 사이드바 없음, 읽기 폭만 중앙 정렬 */
.single-foot{max-width:var(--measure);margin:0 auto;}

/* ── 목록(홈/카테고리) ── */
.page-title{font-family:'Noto Serif KR',serif;font-size:22px;color:var(--dark);margin:0 0 20px;padding-bottom:12px;border-bottom:2px solid var(--g);}
.post-list{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;}
.pcard{background:var(--white);border:1px solid var(--line);border-radius:10px;overflow:hidden;text-decoration:none;color:inherit;display:flex;flex-direction:column;transition:box-shadow .2s,transform .2s;}
.pcard:hover{box-shadow:0 8px 28px rgba(26,24,21,.12);transform:translateY(-3px);}
.pcard-thumb{aspect-ratio:16/10;width:100%;object-fit:cover;background:var(--cream);display:block;}
.pcard-body{padding:14px 16px;display:flex;flex-direction:column;gap:8px;flex:1;}
.pcard-cat{font-size:11px;font-weight:700;color:var(--g);letter-spacing:.5px;}
.pcard-ttl{font-family:'Noto Serif KR',serif;font-size:15px;font-weight:700;color:var(--dark);line-height:1.4;margin:0;}  /* v1.7.1: h3 로 바뀜 — 기본 마진 제거 */
.pcard-date{margin-top:auto;font-size:12px;color:var(--muted);}

/* ── 페이지네이션 ── */
.pagination{margin:32px 0 0;display:flex;gap:8px;justify-content:center;flex-wrap:wrap;align-items:center;}
.pagination a,.pagination span{padding:8px 13px;border:1px solid var(--line);border-radius:6px;text-decoration:none;color:var(--text);font-size:14px;}
.pagination .current{background:var(--g);color:#fff;border-color:var(--g);}

/* ── 푸터 ── */
.site-footer{background:var(--dark);color:rgba(255,255,255,.8);margin-top:40px;}
.site-footer-inner{padding:36px 0;display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:28px;}
.site-footer h4{color:#fff;font-size:14px;margin:0 0 12px;font-family:'Noto Serif KR',serif;}
.site-footer p,.site-footer li{font-size:13px;line-height:1.9;color:rgba(255,255,255,.7);margin:0 0 4px;}
.site-footer ul{list-style:none;padding:0;margin:0;}
.site-footer a{color:rgba(255,255,255,.7);text-decoration:none;}
.site-footer a:hover{color:#fff;}
.footer-brand-name{font-family:'Noto Serif KR',serif;color:#fff;font-size:16px;font-weight:700;margin-bottom:8px;}
.footer-bottom{border-top:1px solid rgba(255,255,255,.12);padding:16px 0;font-size:11px;color:rgba(255,255,255,.45);text-align:center;line-height:1.7;}

@media (max-width:860px){.post-list{grid-template-columns:repeat(2,1fr);}.site-footer-inner{grid-template-columns:1fr;gap:20px;}}
/* v1.2.1: 텍스트 브랜드는 로고 이미지가 없을 때만 렌더되므로 숨기지 않고 줄여서 표시 */
@media (max-width:560px){.post-list{grid-template-columns:1fr;}.site-logo span{font-size:14px;max-width:46vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.site-logo img+span{display:none;}}

/* ============================================================
   홈페이지 (front-page)
   ============================================================ */

/* 히어로 — 중간 배너 */
.hero{background:linear-gradient(135deg,var(--cream) 0%,#F6F1E8 100%);border-bottom:1px solid var(--line);}
.hero-inner{padding:62px 20px 56px;text-align:center;width:100%;}
.hero-eyebrow{display:inline-block;font-size:12px;font-weight:700;color:var(--g);background:var(--white);border:1px solid var(--line);padding:6px 14px;border-radius:30px;margin-bottom:18px;}
.hero-title{font-family:'Noto Serif KR',serif;font-size:clamp(24px,4.6vw,38px);line-height:1.3;color:var(--dark);margin:0 0 16px;letter-spacing:-.01em;word-break:keep-all;}
.hero-slogan{font-family:'Noto Serif KR',serif;color:var(--g);font-size:clamp(14px,2.2vw,18px);letter-spacing:.12em;font-weight:600;margin:-4px 0 16px;}  /* 브랜드 슬로건(H1 밖 문단) */
.hero-lead{max-width:640px;margin:0 auto 24px;font-size:15px;line-height:1.85;color:var(--text);}
.hero-cta{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-bottom:26px;}
.hero-btn{padding:12px 24px;border-radius:30px;font-weight:700;font-size:14px;text-decoration:none;transition:transform .2s,background .2s;}
.hero-btn-line{background:var(--dark);color:#fff;}
.hero-btn-line:hover{transform:translateY(-2px);color:#fff;}
.hero-btn-tel{background:var(--g);color:#fff;}
.hero-btn-tel:hover{background:var(--g2);color:#fff;transform:translateY(-2px);}
.hero-badges{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;max-width:760px;margin:0 auto;}
.badge{background:var(--white);border:1px solid var(--line);color:var(--g2);font-size:12px;font-weight:600;padding:6px 13px;border-radius:20px;}

/* 섹션 공통 */
.home-section{padding:38px 0 4px;}
.home-section-cat{padding:24px 0 4px;}
.home-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px;}
.home-section-head h2{font-family:'Noto Serif KR',serif;font-size:20px;color:var(--dark);margin:0;padding:0;background:none;border:none;}
.see-all{font-size:13px;font-weight:700;color:var(--g);text-decoration:none;flex-shrink:0;}
.see-all:hover{text-decoration:underline;}

/* 카테고리 카운트 필 */
.count-pills{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:22px;}
.count-pill{font-size:13px;color:var(--text);background:var(--white);border:1px solid var(--line);padding:7px 14px;border-radius:30px;text-decoration:none;}
.count-pill b{color:var(--g);margin-left:2px;}
.count-pill:hover{border-color:var(--g);}
.count-pill.is-all{background:var(--g);color:#fff;border-color:var(--g);}
.count-pill.is-all b{color:#fff;}

/* 대표 포스트 */
.featured-card{display:grid;grid-template-columns:1.3fr 1fr;gap:0;background:var(--white);border:1px solid var(--line);border-radius:12px;overflow:hidden;text-decoration:none;color:inherit;margin-bottom:22px;transition:box-shadow .25s;}
.featured-card:hover{box-shadow:var(--sh2, 0 14px 28px rgba(26,24,21,.12));}
.featured-thumb{display:block;min-height:240px;background:var(--cream);}
.featured-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.featured-body{padding:24px 26px;display:flex;flex-direction:column;gap:10px;justify-content:center;}
.featured-badge{font-size:11px;font-weight:700;color:var(--gold, #9A7524);letter-spacing:.5px;}
.featured-body .pcard-cat{font-size:11px;font-weight:700;color:var(--g);}
.featured-ttl{font-family:'Noto Serif KR',serif;font-size:20px;font-weight:700;color:var(--dark);line-height:1.4;margin:0;}  /* v1.7.1: h3 로 바뀜 */
.featured-ex{font-size:13px;color:var(--muted);line-height:1.8;}
.featured-date{font-size:12px;color:var(--muted);margin-top:4px;}

/* 병원 안내 밴드 */
.clinic-band{padding:20px 0 8px;}
.clinic-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:24px 0;}
.clinic-card{background:var(--white);border:1px solid var(--line);border-radius:12px;padding:20px 22px;}
.clinic-h{font-family:'Noto Serif KR',serif;font-size:16px;color:var(--dark);margin:0 0 14px;}
.doctor-row{display:flex;gap:14px;}
.doctor-av{width:48px;height:48px;border-radius:50%;background:var(--g);color:#fff;display:flex;align-items:center;justify-content:center;font-size:20px;flex-shrink:0;}
.doctor-name{font-family:'Noto Serif KR',serif;font-size:15px;font-weight:700;color:var(--dark);}
.doctor-role{font-size:11px;font-weight:600;color:var(--g);letter-spacing:1px;margin:2px 0 8px;}
.doctor-career{font-size:12px;color:var(--muted);line-height:1.8;}
.clinic-addr{font-size:13px;color:var(--text);line-height:1.8;margin:0 0 12px;}
.clinic-hours{list-style:none;margin:0;padding:0;}
.clinic-hours li{display:flex;justify-content:space-between;font-size:13px;padding:5px 0;border-bottom:1px solid var(--beige, #EDE5D7);}
.clinic-hours li:last-child{border:none;}
.clinic-hours li b{color:var(--dark);font-weight:600;}

@media (max-width:720px){
  .featured-card{grid-template-columns:1fr;}
  .featured-thumb{min-height:200px;}
  .clinic-grid{grid-template-columns:1fr;}
}

/* ============================================================
   진료예약 — 홈페이지 그린 톤 (본문 글의 .cta는 그대로 유지)
   ============================================================ */
.clinic-band .cta{background:linear-gradient(135deg,var(--g2) 0%,var(--g) 100%);}
.clinic-band .cta-title{color:#fff;}
.clinic-band .cta-sub{color:rgba(255,255,255,.82);}
.clinic-band .cta-call{background:#fff;color:var(--g2);}
.clinic-band .cta-call:hover{background:var(--cream);color:var(--g2);transform:translateY(-2px);}
.clinic-band .cta-naver{background:transparent;color:#fff;border:1.5px solid rgba(255,255,255,.65);}
.clinic-band .cta-naver:hover{background:rgba(255,255,255,.14);color:#fff;}

/* 의료진 약력 (보강) */
.doctor-info{flex:1;}
.doctor-group-t{font-size:11px;font-weight:700;color:var(--g);letter-spacing:.5px;margin:12px 0 6px;}
.doctor-list{list-style:none;margin:0;padding:0;}
.doctor-list li{position:relative;padding:3px 0 3px 12px;font-size:13px;color:var(--text);line-height:1.6;}
.doctor-list li::before{content:'';position:absolute;left:0;top:11px;width:4px;height:4px;border-radius:50%;background:var(--g);}

/* ============================================================
   모바일 최적화
   ============================================================ */
@media (max-width:820px){
  .site-header-inner{position:relative;gap:12px;}
  .nav-toggle{display:flex;}
  /* v1.2.1: max-height:0 만으로는 링크가 탭 순서·스크린리더에 그대로 남는다 → visibility 동기화 */
  .site-nav{position:absolute;top:64px;left:0;right:0;background:#fff;border-bottom:1px solid var(--line);box-shadow:0 12px 24px rgba(26,24,21,.08);max-height:0;overflow:hidden;visibility:hidden;transition:max-height .28s ease,visibility .28s ease;}
  .site-nav.open{max-height:76vh;overflow-y:auto;visibility:visible;}
  .site-nav ul{flex-direction:column;gap:0;padding:6px 0;white-space:normal;}
  .site-nav a{padding:13px 22px;border-radius:0;font-size:15px;border-bottom:1px solid var(--cream);}
  .site-nav li:last-child a{border-bottom:none;}
}

@media (max-width:640px){
  .container{padding:0 16px;}
  .hero-inner{padding:40px 18px 38px;}
  .hero-eyebrow{font-size:11px;margin-bottom:14px;}
  .hero-title{font-size:clamp(26px,7.5vw,34px);margin-bottom:14px;}
  .hero-slogan{font-size:14px;line-height:1.5;}
  .hero-lead{font-size:13.5px;line-height:1.75;margin-bottom:22px;padding:0 4px;}
  .hero-cta{flex-direction:column;align-items:stretch;gap:8px;margin-bottom:22px;}
  .hero-btn{width:100%;padding:13px 20px;font-size:14px;}
  .hero-badges{gap:6px;}
  .badge{font-size:11px;padding:5px 11px;}
  .home-section{padding:30px 0 4px;}
  .home-section-head h2{font-size:18px;}
  .featured-body{padding:18px 18px;}
  .featured-ttl{font-size:17px;}
  .clinic-card{padding:18px 18px;}
  .header-tel span{display:none;}          /* 모바일에선 전화 아이콘만 */
  .header-tel{padding:9px 12px;}
}

@media (max-width:400px){
  .site-logo img{height:28px;}
  .hero-title{font-size:25px;}
  .hero-slogan{font-size:13px;}
}

/* ============================================================
   핵심 정보 블록 — 히어로 직후 (한눈에 보는 연세미소미함치과)
   ============================================================ */
.glance{padding:28px 0 0;}
.glance-box{background:var(--white);border:1px solid var(--line);border-radius:14px;overflow:hidden;box-shadow:0 8px 26px rgba(36,31,26,.06);}
.glance-top{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 20px;padding:20px 24px 16px;border-bottom:1px solid var(--line);background:linear-gradient(180deg,var(--cream),var(--white));}
.glance-top h2{font-family:'Noto Serif KR',serif;font-size:19px;color:var(--dark);margin:0 0 4px;}
.glance-sub{margin:0;font-size:13.5px;color:var(--g);font-weight:600;letter-spacing:.04em;}
.glance-cta{display:flex;gap:8px;flex-wrap:wrap;}
.glance-cta .hero-btn{padding:10px 16px;font-size:13px;}
.glance-grid{margin:0;padding:4px 24px 10px;display:grid;grid-template-columns:1fr 1fr;column-gap:36px;}
.g-row{display:grid;grid-template-columns:92px 1fr;gap:12px;padding:11px 0;border-bottom:1px solid var(--line);align-items:start;}
.g-row dt{font-size:12.5px;font-weight:700;color:var(--g);padding-top:3px;white-space:nowrap;}
.g-row dd{margin:0;font-size:14.5px;line-height:1.6;color:var(--text);}
.g-row dd small{display:block;font-size:12px;color:var(--muted);margin-top:2px;}
@media (min-width:721px){ .glance-grid .g-row:nth-last-child(-n+2){border-bottom:0;} }
@media (max-width:720px){
  .glance{padding:18px 0 0;}
  .glance-grid{grid-template-columns:1fr;padding:2px 16px 6px;}
  .glance-top{padding:16px;}
  .glance-top h2{font-size:17px;}
  .g-row{grid-template-columns:80px 1fr;}
  .g-row:last-child{border-bottom:0;}
  .glance-cta{width:100%;}
  .glance-cta .hero-btn{flex:1;text-align:center;}
}

/* ── v1.2.1 추가 ── */
.archive-desc{max-width:var(--measure);margin:0 auto 18px;color:var(--muted);font-size:14px;}
.page-links{max-width:var(--measure);margin:22px auto 0;font-size:14px;font-weight:700;color:var(--muted);}
.page-links a{display:inline-block;padding:4px 10px;margin:0 2px;border:1px solid var(--line);border-radius:6px;text-decoration:none;}

/* ============================================================
   카테고리 안내 블록 (v1.4.0) — archive.php / template-parts/category-guide.php
   브랜드 색은 코어 플러그인 :root 가 소유한다. 여기서는 선언하지 않고
   사용처 폴백(var(--x, 기본값))만 쓴다. (v1.2.3 회귀 재발 방지)
   ============================================================ */
.cat-guide{max-width:var(--measure);margin:0 auto 26px;padding:20px 22px;background:var(--white);border:1px solid var(--line);border-left:3px solid var(--gold, #9A7524);border-radius:10px;}
.cat-guide-h{font-family:'Noto Serif KR',serif;font-size:16px;font-weight:700;color:var(--dark);margin:0 0 10px;}
.cat-guide-intro{font-size:14.5px;line-height:1.75;color:var(--text);margin:0;}
.cat-guide-order{margin-top:18px;padding-top:16px;border-top:1px dashed var(--line);}
.cat-guide-sub{font-size:11px;font-weight:700;letter-spacing:.6px;color:var(--g);margin:0 0 10px;text-transform:uppercase;}
.cat-guide-sub2{margin-top:16px;}

/* 처음 읽을 글 — 하나뿐이므로 카드로 강조 */
.cat-start{display:block;padding:14px 16px;background:var(--cream);border:1px solid var(--beige, #EDE5D7);border-radius:8px;text-decoration:none;color:inherit;transition:box-shadow .2s,transform .2s;}
.cat-start:hover{box-shadow:0 8px 20px rgba(26,24,21,.10);transform:translateY(-2px);}
.cat-start-tag{display:inline-block;font-size:11px;font-weight:700;color:var(--white);background:var(--gold, #9A7524);padding:3px 9px;border-radius:999px;margin-bottom:8px;}
.cat-start-title{display:block;font-family:'Noto Serif KR',serif;font-size:15px;font-weight:700;color:var(--dark);line-height:1.45;}
.cat-start-why{display:block;margin-top:6px;font-size:13px;color:var(--muted);line-height:1.6;}

/* 상황별로 찾아보기 — "~라면 → 글" 두 줄 구조 */
.cat-paths{list-style:none;margin:0;padding:0;display:grid;gap:10px;}
.cat-paths li{display:grid;gap:3px;padding-left:16px;position:relative;}
.cat-paths li::before{content:"→";position:absolute;left:0;top:1px;color:var(--gold, #9A7524);font-weight:700;font-size:13px;}
.cat-when{font-size:13px;color:var(--muted);line-height:1.5;}
.cat-path-link{font-size:14.5px;font-weight:700;color:var(--dark);text-decoration:none;line-height:1.5;border-bottom:1px solid transparent;}
.cat-path-link:hover{color:var(--gold, #9A7524);border-bottom-color:currentColor;}

@media (max-width:560px){
	.cat-guide{padding:16px 16px;}
	.cat-guide-intro{font-size:14px;}
}
