@charset "utf-8";

/* =========================================================
   엘림동물의료센터 — 공통 스타일
   모바일 우선(mobile-first). 768px / 1024px 에서 확장.
   ========================================================= */

:root {
  --ground: #FBF6EF;
  --band: #F2E7D9;
  --white: #FFFFFF;
  --border: #E7DBCC;
  --divider: #EFE6DA;
  --outline: #E0D2C0;
  --accent: #A8481B;
  --accent-dark: #7C3411;
  --pill: #3F6B52;
  --ink: #2A231E;
  --body: #4A3F37;
  --muted: #6A5B50;
  --nav: #3E352E;
  --footer: #241D18;
  --footer-body: #BCAC9D;
  --footer-label: #9C8B7A;
  --footer-link: #E6DCD2;
  --footer-rule: #3A302A;
  --placeholder: #F0E5D8;
  --map-bg: #F5EDE1;
  --map-border: #E1D2C0;

  --display: 'Hahmlet', 'Nanum Myeongjo', serif;
  --sans: 'IBM Plex Sans KR', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo',
          'Malgun Gothic', system-ui, sans-serif;

  --wrap: 1180px;
  --gutter: 20px;
  --radius: 18px;
  --radius-lg: 24px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  background: var(--ground);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
img { height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.35;
  margin: 0;
  text-wrap: pretty;
}

p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

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

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

/* ---------- 헤더 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 246, 239, 0.94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  flex-shrink: 0;
}
.brand:hover { color: var(--ink); }
.brand img { width: 32px; height: 32px; }
.brand span {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.header-actions { display: flex; align-items: center; gap: 8px; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--outline);
  border-radius: 12px;
  color: var(--nav);
  cursor: pointer;
}
.nav-toggle:hover { background: var(--band); }

.site-nav { flex-basis: 100%; order: 3; border-top: 1px solid var(--divider); }
.site-nav ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0 16px;
}
.site-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 4px;
  font-size: 16px;
  color: var(--nav);
  border-bottom: 1px solid var(--divider);
}
.site-nav a[aria-current="page"] { color: var(--accent); font-weight: 500; }
.site-nav[hidden] { display: none; }

/* ---------- 버튼 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  text-align: center;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { background: var(--white); color: var(--ink); border-color: var(--outline); }
.btn-outline:hover { background: var(--band); color: var(--ink); }
.btn-ghost-light { background: transparent; color: #fff; border-color: #E5B79E; }
.btn-ghost-light:hover { background: rgba(255,255,255,0.12); color: #fff; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 14px; }

/* 좁은 화면에서는 헤더 전화 버튼을 아이콘만 (하단 고정 바에 전화 문의가 따로 있음) */
.btn-call-compact { padding: 0 13px; }
.btn-call-compact span { display: none; }

/* ---------- 섹션 공통 ---------- */

.section { padding: 48px 0; }
.section-white { background: var(--white); }
.section-band { background: var(--band); }

.eyebrow {
  display: block;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-head { margin-bottom: 24px; }
.section-head h2 { font-size: 26px; }
.section-head p { margin-top: 12px; color: var(--muted); font-size: 15px; }

.lead { font-size: 15px; line-height: 1.85; color: var(--muted); }
.note { font-size: 13px; line-height: 1.75; color: var(--muted); }

.pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  background: var(--pill);
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
}
.tag {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 13px;
  background: var(--band);
  border-radius: 999px;
  font-size: 12px;
  color: var(--accent-dark);
}

/* ---------- 히어로 ---------- */

.hero { padding: 32px 0 40px; }
.hero-grid { display: flex; flex-direction: column; gap: 20px; }
.hero h1 { font-size: 30px; }
.hero .hero-actions { display: flex; flex-direction: column; gap: 10px; }

/* ---------- 슬라이드쇼 ---------- */

.slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--placeholder);
}
.slideshow .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 900ms ease;
}
.slideshow .slide picture { display: block; width: 100%; height: 100%; }
.slideshow .slide img { width: 100%; height: 100%; object-fit: cover; }
.slideshow .slide.is-active { opacity: 1; }

.slide-dots {
  position: absolute;
  left: 0; right: 0; bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  z-index: 2;
}
.slide-dots button {
  width: 26px; height: 26px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slide-dots button span {
  display: block;
  width: 8px; height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.45);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.25);
}
.slide-dots button[aria-current="true"] span { background: #fff; }

.gallery-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.gallery-caption p { font-size: 14px; color: var(--muted); }
.gallery-nav { display: flex; gap: 8px; flex-shrink: 0; }
.gallery-nav button {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--outline);
  border-radius: 999px;
  cursor: pointer;
  color: var(--nav);
}
.gallery-nav button:hover { background: var(--band); }

