/* 양산서울치과의원 — 홈페이지 리뉴얼 초안 스타일시트
   정본 콘텐츠는 docs/plans/261007_website-renewal-spec.md 참고 */

:root {
  --navy: #1b2a3d;
  --navy-deep: #12202e;
  --gold: #b8902f;
  --ink: #1a1a1a;
  --mute: #5f6b78;
  --base: #faf9f6;
  --line: #e4e1da;
  --radius: 10px;
  --maxw: 1100px;
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  color: var(--ink);
  background: var(--base);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* 헤더 */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .wrap { position: relative; display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--navy); letter-spacing: -0.3px; line-height: 1.2; }
.brand-icon { height: 42px; width: auto; display: block; flex-shrink: 0; }
.brand-text small { display: block; font-size: 0.65rem; font-weight: 600; color: var(--gold); letter-spacing: 1.5px; margin-top: 2px; }
.gnb ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.gnb a { font-size: 0.95rem; font-weight: 500; color: var(--ink); }
.gnb a:hover { color: var(--navy); }

/* 모바일 햄버거 메뉴 — JS 없이 체크박스로 */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 32px; height: 32px; cursor: pointer; }
.nav-burger span { display: block; width: 100%; height: 2px; background: var(--navy); }

/* 히어로 — 배경사진 + 좌(글자)→우(사진) 페이드 */
.hero {
  position: relative;
  background:
    linear-gradient(90deg, var(--navy) 0%, var(--navy) 32%, rgba(27,42,61,0.75) 50%, rgba(27,42,61,0.2) 78%, rgba(18,32,46,0.35) 100%),
    url('../assets/hero-reception-web.jpg');
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  color: #fff;
  padding: 72px 0 64px;
}
.hero .eyebrow { color: var(--gold); font-size: 0.85rem; letter-spacing: 2px; font-weight: 600; margin-bottom: 14px; }
.hero h1 { font-size: 2.1rem; line-height: 1.45; margin: 0 0 16px; font-weight: 700; }
.hero p { font-size: 1.05rem; color: #c9d4e3; max-width: 560px; margin: 0 0 28px; }
.hero .cta { display: inline-flex; gap: 12px; }
.btn { display: inline-block; padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 0.95rem; }
.btn-primary { background: var(--gold); color: #1a1208; }
.btn-ghost { border: 1px solid rgba(255,255,255,0.4); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--navy); color: var(--navy); }
.article-cta .btn + .btn { margin-left: 10px; }

/* 섹션 공통 */
section.block { padding: 64px 0; border-bottom: 1px solid var(--line); }
section.block:last-of-type { border-bottom: none; }
.block h1, .block h2 { font-size: 1.55rem; color: var(--navy); margin: 0 0 8px; }
.block .lead { color: var(--mute); margin: 0 0 36px; font-size: 1rem; }

/* 진료 카드 그리드 */
.care-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.care-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; }
.care-card .tag { color: var(--gold); font-size: 0.75rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.care-card h3 { margin: 10px 0 10px; font-size: 1.15rem; color: var(--navy); }
.care-card p { margin: 0; color: var(--mute); font-size: 0.92rem; }

/* 의료진 */
.doctor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.doctor-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.doctor-card .role { color: var(--gold); font-size: 0.8rem; font-weight: 700; letter-spacing: 1px; }
.doctor-card h3 { margin: 6px 0 16px; font-size: 1.3rem; color: var(--navy); }
.doctor-card ul { margin: 0; padding-left: 18px; color: var(--mute); font-size: 0.92rem; line-height: 1.9; }
.doctor-shared { margin-top: 24px; padding-top: 20px; border-top: 1px dashed var(--line); color: var(--mute); font-size: 0.9rem; }
.doctor-photo { text-align: center; margin-bottom: 18px; }
.avatar-placeholder { width: 112px; height: 112px; border-radius: 50%; margin: 0 auto; object-fit: cover; display: block; }
.avatar-caption { margin: 8px 0 0; font-size: 0.75rem; color: var(--mute); letter-spacing: 0.3px; }

/* 신뢰 포인트 */
.trust-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; list-style: none; margin: 0; padding: 0; }
.trust-list li { text-align: center; }
.trust-list .num { font-size: 1.8rem; font-weight: 700; color: var(--navy); }
.trust-list .label { color: var(--mute); font-size: 0.88rem; margin-top: 4px; }

