/* ==========================================================================
   서울진치과 — style.css
   컬러: White / Dark Gray / Orange (간판 디자인 기준)
   모바일 우선(Mobile First) 반응형
   ========================================================================== */

/* 1. 변수 ----------------------------------------------------------------- */
:root {
  --orange: #E85A24;
  --orange-dark: #C74413;
  --gray-900: #2B2B2E;   /* 간판 바탕 다크그레이 */
  --gray-800: #3E3E42;
  --gray-600: #6B6B70;
  --gray-400: #9A9AA0;
  --gray-200: #E2E2E5;
  --gray-100: #F4F4F6;
  --white: #FFFFFF;

  --ink: var(--gray-900);
  --muted: var(--gray-600);
  --line: var(--gray-200);

  --wrap: 1120px;
  --pad: 20px;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

/* 2. 리셋 / 기본 ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px; /* sticky 헤더 높이 보정 */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont,
               "Malgun Gothic", "맑은 고딕", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.7;
  font-size: 16px;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.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;
}

.skip-link {
  position: absolute; top: -60px; left: 12px; z-index: 200;
  background: var(--orange); color: #fff;
  padding: 10px 16px; border-radius: var(--radius); font-size: 14px;
}
.skip-link:focus { top: 12px; }

/* 3. 공통 타이포 ---------------------------------------------------------- */
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .14em;
  color: var(--orange); text-transform: uppercase; margin-bottom: 10px;
}

h2 {
  font-size: 24px; font-weight: 700; letter-spacing: -.02em;
  line-height: 1.35; margin-bottom: 12px;
}

h3 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }

.section-lead {
  color: var(--muted); font-size: 15px; margin-bottom: 4px;
}

.fallback { color: var(--gray-400); font-size: 14px; }

/* 4. 버튼 ----------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  font-size: 15px; font-weight: 700; letter-spacing: -.01em;
  border: 1.5px solid transparent; border-radius: var(--radius);
  cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }

.btn-primary { background: var(--orange); color: #fff; border-color: var(--orange); }
.btn-primary:hover { background: var(--orange-dark); border-color: var(--orange-dark); }

.btn-outline { background: transparent; color: var(--gray-800); border-color: var(--line); }
.btn-outline:hover { border-color: var(--gray-800); }

/* 5. 헤더 ----------------------------------------------------------------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 64px;
}

.logo { display: inline-flex; align-items: center; flex-shrink: 0; }

/* 로고 락업(심볼 + 서울진치과 + 영문)은 명함에서 추출한 벡터 한 장이다.
   비율(400:89.72)은 SVG가 유지하므로 높이만 지정한다. */
.logo-lockup { height: 38px; width: auto; display: block; }

.nav { display: none; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions .btn { display: none; }

.menu-toggle {
  width: 44px; height: 44px; position: relative;
  background: none; border: none; cursor: pointer; flex-shrink: 0;
}
.menu-toggle span {
  position: absolute; left: 11px; width: 22px; height: 2px;
  background: var(--gray-900); transition: transform .2s ease, opacity .2s ease;
}
.menu-toggle span:nth-child(1) { top: 15px; }
.menu-toggle span:nth-child(2) { top: 21px; }
.menu-toggle span:nth-child(3) { top: 27px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-nav {
  display: flex; flex-direction: column;
  background: var(--white); border-top: 1px solid var(--line);
}
.mobile-nav[hidden] { display: none; }
.mobile-nav a {
  padding: 14px var(--pad); font-size: 15px; font-weight: 500;
  border-bottom: 1px solid var(--line);
}

/* 6. 히어로 --------------------------------------------------------------- */
.hero {
  background: var(--gray-100);
  border-bottom: 1px solid var(--line);
}
.hero-inner { padding-top: 48px; padding-bottom: 48px; }

.hero h1 {
  font-size: 28px; font-weight: 700; line-height: 1.4;
  letter-spacing: -.03em; margin-bottom: 16px;
}
.hero h1 span { color: var(--orange); }

.hero-text {
  color: var(--muted); font-size: 15px; max-width: 540px; margin-bottom: 28px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.hero-facts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line);
}
.hero-facts strong {
  display: block; font-size: 17px; font-weight: 700; color: var(--gray-900);
}
.hero-facts span { font-size: 12.5px; color: var(--muted); }

/* 7. 섹션 ----------------------------------------------------------------- */
.section { padding: 56px 0; }
.section-alt { background: var(--gray-100); }

/* 8. 카드 그리드 ---------------------------------------------------------- */
.card-grid {
  display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 28px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 8px; }
.card h3::before {
  content: ""; display: block;
  width: 24px; height: 3px; background: var(--orange);
  border-radius: 2px; margin-bottom: 12px;
}
.card p { font-size: 14px; color: var(--muted); }

/* 9. 의료진 --------------------------------------------------------------- */
.doctor {
  margin-top: 28px;
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--white);
}