.gallery .slideshow { aspect-ratio: 3 / 2; border-radius: var(--radius-lg); }

/* ---------- 카드 ---------- */

.cards { display: grid; gap: 14px; }
.card {
  background: var(--ground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.section-white .card { background: var(--ground); }
.section:not(.section-white) .card { background: var(--white); }
.card h3 { font-size: 19px; }
.card p { font-size: 14px; line-height: 1.8; color: var(--muted); }
.card ul { display: flex; flex-direction: column; gap: 6px; }
.card li { font-size: 14px; color: var(--body); padding-left: 14px; position: relative; }
.card li::before {
  content: "";
  position: absolute;
  left: 0; top: 11px;
  width: 5px; height: 5px;
  border-radius: 999px;
  background: var(--outline);
}

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  background: var(--band);
  border-radius: 12px;
  flex-shrink: 0;
}

.steps { counter-reset: step; display: grid; gap: 14px; }
.step {
  display: flex;
  gap: 14px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.step-num {
  flex-shrink: 0;
  width: 34px; height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--band);
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 600;
}
.step h3 { font-size: 17px; margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--muted); line-height: 1.8; }

/* ---------- 진료시간 ---------- */

.hours {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.hours dl { margin: 0; }
.hours .row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
}
.hours .row:last-of-type { border-bottom: none; }
.hours dt { font-size: 15px; font-weight: 500; margin: 0; }
.hours dd { font-size: 15px; color: var(--muted); margin: 0; }
.hours .hours-note { margin-top: 14px; font-size: 13px; line-height: 1.8; color: var(--muted); }

/* ---------- 약도 ---------- */

