/*
Theme Name: YBD Songdo
Theme URI: https://ysdreamsongdo.co.kr
Author: Claude / Anthropic
Description: 연세꿈꾸는치과교정과의원 인천송도점 블로그 테마
Version: 1.2.1
Text Domain: ybd-songdo
*/

/* ═══════════════════════════════════════════════
   0. RESET & BASE
════════════════════════════════════════f═══════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1a1a1a;
    background: #f8f9fb;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* Chrome same-origin page navigations: reduce full-page flash on menu clicks */
@view-transition {
    navigation: auto;
}

@media (prefers-reduced-motion: reduce) {
    @view-transition {
        navigation: none;
    }
}

/* ═══════════════════════════════════════════════
   1. DESIGN TOKENS
═══════════════════════════════════════════════ */
:root {
    --navy:    #0a2540;
    --blue:    #1a56db;
    --blue-lt: #eef2ff;
    --gold:    #d4a017;
    --gold-lt: #fff8e6;
    --red:     #e53e3e;
    --gray-50: #f8f9fb;
    --gray-100:#f1f3f7;
    --gray-200:#e0e4ec;
    --gray-400:#9aa3b2;
    --gray-600:#5a6478;
    --gray-800:#2d3748;
    --white:   #ffffff;
    --radius:  10px;
    --shadow:  0 2px 16px rgba(0,0,0,.06);
    --shadow-md:0 4px 24px rgba(0,0,0,.10);
    --trans:   .2s ease;
}

/* ═══════════════════════════════════════════════
   2. LAYOUT
═══════════════════════════════════════════════ */
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

.blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 36px;
    padding: 36px 0 60px;
}
.main-col { min-width: 0; }

/* ═══════════════════════════════════════════════
   3. HEADER
═══════════════════════════════════════════════ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--navy);
    box-shadow: 0 2px 12px rgba(0,0,0,.18);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 64px;
}
/* 로고 */
.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    line-height: 1.3;
    flex-shrink: 0;
}
.site-logo__icon { font-size: 1.6rem; line-height: 1; }
.site-logo__sub  { font-size: .6rem; font-weight: 400; opacity: .75; letter-spacing: .04em; }