/* 사진은 원본 해상도에 한계가 있어 크게 띄우지 않는다.
   표시 크기를 줄이면 화면 밀도가 올라가 더 선명하게 보인다. */
.doctor-photo {
  background: var(--gray-100);
  display: flex; justify-content: center;
  padding: 24px 20px 0;
}
.doctor-photo img { width: 100%; max-width: 240px; height: auto; }

.doctor-body { padding: 24px 20px; }

.doctor-role {
  font-size: 12px; font-weight: 700; letter-spacing: .1em;
  color: var(--orange); margin-bottom: 4px;
}
.doctor-name { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.doctor-name small {
  display: block; font-size: 14px; font-weight: 500; color: var(--muted);
  letter-spacing: 0; margin-top: 2px;
}

.doctor-quote {
  margin: 16px 0 24px; padding-left: 14px;
  border-left: 3px solid var(--orange);
  font-size: 15px; color: var(--gray-800);
}

.cv { display: grid; gap: 22px; }
.cv-group h4 {
  font-size: 13px; font-weight: 700; color: var(--gray-900);
  padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1px solid var(--line);
}
.cv-group li {
  font-size: 14px; color: var(--muted); padding: 3px 0 3px 12px; position: relative;
}
.cv-group li::before {
  content: ""; position: absolute; left: 0; top: 14px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--gray-400);
}

/* 10. 공지사항 ------------------------------------------------------------ */
.notice-list { margin-top: 28px; border-top: 2px solid var(--gray-900); }

.notice-item {
  padding: 18px 4px; border-bottom: 1px solid var(--line);
}
.notice-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px;
}
.notice-tag {
  flex-shrink: 0; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  padding: 3px 9px; border-radius: 3px;
  background: var(--orange); color: #fff;
}
.notice-title { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.notice-date {
  font-size: 12.5px; color: var(--gray-400); margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.notice-body { font-size: 14px; color: var(--muted); }

/* 11. 진료시간 / 오시는 길 ------------------------------------------------ */
.hours-wrap,
.location { display: grid; gap: 12px; margin-top: 28px; }

/* 지도 — 비율 고정 컨테이너 안에 iframe을 채우고, 위에 이름표를 얹는다. */
.map {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--gray-100);
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
/* 네이버 지도 스크립트가 컨테이너의 position 을 inline 으로 relative 로
   덮어쓴다. 그러면 inset:0 이 무효가 되어 높이가 0으로 접히므로,
   width/height 를 명시해 어느 쪽이든 부모를 채우게 한다. */
.map-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-fallback { position: absolute; inset: 0; }
.map-canvas[hidden], .map-fallback[hidden] { display: none; }

/* 네이버 지도 위에 올라가는 마커 (JS API가 이 마크업을 넣는다) */
.map-marker {
  transform: translate(-50%, -140%);
  background: var(--gray-900); color: #fff;
  font-size: 13px; font-weight: 700; line-height: 1; white-space: nowrap;
  padding: 8px 12px; border-radius: 100px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}
.map-marker { cursor: pointer; }
.map-marker b { color: var(--orange); }
.map-marker::after {
  content: ""; position: absolute; left: 50%; top: 100%;
  transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--gray-900);
}

.map-pin {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -230%);
  pointer-events: none;               /* 지도 조작을 막지 않는다 */
  background: var(--gray-900); color: #fff;
  font-size: 13px; font-weight: 700; line-height: 1;
  padding: 8px 12px; border-radius: 100px; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}
.map-pin span { color: var(--orange); }
.map-pin::after {
  content: ""; position: absolute; left: 50%; top: 100%;
  transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--gray-900);
}