/* 오시는길 / 연락 */
.contact-panel { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contact-panel h3 { margin: 0 0 8px; color: #fff; }
.contact-panel p { color: #c9d4e3; margin: 0 0 4px; font-size: 0.95rem; }
.contact-panel .tel { font-size: 1.3rem; font-weight: 700; color: var(--gold); }

/* 비급여 표 */
table.fee-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.fee-table caption { text-align: left; font-weight: 700; color: var(--navy); margin-bottom: 10px; font-size: 1.05rem; }
table.fee-table th, table.fee-table td { border: 1px solid var(--line); padding: 10px 8px; text-align: center; }
table.fee-table thead th { background: var(--navy); color: #fff; font-weight: 600; }
table.fee-table tbody tr:nth-child(even) { background: #f3f1ec; }
table.fee-table td.cat { font-weight: 600; color: var(--navy); background: #fff; }
.fee-note { font-size: 0.85rem; color: var(--mute); margin-top: 16px; }
.fee-missing { color: #a33; font-weight: 600; }

/* 유튜브 */
.youtube-feature { margin-bottom: 28px; border-radius: var(--radius); overflow: hidden; background: #000; }
.youtube-feature iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; display: block; border: 0; }
.youtube-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.youtube-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.youtube-card img { width: 100%; display: block; }
.youtube-card .yt-text { padding: 12px 14px; }
.youtube-card .yt-tag { color: var(--gold); font-size: 0.72rem; font-weight: 700; }
.youtube-card .yt-title { margin-top: 4px; font-size: 0.88rem; color: var(--ink); line-height: 1.4; }
.youtube-more { text-align: right; margin-top: 16px; }
.youtube-more a { color: var(--navy); font-weight: 600; font-size: 0.9rem; text-decoration: underline; }

/* 플로팅 퀵메뉴 — 카카오톡·지도·주차장 안내 */
.quick-nav { position: fixed; right: 18px; bottom: 90px; z-index: 30; display: flex; flex-direction: column; gap: 10px; }
.quick-nav a, .quick-nav label {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; background: #fff; border: 1px solid var(--line);
  border-radius: 50%; box-shadow: 0 2px 10px rgba(0,0,0,0.15); cursor: pointer;
}
.quick-nav img, .quick-nav svg { width: 26px; height: 26px; display: block; }

.parking-toggle { position: absolute; opacity: 0; pointer-events: none; }
.parking-modal {
  display: none; position: fixed; inset: 0; background: rgba(18,32,46,0.65);
  z-index: 40; align-items: center; justify-content: center; padding: 20px;
}
.parking-toggle:checked ~ .parking-modal { display: flex; }
.parking-modal .panel {
  position: relative; background: #fff; border-radius: var(--radius);
  max-width: 520px; width: 100%; max-height: 90vh; overflow: auto;
}
.parking-modal .panel img { width: 100%; display: block; }
.parking-modal .close-btn {
  position: absolute; top: 10px; right: 10px;
  width: 34px; height: 34px; background: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem; color: var(--navy);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25); cursor: pointer;
}

/* 풋터 */
.site-footer { background: var(--navy-deep); color: #8a9aa5; padding: 36px 0; font-size: 0.85rem; }
.site-footer strong { color: #c9d4d9; }
.site-footer .biz-line { margin: 6px 0; }

/* 시설 사진 */
.facility-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.facility-grid img { width: 100%; height: 320px; object-fit: cover; border-radius: var(--radius); }

/* 지도 */
.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-bottom: 14px; }
.map-embed iframe { width: 100%; height: 360px; border: 0; display: block; }

/* 모바일 하단 고정 전화 바 */
.call-bar { display: none; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* 블로그 검색 — JS 없으면 기본 숨김(progressive enhancement) */
.blog-search { display: none; margin-bottom: 28px; }
html.js .blog-search { display: block; }
.blog-search input { width: 100%; max-width: 420px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.95rem; font-family: inherit; color: var(--ink); }
.blog-search input:focus { outline: 2px solid var(--navy); outline-offset: 1px; }
.blog-search-count { margin: 0 0 16px; color: var(--mute); font-size: 0.88rem; }
.blog-search-empty { display: none; padding: 32px; text-align: center; color: var(--mute); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.blog-noscript-note { color: var(--mute); font-size: 0.85rem; margin-bottom: 20px; }

/* 블로그 목록 */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.blog-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: block; }
.blog-card .blog-card-body { padding: 22px; }
.blog-card .tag { color: var(--gold); font-size: 0.72rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.blog-card .blog-date { color: var(--mute); font-size: 0.78rem; margin-top: 6px; }
.blog-card h3 { margin: 10px 0 10px; font-size: 1.1rem; color: var(--navy); line-height: 1.4; }
.blog-card p { margin: 0; color: var(--mute); font-size: 0.9rem; line-height: 1.6; }

/* 블로그 글 본문 */
.article-block { padding: 56px 0 72px; }
.article-meta { color: var(--mute); font-size: 0.85rem; margin-bottom: 12px; }
.article-block h1 { font-size: 1.7rem; color: var(--navy); margin: 0 0 24px; line-height: 1.4; }
.article-body { max-width: 720px; }
.article-body p { margin: 0 0 18px; font-size: 1rem; color: var(--ink); line-height: 1.85; }
.article-body h2 { font-size: 1.2rem; color: var(--navy); margin: 34px 0 12px; }
.article-back { display: inline-block; margin-top: 8px; margin-bottom: 28px; color: var(--navy); font-weight: 600; text-decoration: underline; font-size: 0.92rem; }
.article-cta { margin-top: 36px; padding: 24px; background: #f3f1ec; border-radius: var(--radius); max-width: 720px; }
.article-cta p { margin: 0 0 12px; color: var(--ink); font-size: 0.95rem; }
.ref-list { margin: 0; padding-left: 18px; color: var(--mute); font-size: 0.82rem; line-height: 1.9; }
.ref-list a { text-decoration: underline; color: var(--mute); }

/* 블로그 페이지 이동 */
.blog-pagination { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 40px; }
.blog-pagination a, .blog-pagination span.current { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 12px; border-radius: 999px; font-size: 0.9rem; font-weight: 600; }
.blog-pagination a { color: var(--navy); border: 1px solid var(--line); background: #fff; }
.blog-pagination a:hover { background: var(--base); }
.blog-pagination span.current { background: var(--navy); color: #fff; }
.blog-pagination a.next, .blog-pagination a.prev { border: none; background: none; padding: 0 4px; }

/* 글 목차(TOC) — JS가 .article-body를 감싸 만든다 */
.article-layout { display: block; }
.article-main { min-width: 0; }
.article-toc { display: none; }
.article-toc.ready {
  display: block;
  margin-bottom: 28px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.article-toc-title {
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.5px;
  list-style: none;
}
.article-toc-title::-webkit-details-marker { display: none; }
.article-toc-title::after { content: "▾"; float: right; color: var(--mute); }
.article-toc[open] .article-toc-title::after { content: "▴"; }
.article-toc ul { list-style: none; margin: 12px 0 0; padding: 0 0 0 12px; border-left: 2px solid var(--line); }
.article-toc li { margin: 0; }
.article-toc a { display: block; padding: 5px 0 5px 12px; font-size: 0.85rem; color: var(--mute); border-left: 2px solid transparent; margin-left: -2px; line-height: 1.4; }
.article-toc a:hover { color: var(--navy); }
.article-toc a.active { color: var(--navy); font-weight: 700; border-left-color: var(--gold); }

@media (min-width: 960px) {
  .article-layout.has-toc { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; }
  .article-toc.ready { position: sticky; top: 90px; margin-bottom: 0; }
  .article-toc-title { cursor: default; }
  .article-toc-title::after { content: none; }
}

/* 설명 다이어그램 */
figure.diagram { margin: 24px 0; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); max-width: 720px; }
figure.diagram svg { width: 100%; height: auto; display: block; }
figure.diagram figcaption { margin-top: 10px; font-size: 0.85rem; color: var(--mute); text-align: center; }

/* 모바일 */
@media (max-width: 760px) {
  .nav-burger { display: flex; }
  .gnb {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .gnb ul { flex-direction: column; gap: 0; padding: 0 20px; }
  .gnb li { border-top: 1px solid var(--line); }
  .gnb a { display: block; padding: 16px 0; }
  .nav-toggle:checked ~ .gnb { max-height: 320px; }

  .hero h1 { font-size: 1.6rem; }
  .contact-panel { grid-template-columns: 1fr; }

  .call-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    background: var(--navy);
    color: #fff;
    padding: 14px 20px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 -4px 14px rgba(0,0,0,0.15);
  }
  .call-bar .call-gold { color: var(--gold); }
  body { padding-bottom: 58px; }
}