/* 데스크톱 nav */
.site-nav { display: flex; align-items: center; gap: 2px; flex: 1; }
.site-nav a {
    padding: 6px 12px;
    border-radius: 6px;
    color: rgba(255,255,255,.82);
    font-size: .85rem;
    font-weight: 500;
    transition: background var(--trans), color var(--trans);
    white-space: nowrap;
}
.site-nav a:hover,
.site-nav a.current { background: rgba(255,255,255,.12); color: #fff; }
.site-nav a.nav-about {
    margin-left: 8px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
}
.site-nav a.nav-about:hover { background: rgba(255,255,255,.2); }

/* 헤더 우측 */
.header-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header-search-btn {
    background: none; border: none;
    color: rgba(255,255,255,.75);
    font-size: 1.1rem; padding: 6px;
    border-radius: 6px;
    transition: background var(--trans);
}
.header-search-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.header-tel {
    display: flex; align-items: center; gap: 6px;
    background: var(--gold);
    color: var(--navy);
    font-weight: 700; font-size: .82rem;
    padding: 8px 14px; border-radius: 20px;
    transition: opacity var(--trans);
}
.header-tel:hover { opacity: .88; }

/* 검색 드롭다운 */
.header-search-wrap {
    position: relative;
}
.header-search-form {
    display: none;
    position: absolute;
    right: 0; top: calc(100% + 8px);
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    padding: 8px;
    width: 280px;
    z-index: 200;
}
.header-search-form.open { display: flex; gap: 6px; }
.header-search-form input {
    flex: 1;
    border: 1.5px solid var(--gray-200);
    border-radius: 7px;
    padding: 8px 12px;
    font-size: .9rem;
    color: var(--gray-800);
    outline: none;
    transition: border-color var(--trans);
}
.header-search-form input:focus { border-color: var(--blue); }
.header-search-form button {
    background: var(--blue); color: #fff;
    border: none; border-radius: 7px;
    padding: 8px 14px; font-size: .85rem;
    font-weight: 600;
}

/* 모바일 햄버거 */
.hamburger {
    display: none;
    flex-direction: column; justify-content: center;
    gap: 5px;
    background: none; border: none;
    padding: 6px;
    color: #fff;
}
.hamburger span {
    display: block; width: 22px; height: 2px;
    background: #fff; border-radius: 2px;
    transition: transform var(--trans), opacity var(--trans);
}

/* 모바일 드로어 */
.mobile-nav {
    display: none;
    position: fixed; inset: 0; z-index: 999;
}
.mobile-nav__overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.55);
}
.mobile-nav__drawer {
    position: absolute;
    top: 0; right: 0;
    width: min(320px, 85vw);
    height: 100%;
    background: var(--navy);
    overflow-y: auto;
    padding: 20px;
}
.mobile-nav__head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px;
    color: #fff; font-weight: 700;
}
.mobile-nav__close {
    background: none; border: none; color: #fff;
    font-size: 1.4rem; line-height: 1;
}
.mobile-nav__links a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
    color: rgba(255,255,255,.85);
    font-size: .95rem;
    font-weight: 500;
    transition: color var(--trans);
}
.mobile-nav__links a:last-child { border-bottom: none; }
.mobile-nav__links a:hover { color: #fff; }
.mobile-nav__tel {
    margin-top: 20px;
    display: flex; align-items: center; justify-content: center;
    gap: 8px;
    background: var(--gold); color: var(--navy);
    font-weight: 700; font-size: .95rem;
    padding: 12px; border-radius: 10px;
}
.mobile-nav.open { display: block; }

/* ═══════════════════════════════════════════════
   4. HERO 섹션
═══════════════════════════════════════════════ */
.blog-hero {
    background: linear-gradient(135deg, var(--navy) 0%, #163264 100%);
    padding: 52px 0 44px;
    overflow: hidden;
}
.blog-hero__inner {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 36px;
    align-items: center;
}
.blog-hero__label {
    display: inline-block;
    background: rgba(212,160,23,.15);
    border: 1px solid rgba(212,160,23,.4);
    color: var(--gold);
    font-size: .78rem; font-weight: 700;
    padding: 5px 12px; border-radius: 20px;
    letter-spacing: .04em;
    margin-bottom: 16px;
}
.blog-hero__title {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    margin-bottom: 14px;
}
.blog-hero__title em { color: var(--gold); font-style: normal; }
.blog-hero__desc {
    color: rgba(255,255,255,.72);
    font-size: .9rem; line-height: 1.7;
    margin-bottom: 22px;
}
.blog-hero__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.blog-hero__certbadges { display: flex; flex-wrap: wrap; gap: 8px; }
.cert-badge {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.14);
    color: rgba(255,255,255,.82);
    font-size: .75rem; font-weight: 600;
    padding: 6px 12px; border-radius: 20px;
}

/* 최신글 프리뷰 */
.blog-hero__latest {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px;
    padding: 18px;
}
.blog-hero__latest-title {
    font-size: .68rem; font-weight: 700;
    color: var(--gold);
    letter-spacing: .12em;
    margin-bottom: 14px;
}
.hero-post-list { display: flex; flex-direction: column; gap: 12px; }
.hero-post-item {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 10px;
    border-radius: 8px;
    transition: background var(--trans);
}
.hero-post-item:hover { background: rgba(255,255,255,.07); }
.hero-post-item__thumb {
    width: 52px; height: 52px;
    border-radius: 8px; overflow: hidden; flex-shrink: 0;
    background: rgba(255,255,255,.08);
}
.hero-post-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.hero-post-item__cat {
    font-size: .68rem; font-weight: 700;
    color: var(--gold); letter-spacing: .04em;
    margin-bottom: 3px;
}
.hero-post-item__title {
    font-size: .8rem; font-weight: 600;
    color: rgba(255,255,255,.88);
    line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.hero-post-item__date { font-size: .68rem; color: rgba(255,255,255,.45); margin-top: 4px; }

/* ═══════════════════════════════════════════════
   5. 카테고리 네비
═══════════════════════════════════════════════ */
.cat-nav {
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    position: sticky; top: 64px; z-index: 90;
}
.cat-nav__inner {
    display: flex; gap: 4px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 12px 0;
    scrollbar-width: none;
}
.cat-nav__inner::-webkit-scrollbar { display: none; }
.cat-nav__link {
    display: flex; align-items: center; gap: 5px;
  
  /* ★ 수정: 버튼 클릭 시 아이콘 색상 변경 방지 */
  * { -webkit-tap-highlight-color: transparent; }
  .btn:active { opacity: .82; transform: translateY(0); }
  .header-tel:active { opacity: .82; background: var(--gold); color: var(--navy); }
  .btn--gold:active { background: var(--gold) !important; color: var(--navy) !important; }
  .btn--navy:active { background: var(--navy) !important; color: #fff !important; }
  .btn--outline-w:active { background: rgba(255,255,255,.15) !important; }
  .hamburger:active span, .header-search-btn:active { opacity: .7; }
  .faq-q:active { background: var(--blue-lt); }
    padding: 7px 16px; border-radius: 20px;
    font-size: .82rem; font-weight: 600;
    color: var(--gray-600);
    white-space: nowrap;
    transition: background var(--trans), color var(--trans);
}
.cat-nav__link:hover { background: var(--gray-100); color: var(--gray-800); }
.cat-nav__link.on { background: var(--navy); color: #fff; }
.cat-nav__count {
    background: rgba(0,0,0,.08); color: inherit;
    font-size: .7rem; font-weight: 700;
    padding: 1px 6px; border-radius: 10px;
}
.cat-nav__link.on .cat-nav__count { background: rgba(255,255,255,.2); }

/* ═══════════════════════════════════════════════
   6. 포스트 카드
═══════════════════════════════════════════════ */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 24px;
}
.post-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    display: flex; flex-direction: column;
    transition: transform var(--trans), box-shadow var(--trans);
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.post-card__thumb {
    width: 100%; aspect-ratio: 16/9;
    overflow: hidden; background: var(--gray-100);
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem;
}
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-card__thumb img { transform: scale(1.04); }
.post-card__body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.post-card__cat {
    display: inline-block;
    font-size: .7rem; font-weight: 700; letter-spacing: .04em;
    padding: 3px 9px; border-radius: 12px;
    margin-bottom: 8px;
}
.post-card__cat--info    { background: #e0f0ff; color: #0055b3; }
.post-card__cat--success { background: #e0f5ea; color: #1a7c3a; }
.post-card__cat--warning { background: #fff4e0; color: #8a5c00; }
.post-card__cat--danger  { background: #ffe0e0; color: #c0392b; }
.post-card__cat--purple  { background: #f0e6ff; color: #6a2db0; }
.post-card__cat--teal    { background: #e0f5f5; color: #0e7c7c; }
.post-card__title {
    font-size: .95rem; font-weight: 700;
    line-height: 1.4; color: var(--gray-800);
    margin-bottom: 8px;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.post-card__excerpt {
    font-size: .82rem; color: var(--gray-600);
    line-height: 1.6; flex: 1;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 12px;
}
.post-card__meta {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; flex-wrap: wrap;
    border-top: 1px solid var(--gray-100); padding-top: 12px;
    margin-top: auto;
}
.post-card__meta-left { display: flex; gap: 10px; align-items: center; }
.post-card__meta-left time,
.post-card__meta-left span { font-size: .72rem; color: var(--gray-400); }

/* ═══════════════════════════════════════════════
   7. FEATURED 포스트
═══════════════════════════════════════════════ */
.post-featured {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 240px;
    margin-bottom: 4px;
}
.post-featured__thumb {
    overflow: hidden; display: block;
    background: var(--gray-100);
    display: flex; align-items: center; justify-content: center;
    font-size: 4rem;
}
.post-featured__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-featured:hover .post-featured__thumb img { transform: scale(1.04); }
.post-featured__thumb-ph { font-size: 4rem; }
.post-featured__body { padding: 24px; display: flex; flex-direction: column; }
.post-featured__badge {
    display: inline-block;
    background: var(--gold-lt); color: var(--gold);
    font-size: .7rem; font-weight: 700;
    padding: 4px 10px; border-radius: 12px;
    margin-bottom: 12px; width: fit-content;
}

/* ═══════════════════════════════════════════════
   8. 카테고리 섹션 헤더
═══════════════════════════════════════════════ */
.cat-section-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 4px;
}
.cat-section-head h2 { font-size: 1.1rem; font-weight: 700; color: var(--gray-800); }
.cat-section-head a  { font-size: .8rem; color: var(--blue); font-weight: 600; }
.cat-section-head a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════
   9. FAQ 섹션 (AEO + 아코디언)  ← 핵심 수정
═══════════════════════════════════════════════ */
.faq-section { margin-top: 48px; }
.faq-section > h2 {
    font-size: 1.15rem; font-weight: 700;
    color: var(--gray-800); margin-bottom: 16px;
}
.faq-item {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow var(--trans), border-color var(--trans);
}
.faq-item.open {
    box-shadow: 0 2px 12px rgba(26,86,219,.08);
    border-color: #b0c4f8;
}
/* 질문 버튼 */
.faq-q {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%; padding: 18px 20px;
    background: #fff; border: none; text-align: left;
    cursor: pointer;
    font-size: .95rem; font-weight: 600;
    color: var(--gray-800); line-height: 1.5;
    transition: background var(--trans), color var(--trans);
}
.faq-q:hover       { background: var(--blue-lt); }
.faq-item.open .faq-q { background: var(--blue-lt); color: var(--blue); }
/* +/− 아이콘 */
.faq-icon {
    flex-shrink: 0;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--blue); color: #fff;
    font-size: 1.2rem; line-height: 28px; text-align: center;
    transition: transform .25s ease, background var(--trans);
    user-select: none; pointer-events: none;
}
.faq-item.open .faq-icon {
    transform: rotate(45deg);
    background: var(--red);
}
/* 답변 — ★ 핵심: 기본 숨김 */
.faq-a {
    display: none;                /* ← 반드시 필요 */
    padding: 0 20px 18px;
    font-size: .9rem; color: var(--gray-600); line-height: 1.8;
    border-top: 1px solid #e8eaf0;
    background: #f9fbff;
}
.faq-item.open .faq-a { display: block; }  /* ← 열릴 때만 표시 */

/* ═══════════════════════════════════════════════
   10. 사이드바
═══════════════════════════════════════════════ */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar-widget {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}
.sidebar-widget__title {
    display: flex; align-items: center; gap: 8px;
    font-size: .95rem; font-weight: 700; color: var(--gray-800);
    margin-bottom: 16px; padding-bottom: 12px;
    border-bottom: 2px solid var(--blue-lt);
}
/* 진료 예약 위젯 */
.widget-tel-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--blue); color: #fff;
    font-size: 1.05rem; font-weight: 700;
    padding: 14px; border-radius: 8px;
    margin-bottom: 16px;
    transition: opacity var(--trans);
}
.widget-tel-btn:hover { opacity: .88; }
.widget-hours { display: flex; flex-direction: column; gap: 7px; }
.widget-hours__row { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; }
.widget-hours__label { font-weight: 700; color: var(--gray-800); }
.widget-hours__val   { color: var(--gray-600); }
.widget-hours__row.holiday .widget-hours__label { color: var(--gray-400); }
.widget-hours__row.holiday .widget-hours__val   { color: var(--gray-400); }
/* 의료진 위젯 */
.widget-doctors { display: flex; flex-direction: column; gap: 10px; }
.widget-doctor  { display: flex; align-items: center; gap: 10px; }
.widget-doctor__avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--blue-lt);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; flex-shrink: 0;
}
.widget-doctor__name { font-size: .85rem; font-weight: 700; color: var(--gray-800); }
.widget-doctor__spec { font-size: .75rem; color: var(--gray-400); margin-top: 2px; }
/* 오시는 길 위젯 */
.widget-location p { font-size: .82rem; color: var(--gray-600); line-height: 1.6; margin-bottom: 6px; }
.widget-location strong { color: var(--gray-800); }
/* 사이드바 FAQ */
.sidebar-faq { display: flex; flex-direction: column; gap: 10px; }
.sidebar-faq__item { border-bottom: 1px solid var(--gray-100); padding-bottom: 10px; }
.sidebar-faq__item:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-faq__q { font-size: .82rem; font-weight: 700; color: var(--gray-800); margin-bottom: 4px; }
.sidebar-faq__a { font-size: .78rem; color: var(--gray-600); line-height: 1.6; }
/* 태그 위젯 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-cloud a {
    background: var(--gray-100); color: var(--gray-600);
    font-size: .75rem; font-weight: 600;
    padding: 5px 11px; border-radius: 14px;
    transition: background var(--trans), color var(--trans);
}
.tag-cloud a:hover { background: var(--blue-lt); color: var(--blue); }

/* ═══════════════════════════════════════════════
   11. 버튼
═══════════════════════════════════════════════ */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    font-weight: 700; font-size: .85rem;
    padding: 10px 20px; border-radius: 8px;
    transition: opacity var(--trans), transform var(--trans);
    white-space: nowrap; border: none;
}
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn--gold    { background: var(--gold); color: var(--navy); }
.btn--navy    { background: var(--navy); color: #fff; }
.btn--blue    { background: var(--blue); color: #fff; }
.btn--outline-w {
    background: transparent; color: #fff;
    border: 1.5px solid rgba(255,255,255,.5);
}
.btn--outline-w:hover { background: rgba(255,255,255,.1); }
.btn--round  { border-radius: 22px; }
.btn--sm     { padding: 7px 14px; font-size: .78rem; }

/* ═══════════════════════════════════════════════
   12. 페이지네이션
═══════════════════════════════════════════════ */
.pagination {
    display: flex; justify-content: center; gap: 6px;
    margin-top: 36px; flex-wrap: wrap;
}
.pagination .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 8px;
    font-size: .85rem; font-weight: 600;
    background: #fff; color: var(--gray-600);
    border: 1px solid var(--gray-200);
    transition: background var(--trans), color var(--trans);
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current { background: var(--navy); color: #fff; border-color: var(--navy); }
.pagination .page-numbers.prev,
.pagination .page-numbers.next  { width: auto; padding: 0 14px; }

/* ═══════════════════════════════════════════════
   13. 싱글 포스트
═══════════════════════════════════════════════ */
.single-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 36px;
    padding: 36px 0 60px;
    align-items: start;
}
/* 브레드크럼 */
.breadcrumb {
    display: flex; align-items: center; gap: 8px;
    font-size: .78rem; color: var(--gray-400);
    margin-bottom: 20px;
}
.breadcrumb a  { color: var(--gray-400); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb span { color: var(--gray-300); }
/* 포스트 헤더 */
.post-header {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 28px 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}
.post-header .post-card__cat { margin-bottom: 12px; }
.post-header h1 {
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: 800; color: var(--gray-800);
    line-height: 1.35; margin-bottom: 16px;
}
.post-meta {
    display: flex; align-items: center; gap: 16px;
    flex-wrap: wrap;
    padding-top: 14px;
    border-top: 1px solid var(--gray-100);
}
.post-meta__author { display: flex; align-items: center; gap: 8px; }
.post-meta__avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--blue-lt);
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem;
}
.post-meta__name  { font-size: .82rem; font-weight: 700; color: var(--gray-800); }
.post-meta__date,
.post-meta__read  { font-size: .78rem; color: var(--gray-400); }
/* 포스트 바디 */
.post-body {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    font-size: .95rem; line-height: 1.85;
    color: var(--gray-800);
}
.post-body h2 { font-size: 1.2rem; font-weight: 700; margin: 28px 0 12px; color: var(--navy); }
.post-body h3 { font-size: 1.05rem; font-weight: 700; margin: 22px 0 10px; color: var(--gray-800); }
.post-body h4 { font-size: .95rem; font-weight: 700; margin: 18px 0 8px; }
.post-body p  { margin-bottom: 14px; }
.post-body ul, .post-body ol { margin: 12px 0 16px 20px; }
.post-body ul  { list-style: disc; }
.post-body ol  { list-style: decimal; }
.post-body li  { margin-bottom: 6px; }
.post-body hr  { border: none; border-top: 1px solid var(--gray-200); margin: 28px 0; }
.post-body img { border-radius: 8px; margin: 18px 0; max-width: 100%; }
.post-body strong { font-weight: 700; }
.post-body a   { color: var(--blue); text-decoration: underline; }
/* 저자 박스 */
.author-box {
    background: var(--blue-lt);
    border: 1px solid #c8d9f8;
    border-radius: var(--radius);
    padding: 20px; margin-top: 28px;
    display: flex; gap: 16px; align-items: flex-start;
}
.author-box__avatar {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--blue); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; flex-shrink: 0;
}
.author-box__name  { font-size: .95rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.author-box__spec  { font-size: .78rem; color: var(--blue); font-weight: 600; margin-bottom: 8px; }
.author-box__bio   { font-size: .82rem; color: var(--gray-600); line-height: 1.65; }
/* CTA 박스 */
.post-cta {
    background: var(--navy); border-radius: var(--radius);
    padding: 24px; margin-top: 12px; text-align: center;
}
.post-cta h3 { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 6px; }
.post-cta p  { font-size: .82rem; color: rgba(255,255,255,.72); margin-bottom: 16px; }

/* ═══════════════════════════════════════════════
   14. 푸터
═══════════════════════════════════════════════ */
.site-footer {
    background: var(--navy);
    color: rgba(255,255,255,.7);
    padding: 44px 0 24px;
    margin-top: auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}
.footer-brand__logo { color: #fff; font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.footer-brand__desc { font-size: .8rem; line-height: 1.7; margin-bottom: 12px; }
.footer-brand__info { font-size: .75rem; line-height: 1.8; }
.footer-brand__info a { color: var(--gold); }
.footer-col h4 { color: #fff; font-size: .85rem; font-weight: 700; margin-bottom: 12px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { font-size: .8rem; transition: color var(--trans); }
.footer-col ul a:hover { color: #fff; }
.footer-contact li { font-size: .8rem; margin-bottom: 8px; display: flex; gap: 6px; }
.footer-contact a  { color: var(--gold); font-weight: 700; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 20px;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 10px;
    font-size: .75rem;
}
.footer-bottom a { margin-left: 16px; }
.footer-bottom a:hover { color: #fff; }
/* 맨 위로 버튼 */
.scroll-top {
    position: fixed; bottom: 24px; right: 20px; z-index: 88;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--navy); color: #fff; border: none;
    font-size: 1.1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,.2);
    opacity: 0; pointer-events: none;
    transition: opacity var(--trans);
}
.scroll-top.visible { opacity: 1; pointer-events: all; }

/* ═══════════════════════════════════════════════
   15. 유틸리티
═══════════════════════════════════════════════ */
.skip-link {
    position: absolute; left: -9999px;
    background: var(--blue); color: #fff;
    padding: 8px 16px; border-radius: 0 0 8px 0; font-size: .85rem;
    z-index: 9999;
}
.skip-link:focus { left: 0; }
.fade-up { animation: fadeUp .5s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ═══════════════════════════════════════════════
   16. RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 900px) {
    .blog-layout, .single-layout {
        grid-template-columns: 1fr;
    }
    .blog-hero__inner { grid-template-columns: 1fr; }
    .blog-hero__latest { display: none; }
    .post-featured { grid-template-columns: 1fr; }
    .post-featured__thumb { aspect-ratio: 16/9; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .site-nav { display: none; }
    .hamburger { display: flex; }
}
@media (max-width: 600px) {
    .posts-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .blog-hero { padding: 36px 0 32px; }
    .post-header { padding: 20px; }
    .post-body  { padding: 20px; }
}

/* ═══════════════════════════════════════════════
   17. 아카이브 헤더 (archive.php)
═══════════════════════════════════════════════ */
.archive-header {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}
.archive-header__title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--gray-800);
    margin: 8px 0 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.archive-header__count {
    font-size: .78rem;
    font-weight: 600;
    color: var(--gray-400);
    background: var(--gray-100);
    padding: 3px 10px;
    border-radius: 12px;
}
/* ★ 핵심: category_description()이 반환하는 <p> 태그를 정상 렌더링 */
.archive-header__desc {
    margin-top: 8px;
    font-size: .85rem;
    color: var(--gray-600);
    line-height: 1.65;
}
.archive-header__desc p {
    margin: 0;
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}
.empty-state__icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state__text {
    color: var(--gray-400);
    font-size: .95rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* ==============================================
   MOBILE OPTIMIZATION - 전면 개선
   v2.0 - 모바일 최적화
============================================== */

/* -- 태블릿 (900px 이하) -- */
@media (max-width: 900px) {
  .site-nav { display: none; }
  .hamburger { display: flex; }
  .blog-hero__inner { grid-template-columns: 1fr; }
  .blog-hero__latest { display: none; }
  .blog-hero { padding: 32px 0 28px; }
  .blog-hero__title { font-size: clamp(1.3rem, 4vw, 1.8rem); }
  .blog-layout, .single-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 0 40px;
  }
  .post-featured { grid-template-columns: 1fr; min-height: auto; }
  .post-featured__thumb { aspect-ratio: 16/9; }
  .posts-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .single-layout .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

/* -- 모바일 (600px 이하) -- */
@media (max-width: 600px) {
  .container { padding: 0 14px; }

  /* 헤더 */
  .header-inner { height: 56px; gap: 8px; }
  .site-logo { font-size: .76rem; gap: 7px; }
  .site-logo__icon { font-size: 1.25rem; }
  .site-logo__sub { font-size: .52rem; }
  .header-tel { font-size: .72rem; padding: 6px 10px; gap: 3px; }
  .header-search-wrap { display: none; }
  .header-right { gap: 6px; }

  /* 카테고리 네비 위치 */
  .cat-nav { top: 56px; }
  .cat-nav__link {
    padding: 6px 11px;
    font-size: .74rem;
    min-height: 38px;
    display: flex; align-items: center;
  }

  /* 히어로 */
  .blog-hero { padding: 24px 0 20px; }
  .blog-hero__title { font-size: 1.2rem; margin-bottom: 10px; }
  .blog-hero__desc { font-size: .82rem; margin-bottom: 16px; }
  .blog-hero__actions { gap: 8px; margin-bottom: 16px; }
  .blog-hero__actions .btn { font-size: .78rem; padding: 9px 14px; }
  .blog-hero__certbadges { gap: 5px; }
  .cert-badge { font-size: .67rem; padding: 4px 8px; }

  /* featured */
  .post-featured__thumb { aspect-ratio: 16/9; }
  .post-featured__body { padding: 16px; }
  .post-featured__body h2 { font-size: 1rem !important; margin-bottom: 8px !important; }

  /* 포스트 그리드 - 1컬럼 */
  .posts-grid { grid-template-columns: 1fr !important; gap: 12px; margin-top: 14px; }

  /* 카드 */
  .post-card__title { font-size: .88rem; }
  .post-card__excerpt { font-size: .79rem; }
  .post-card__meta { flex-wrap: wrap; gap: 6px; }
  .post-card__meta-left time, .post-card__meta-left span { font-size: .68rem; }
  .btn--sm { font-size: .74rem; padding: 6px 11px; }

  /* 블로그 레이아웃 */
  .blog-layout, .single-layout { padding: 14px 0 28px; gap: 18px; }

  /* 사이드바 */
  .sidebar { gap: 12px; }
  .sidebar-widget { padding: 14px; }
  .sidebar-widget__title { font-size: .85rem; margin-bottom: 10px; }
  .widget-tel-btn { font-size: .95rem; padding: 12px; }
  .widget-hours__row { font-size: .78rem; }
  .widget-doctor__name { font-size: .82rem; }
  .widget-doctor__spec { font-size: .72rem; }
  .sidebar-faq__q { font-size: .79rem; }
  .sidebar-faq__a { font-size: .75rem; }
  .tag-cloud a { font-size: .72rem; padding: 4px 9px; }

  /* 싱글 포스트 */
  .breadcrumb { font-size: .7rem; flex-wrap: wrap; gap: 4px; }
  .post-header { padding: 14px 16px; margin-bottom: 16px; }
  .post-header h1 { font-size: 1.1rem !important; line-height: 1.35 !important; }
  .post-meta { flex-wrap: wrap; gap: 6px; }
  .post-meta__date, .post-meta__read { font-size: .74rem; }
  .post-body { padding: 16px; font-size: .9rem; line-height: 1.8; }
  .post-body h2 { font-size: 1.05rem; margin: 22px 0 10px; }
  .post-body h3 { font-size: .95rem; margin: 18px 0 8px; }
  .post-body h4 { font-size: .88rem; }
  .post-body p { margin-bottom: 12px; }
  .post-body img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 8px;
  }
  .post-body ul, .post-body ol { margin: 10px 0 12px 16px; }

  /* 저자 박스 */
  .author-box { flex-direction: column; gap: 12px; padding: 16px; }
  .author-box__avatar { width: 44px; height: 44px; font-size: 1.2rem; }
  .author-box__name { font-size: .88rem; }
  .author-box__bio { font-size: .78rem; }

  /* CTA */
  .post-cta { padding: 18px 16px; margin-top: 10px; }
  .post-cta h3 { font-size: .9rem; }
  .post-cta p { font-size: .78rem; margin-bottom: 12px; }

  /* FAQ */
  .faq-section { margin-top: 24px; }
  .faq-section > h2 { font-size: 1rem; }
  .faq-q { font-size: .86rem; padding: 14px; line-height: 1.5; }
  .faq-icon { width: 24px; height: 24px; font-size: 1rem; line-height: 24px; }
  .faq-a { padding: 0 14px 14px; font-size: .82rem; }

  /* 카테고리 섹션 헤더 */
  .cat-section-head h2 { font-size: .9rem; }
  .cat-section-head a { font-size: .74rem; }

  /* 페이지네이션 */
  .pagination { gap: 4px; margin-top: 20px; }
  .pagination .page-numbers { width: 32px; height: 32px; font-size: .78rem; border-radius: 7px; }

  /* 아카이브 헤더 */
  .archive-header { padding: 14px 16px; margin-bottom: 16px; }
  .archive-header__title { font-size: 1.05rem; }

  /* 푸터 */
  .footer-grid { grid-template-columns: 1fr; gap: 18px; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
  .footer-bottom a { margin-left: 8px; }
  .site-footer { padding: 28px 0 80px; }
  .footer-brand__logo { font-size: .9rem; }
  .footer-brand__desc { font-size: .76rem; }
  .footer-brand__info { font-size: .7rem; }
  .footer-col h4 { font-size: .82rem; }
  .footer-col ul a { font-size: .78rem; }

  /* 맨 위로 버튼 */
  .scroll-top { bottom: 80px; right: 12px; width: 40px; height: 40px; font-size: 1rem; }

  /* 모바일 하단 CTA 바 */
  .mobile-cta-bar { display: flex !important; }
}

/* -- 초소형 (380px 이하) -- */
@media (max-width: 380px) {
  .header-tel { font-size: .68rem; padding: 5px 8px; }
  .blog-hero__title { font-size: 1.08rem; }
  .blog-hero__actions .btn { font-size: .74rem; padding: 8px 11px; }
  .cert-badge { font-size: .63rem; padding: 4px 7px; }
  .cat-nav__link { font-size: .7rem; padding: 5px 9px; }
}

/* -- 모바일 하단 플로팅 CTA 바 -- */
.mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--navy);
  border-top: 2px solid var(--gold);
  padding: 8px 14px 10px;
  gap: 10px;
  align-items: center;
}
.mobile-cta-bar a {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 11px 8px;
  border-radius: 8px;
  font-size: .85rem; font-weight: 700;
  text-align: center;
}
.mobile-cta-bar .cta-tel { background: var(--gold); color: var(--navy); }
.mobile-cta-bar .cta-naver { background: #03c75a; color: #fff; }

/* ── PC 전용 상시 검색창 ── */
.header-search-inline {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 22px;
  overflow: hidden;
  height: 36px;
  transition: background var(--trans), border-color var(--trans);
}
.header-search-inline:focus-within {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.40);
}
.header-search-inline input {
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: .82rem;
  padding: 0 14px;
  width: 180px;
  font-family: inherit;
}
.header-search-inline input::placeholder { color: rgba(255,255,255,.55); }
.header-search-inline button {
  background: none;
  border: none;
  color: rgba(255,255,255,.80);
  font-size: .95rem;
  padding: 0 12px 0 4px;
  cursor: pointer;
  height: 100%;
  display: flex;
  align-items: center;
  transition: color var(--trans);
}
.header-search-inline button:hover { color: #fff; }

/* 모바일에서는 숨김 */
@media (max-width: 900px) {
  .header-search-inline { display: none; }
}

/* 돋보기 버튼 가시성 강화 */
.header-search-inline button {
  background: var(--gold) !important;
  color: var(--navy) !important;
  font-size: 1rem !important;
  padding: 0 13px !important;
  border-radius: 0 22px 22px 0 !important;
  border-left: 1px solid rgba(255,255,255,.15) !important;
}
.header-search-inline button:hover {
  background: #e0a80a !important;
  color: var(--navy) !important;
}

/* 검색창 너비 조정 + 돋보기 오버플로우 방지 */
.header-search-inline {
  overflow: visible !important;
  flex-shrink: 0;
}
.header-search-inline input {
  width: 150px !important;
}

/* 검색창 레이아웃 수정 */
.site-nav { flex-shrink: 1; min-width: 0; }
.header-right { flex-shrink: 0; margin-left: 12px; }
.header-search-inline { overflow: hidden; }
.header-search-inline input { width: 140px !important; min-width: 0; }
.header-search-inline button {
  flex-shrink: 0;
  background: var(--gold) !important;
  color: var(--navy) !important;
  border-left: 1px solid rgba(0,0,0,.1) !important;
  border-radius: 0 22px 22px 0 !important;
  padding: 0 12px !important;
  font-size: .88rem !important;
  font-weight: 700 !important;
}
.header-search-inline button svg { stroke: var(--navy); }
.header-search-inline button:hover { background: #e0a80a !important; }

/* 검색창 너비 확대 - 플레이스홀더 구문 전체 표시 */
.header-search-inline input { width: 200px !important; }