.map-card {
  background: var(--map-bg);
  border: 1px solid var(--map-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.map-card svg { display: block; width: 100%; height: auto; }
.map-caption {
  padding: 14px 18px;
  border-top: 1px solid var(--map-border);
  font-size: 13px;
  color: var(--muted);
}

/* ---------- 의료진 ---------- */

.doctor {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
/* <picture> 가 flex 아이템이라, 가운데 정렬은 img 가 아니라 picture 기준으로 잡아야 한다 */
.doctor > picture { display: block; width: 100%; }
.doctor-photo {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 50% 12%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-inline: auto;
}
.doctor-name {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}
.doctor-name h2, .doctor-name h3 { font-size: 28px; }
.doctor-name .role { font-size: 15px; color: var(--muted); }
.doctor .cv {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.doctor .cv-label { font-size: 12px; letter-spacing: 0.1em; color: var(--accent); }
.doctor .cv li { font-size: 14px; color: var(--body); }

/* 홈 화면의 간단 의료진 카드 */
.doctor-mini { flex-direction: row !important; gap: 16px; align-items: flex-start; }
.doctor-mini picture { flex-shrink: 0; }
.doctor-mini img {
  width: 104px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 50% 12%;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.doctor-mini .doctor-name h3 { font-size: 22px; }
.doctor-mini p { margin-top: 10px; }

/* ---------- 사진 그리드 ---------- */

.photo-grid { display: grid; gap: 12px; }
.photo-grid figure { margin: 0; }
.photo-grid img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.photo-grid figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.full-bleed img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

/* ---------- CTA ---------- */

.cta {
  background: var(--accent);
  color: #fff;
  padding: 36px 0;
}
.cta h2 { font-size: 24px; color: #fff; }
.cta p { margin-top: 10px; color: #F6E4D9; font-size: 15px; }
.cta .cta-actions { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.cta .btn-primary { background: #fff; color: var(--accent-dark); }
.cta .btn-primary:hover { background: #FBF6EF; color: var(--accent-dark); }

/* ---------- 푸터 ---------- */

.site-footer {
  background: var(--footer);
  color: var(--footer-body);
  padding: 36px 0 40px;
}
.footer-grid { display: flex; flex-direction: column; gap: 26px; }
.footer-brand { display: flex; align-items: center; gap: 9px; }
.footer-brand img { width: 30px; height: 30px; }
.footer-brand span {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ground);
}
.site-footer p { font-size: 13px; line-height: 1.9; color: var(--footer-body); margin-top: 14px; }
.site-footer a { color: var(--footer-link); }
.site-footer a:hover { color: #fff; }
.footer-col h2, .footer-col .col-label {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--footer-label);
  font-weight: 400;
  margin-bottom: 12px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col li, .footer-col a { font-size: 13px; color: var(--footer-link); }
.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 15px;
  margin-top: 16px;
  border: 1px solid #4A3F37;
  border-radius: 999px;
  font-size: 13px;
  color: var(--footer-link);
}
.footer-social:hover { border-color: #6A5B50; color: #fff; }
.footer-legal {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--footer-rule);
  font-size: 12px;
  color: var(--footer-label);
}

/* ---------- 하단 고정 전화 바 (모바일) ---------- */

.call-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: flex;
  gap: 8px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(251, 246, 239, 0.96);
  backdrop-filter: saturate(140%) blur(8px);
  border-top: 1px solid var(--border);
}
.call-bar .btn { flex: 1; min-height: 48px; font-size: 15px; }
body { padding-bottom: 76px; }

/* =========================================================
   태블릿 이상 (768px)
   ========================================================= */

@media (min-width: 768px) {
  :root { --gutter: 32px; }

  .section { padding: 64px 0; }
  .hero { padding: 48px 0 56px; }
  .hero h1 { font-size: 42px; }
  .hero .hero-actions { flex-direction: row; }
  .hero .hero-actions .btn { flex: 0 0 auto; }
  .section-head h2 { font-size: 30px; }
  .lead { font-size: 16px; }

  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .full-bleed img { height: 360px; }

  .doctor { flex-direction: row; gap: 36px; align-items: flex-start; }
  .doctor > picture { width: auto; flex-shrink: 0; }
  .doctor-photo { width: 260px; max-width: none; margin-inline: 0; }
  .doctor-body { flex-grow: 1; display: flex; flex-direction: column; gap: 14px; }
  .doctor-reverse { flex-direction: row-reverse; }

  .cta .cta-actions { flex-direction: row; }
  .cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
  .cta .cta-actions { margin-top: 0; flex-shrink: 0; }

  .footer-grid { flex-direction: row; justify-content: space-between; gap: 40px; }
  .footer-about { max-width: 420px; }
  .footer-cols { display: flex; gap: 56px; }
}

/* =========================================================
   데스크톱 (1024px)
   ========================================================= */

@media (min-width: 1024px) {
  :root { --gutter: 40px; }

  body { padding-bottom: 0; }
  .call-bar { display: none; }

  .header-bar { flex-wrap: nowrap; min-height: 82px; }
  .brand img { width: 38px; height: 38px; }
  .brand span { font-size: 20px; }
  .nav-toggle { display: none; }

  .site-nav { flex-basis: auto; order: 0; border-top: none; display: block !important; }
  .site-nav[hidden] { display: block; }
  .site-nav ul {
    flex-direction: row;
    gap: 4px;
    padding: 0;
  }
  .site-nav a {
    min-height: 44px;
    padding: 0 14px;
    font-size: 15px;
    border-bottom: none;
    border-radius: 999px;
  }
  .site-nav a:hover { background: var(--band); color: var(--nav); }
  .site-nav a[aria-current="page"]:hover { color: var(--accent); }
  .btn-call-compact { padding: 0 16px; }
  .btn-call-compact span { display: inline; }

  .section { padding: 80px 0; }
  .hero { padding: 64px 0 72px; }
  .hero-grid { flex-direction: row; align-items: center; gap: 56px; }
  .hero-copy { flex: 1 1 0; }
  .hero-media { flex: 0 0 504px; }
  .hero h1 { font-size: 50px; }
  .hero .lead { font-size: 17px; }

  .section-head h2 { font-size: 34px; }
  .section-head { margin-bottom: 36px; }

  .cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .photo-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .full-bleed img { height: 420px; }

  .split { display: flex; gap: 32px; align-items: flex-start; }
  .split > * { flex: 1 1 0; min-width: 0; }
  .split-hours > .hours { flex: 0 0 420px; }

  .doctor { gap: 48px; }
  .doctor-photo { width: 300px; }
  .doctor-mini img { width: 120px; }
  .doctor-name h2, .doctor-name h3 { font-size: 36px; }

  .gallery .slideshow { aspect-ratio: 16 / 9; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slideshow .slide { transition: none; }
}

@media print {
  .site-header, .call-bar, .cta, .slide-dots, .gallery-nav { display: none !important; }
  body { padding-bottom: 0; background: #fff; }
}