.hours-cta {
  background: var(--gray-100); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 20px;
  align-self: start;
}
.hours-cta h3 { margin-bottom: 8px; }
.hours-cta p { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.hours-cta .btn { width: 100%; }

.info-block {
  background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px;
}
.info-block h3 { margin-bottom: 14px; }

.hours { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours th, .hours td {
  text-align: left; font-size: 14.5px;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.hours td:first-child { font-weight: 500; color: var(--gray-800); width: 45%; }
.hours td:last-child { color: var(--muted); text-align: right; }
.hours tr:last-child td { border-bottom: none; }
.hours tr.is-closed td { color: var(--orange); font-weight: 500; }

/* 점심시간 — 진료 요일과 구분되도록 굵은 선과 배경을 준다. */
.hours tr.is-lunch td {
  border-top: 2px solid var(--line); border-bottom: none;
  background: var(--gray-100); padding: 11px 12px;
}
.hours tr.is-lunch td:first-child { color: var(--gray-900); }
.hours tr.is-lunch small {
  display: block; font-size: 12px; color: var(--muted); margin-top: 3px;
}

.hours-note {
  margin-top: 12px; font-size: 13px; color: var(--muted);
  background: var(--gray-100); border-radius: var(--radius); padding: 10px 12px;
}
.hours-note:empty { display: none; }

.info-list { display: grid; grid-template-columns: 68px 1fr; gap: 0; }
.info-list dt {
  font-size: 14px; font-weight: 700; color: var(--gray-800);
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.info-list dd {
  font-size: 14px; color: var(--muted);
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.info-list dd a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.info-list dd a:hover { color: var(--orange); }

.info-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.info-actions .btn { flex: 1 1 auto; }

/* 13. 푸터 ---------------------------------------------------------------- */
.footer {
  background: var(--gray-800); color: var(--gray-400);
  padding: 36px 0 90px; /* 하단 고정바 높이만큼 여유 */
  font-size: 13.5px;
}
.footer-inner { display: grid; gap: 20px; }
.footer p { line-height: 1.8; }
.footer a { text-decoration: underline; text-underline-offset: 2px; }
.footer a:hover { color: var(--white); }

.footer-logo {
  font-size: 17px; font-weight: 700; color: var(--white);
  letter-spacing: -.02em; margin-bottom: 6px;
}
.footer-logo span { color: var(--orange); }

.copyright {
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  text-align: center; font-size: 12px; color: var(--gray-600);
}

/* 14. 모바일 하단 고정 바 -------------------------------------------------- */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--gray-900);
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-bar a {
  display: flex; align-items: center; justify-content: center;
  min-height: 54px; color: #fff; font-size: 15px; font-weight: 700;
  border-left: 1px solid rgba(255, 255, 255, .14);
}
.mobile-bar a:first-child { border-left: none; background: var(--orange); }

/* 15. 반응형 — 태블릿 이상 ------------------------------------------------ */
@media (min-width: 768px) {
  :root { --pad: 32px; }

  h2 { font-size: 30px; }

  .card-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }

  .hero-inner { padding-top: 72px; padding-bottom: 72px; }
  .hero h1 { font-size: 40px; }
  .hero-text { font-size: 16.5px; }
  .hero-actions .btn { min-width: 160px; }

  .section { padding: 80px 0; }

  .doctor { display: grid; grid-template-columns: 296px 1fr; }
  .doctor-photo { align-items: flex-start; padding: 28px; }
  .doctor-photo img { max-width: none; }
  .doctor-body { padding: 32px; }

  .cv { grid-template-columns: repeat(2, 1fr); gap: 22px 32px; }

  .hours-wrap { grid-template-columns: 1.35fr 1fr; align-items: start; }
  .location { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
  .map { aspect-ratio: 4 / 3.2; }
  .info-block, .hours-cta { padding: 28px; }

  .footer { padding-bottom: 36px; }
  .footer-inner { grid-template-columns: 1fr auto; }

  .mobile-bar { display: none; }
}

/* 16. 반응형 — PC -------------------------------------------------------- */
@media (min-width: 1024px) {
  html { scroll-padding-top: 80px; }

  .header-inner { height: 76px; }
  .logo-lockup { height: 42px; }

  .nav { display: flex; gap: 4px; margin-left: auto; }
  .nav a {
    padding: 8px 16px; font-size: 15px; font-weight: 500; color: var(--gray-800);
    border-radius: var(--radius); transition: color .15s ease;
  }
  .nav a:hover { color: var(--orange); }

  .header-actions { margin-left: 8px; }
  .header-actions .btn { display: inline-flex; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none !important; }

  .hero h1 { font-size: 46px; }
  .hero-facts { max-width: 620px; }

  .card-grid-4 { grid-template-columns: repeat(4, 1fr); }

  .cv { grid-template-columns: repeat(3, 1fr); }
}

/* 17. 모션 최소화 선호 ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* 18. 인쇄 --------------------------------------------------------------- */
@media print {
  .header, .mobile-bar, .hero-actions, .info-actions { display: none; }
  body { font-size: 12pt; }
}
