/*
Theme Name: Smart Vet
Theme URI: https://smartworkandlife.com
Author: 손상현 (그로스무브)
Author URI: https://smartworkandlife.com
Description: 동물병원 전문 에디토리얼 테마. 다중 페이지 사이트맵 구조 + 진료 안내 10종 + AI 챗봇 + 치료 이야기 + SEO/GEO 최적화. 딥 그린 계열 따뜻한 디자인.
Version: 1.0.2
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietary
Text Domain: smart-vet
Tags: veterinary, animal-hospital, medical, editorial, blog, custom-colors, custom-menu, featured-images, responsive-layout
*/

:root {
  --ink: #17251d;
  --ink-soft: #3d4f45;
  --ink-muted: #7b8a80;
  --line: #e6e9e2;
  --line-soft: #f1f3ee;
  --bg: #fbfaf6;
  --bg-card: #ffffff;
  --cream: #f7f3ea;
  --accent: #1f4d38;
  --accent-light: #2f6b4f;
  --accent-soft: #e8f0ea;
  --gold: #b8853a;
  --gold-soft: #f7efdf;
  --amber: #c9761f;
  --alert: #b4451f;
  --alert-soft: #fbeee7;
  --highlight: #fdf8ea;
  --shadow-sm: 0 1px 2px rgba(23, 37, 29, 0.04);
  --shadow-md: 0 4px 16px rgba(23, 37, 29, 0.07);
  --shadow-lg: 0 12px 40px rgba(23, 37, 29, 0.09);
  --shadow-focus: 0 0 0 4px rgba(47, 107, 79, 0.14);
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* ============================================
   Top Masthead (brand strip)
============================================ */
.masthead {
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.masthead-brand {
  font-family: 'Gowun Batang', serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.masthead-brand::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
}

.masthead-meta {
  display: flex;
  gap: 24px;
  font-weight: 500;
}

.masthead-meta a {
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.masthead-meta a:hover { color: var(--accent); }

/* ============================================
   Hero Section
============================================ */
.hero {
  max-width: 960px;
  margin: 0 auto;
  padding: 96px 24px 64px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 1px;
  background: var(--gold);
}

.hero-kicker {
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-title {
  font-family: 'Gowun Batang', serif;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 20px;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.hero-title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

.hero-subtitle {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0 auto 48px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* ============================================
   Search Bar (Chatbot Entry)
============================================ */
.search-wrap {
  max-width: 680px;
  margin: 0 auto 20px;
  position: relative;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card);
  border: 1.5px solid var(--line);
  border-radius: 100px;
  padding: 6px 6px 6px 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.search-box:focus-within {
  border-color: var(--accent-light);
  box-shadow: var(--shadow-focus), var(--shadow-md);
  transform: translateY(-1px);
}

.search-icon {
  width: 22px;
  height: 22px;
  color: var(--ink-muted);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  padding: 16px 12px;
  outline: none;
  min-width: 0;
}

.search-input::placeholder {
  color: var(--ink-muted);
  font-weight: 400;
}

.search-btn {
  background: var(--ink);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 100px;
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.search-btn:hover {
  background: var(--accent);
  transform: translateX(1px);
}

.search-btn:active { transform: scale(0.98); }

.search-btn:disabled {
  background: var(--ink-muted);
  cursor: not-allowed;
  transform: none;
}

/* AI Badge */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
  margin-top: 14px;
  font-weight: 500;
}

.ai-badge .dot {
  width: 6px;
  height: 6px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.2);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ============================================
   Suggestion Chips
============================================ */
.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 680px;
  margin: 24px auto 0;
}

.chip {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 100px;
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  user-select: none;
}

.chip:hover {
  background: var(--accent-soft);
  border-color: var(--accent-light);
  color: var(--accent);
  transform: translateY(-1px);
}

.chip:active { transform: scale(0.98); }

/* ============================================
   Quick Access Cards
============================================ */
.quick-access {
  max-width: 720px;
  margin: 64px auto 0;
  padding: 0 24px;
}

.quick-access-label {
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 20px;
  font-weight: 600;
  position: relative;
}

.quick-access-label::before,
.quick-access-label::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 60px;
  height: 1px;
  background: var(--line);
}

.quick-access-label::before { left: calc(50% - 140px); }
.quick-access-label::after { right: calc(50% - 140px); }

.quick-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.quick-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.quick-card:hover {
  border-color: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.quick-card.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

.quick-card.primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.quick-icon {
  width: 22px;
  height: 22px;
  stroke-width: 1.5;
}

.quick-label {
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ============================================
   Chat Panel (appears after first query)
============================================ */
.chat-panel {
  max-width: 720px;
  margin: 40px auto 0;
  padding: 0 24px;
  display: none;
}

.chat-panel.active { display: block; animation: slideIn 0.4s ease-out; }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-container {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow-md);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 16px;
}

.chat-title {
  font-family: 'Gowun Batang', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-title::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.2);
}

.chat-clear {
  background: none;
  border: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  font-size: 12px;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.chat-clear:hover { background: var(--line-soft); color: var(--ink); }

.messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  padding-right: 4px;
}

.messages::-webkit-scrollbar { width: 4px; }
.messages::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }

.msg {
  display: flex;
  animation: msgIn 0.3s ease-out;
  max-width: 85%;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg-user { align-self: flex-end; }
.msg-bot { align-self: flex-start; max-width: 92%; }

.bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 1.65;
  word-wrap: break-word;
}

.msg-user .bubble {
  background: var(--ink);
  color: white;
  border-bottom-right-radius: 4px;
}

.msg-bot .bubble {
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line-soft);
  border-bottom-left-radius: 4px;
}

.bubble a.booking-link {
  display: inline-block;
  margin: 8px 6px 2px 0;
  padding: 8px 16px;
  border-radius: 100px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.bubble a.book-naver {
  background: #03c75a;
  color: white;
}

.bubble a.book-kakao {
  background: #fee500;
  color: #181600;
}

.bubble a.book-call {
  background: var(--accent);
  color: white;
}

.bubble a.booking-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.disclaimer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  font-size: 11px;
  color: var(--ink-muted);
  font-style: italic;
  line-height: 1.5;
}

/* Typing indicator */
.typing {
  display: inline-flex;
  gap: 3px;
  padding: 14px 18px;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
}

.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-muted);
  animation: typing 1.4s infinite;
}

.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Chat Input (after first msg) */
.chat-input-wrap {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  gap: 8px;
  align-items: center;
}

.chat-input {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 100px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.chat-input:focus { border-color: var(--accent-light); }

.chat-send {
  background: var(--ink);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 100px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.chat-send:hover { background: var(--accent); }
.chat-send:disabled { background: var(--ink-muted); cursor: not-allowed; }

/* ============================================
   Case Blog Grid (임상 증례)
============================================ */
.blog-section {
  max-width: 1200px;
  margin: 120px auto 0;
  padding: 0 24px;
}

.blog-header {
  text-align: center;
  margin-bottom: 48px;
  position: relative;
}

.blog-header::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 1px;
  background: var(--gold);
}

.blog-kicker {
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 14px;
}

.blog-title {
  font-family: 'Gowun Batang', serif;
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 12px;
}

.blog-title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

.blog-subtitle {
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 520px;
  margin: 0 auto;
}

/* Category filter */
.blog-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 32px auto 48px;
  max-width: 720px;
}

.filter-btn {
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 8px 18px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn:hover {
  border-color: var(--accent-light);
  color: var(--accent);
}

.filter-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

/* Grid: 3 columns x 5 rows = 15 cases */
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.case-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.case-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-light);
}

.case-card:hover .case-image {
  transform: scale(1.05);
}

.case-card:hover .case-title {
  color: var(--accent);
}

.case-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--line-soft);
}

.case-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.case-category-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 12px;
  background: rgba(23, 37, 29, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: white;
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 100px;
  text-transform: uppercase;
}

.case-category-tag.cat-implant { background: rgba(31, 77, 56, 0.9); }
.case-category-tag.cat-ortho { background: rgba(168, 138, 90, 0.9); }
.case-category-tag.cat-aesthetic { background: rgba(153, 53, 86, 0.85); }
.case-category-tag.cat-general { background: rgba(15, 110, 86, 0.85); }

.case-body {
  padding: 20px 22px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.case-date {
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.case-date::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}

.case-title {
  font-family: 'Gowun Batang', serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  transition: color 0.2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.case-excerpt {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.65;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.case-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.case-read-more {
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.02em;
}

.case-read-more .arrow {
  transition: transform 0.25s;
}

.case-card:hover .case-read-more .arrow {
  transform: translateX(3px);
}

.case-meta-right {
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  font-size: 11px;
  color: var(--ink-muted);
}

/* View all CTA */
.blog-view-all {
  text-align: center;
  margin-top: 56px;
}

.view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: transparent;
  border: 1.5px solid var(--ink);
  border-radius: 100px;
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
}

.view-all-btn:hover {
  background: var(--ink);
  color: white;
  transform: translateY(-1px);
}

.view-all-btn .arrow {
  transition: transform 0.25s;
}

.view-all-btn:hover .arrow {
  transform: translateX(4px);
}

/* ============================================
   SEO Hidden Content (crawlable)
============================================ */
.seo-content {
  max-width: 960px;
  margin: 120px auto 0;
  padding: 64px 24px;
  border-top: 1px solid var(--line);
}

.seo-label {
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 12px;
}

.seo-content h2 {
  font-family: 'Gowun Batang', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.seo-content p {
  color: var(--ink-soft);
  margin-bottom: 12px;
  line-height: 1.8;
}

.seo-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.seo-keyword {
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  font-size: 12px;
  padding: 4px 10px;
  background: var(--gold-soft);
  color: var(--gold);
  border-radius: 4px;
  font-weight: 500;
}

/* ============================================
   Responsive
============================================ */
@media (max-width: 640px) {
  .masthead { padding: 14px 18px; flex-wrap: wrap; gap: 10px; }
  .masthead-meta { gap: 14px; font-size: 11px; }
  .masthead-brand { font-size: 17px; }
  .hero { padding: 60px 18px 40px; }
  .hero::before { top: 24px; }
  .hero-kicker { font-size: 11px; margin-bottom: 14px; }
  .hero-subtitle { font-size: 15px; margin-bottom: 32px; }

  .search-wrap { margin-bottom: 16px; }
  .search-box { padding: 4px 4px 4px 16px; }
  .search-input { font-size: 15px; padding: 12px 8px; }
  .search-btn { padding: 11px 18px; font-size: 13px; }
  .search-icon { width: 18px; height: 18px; }

  .chips-row { gap: 6px; padding: 0 8px; }
  .chip { padding: 6px 12px; font-size: 12px; }

  .quick-access { margin-top: 40px; padding: 0 18px; }
  .quick-access-label::before,
  .quick-access-label::after { display: none; }
  .quick-grid { gap: 6px; }
  .quick-card { padding: 14px 6px; }
  .quick-icon { width: 18px; height: 18px; }
  .quick-label { font-size: 11px; }

  .chat-panel { padding: 0 12px; }
  .chat-container { padding: 16px; border-radius: 16px; }
  .bubble { font-size: 14px; padding: 10px 14px; }
  .msg { max-width: 92%; }

  .blog-section { margin-top: 72px; padding: 0 18px; }
  .blog-header { margin-bottom: 28px; }
  .blog-filter { margin: 24px auto 32px; gap: 5px; }
  .filter-btn { font-size: 12px; padding: 6px 14px; }
  .case-grid { grid-template-columns: 1fr; gap: 20px; }
  .case-body { padding: 18px 20px 20px; }
  .case-title { font-size: 16px; }
  .case-excerpt { font-size: 13px; }
  .blog-view-all { margin-top: 40px; }
  .view-all-btn { padding: 12px 24px; font-size: 13px; }

  .seo-content { padding: 40px 18px; margin-top: 60px; }
  .seo-content h2 { font-size: 22px; }

  /* v1.5: 메뉴 박스 5개 모바일 최적화 */
  .menu-boxes-section { padding: 40px 16px !important; }
  .menu-boxes-section h2 { font-size: 22px !important; }
  .menu-boxes-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  .menu-box { padding: 18px 10px !important; }
  .menu-box h3 { font-size: 14px !important; }
  .menu-box p { font-size: 11px !important; }
  .menu-box > div:first-child { font-size: 28px !important; margin-bottom: 8px !important; }

  /* v1.5: 메인 SEO 콘텐츠 모바일 최적화 */
  .main-seo-content { padding: 40px 18px !important; }
  .main-seo-content h2 { font-size: 24px !important; }
  .main-seo-content h3 { font-size: 19px !important; }
  .main-seo-content h4 { font-size: 16px !important; }
  .main-seo-content p { font-size: 15px !important; line-height: 1.85 !important; word-break: keep-all !important; }
  .main-seo-content ul { font-size: 15px !important; }
  .main-seo-content li { word-break: keep-all !important; }

  /* v1.5: 푸터 키워드 모바일 최적화 */
  footer { padding: 40px 16px 30px !important; }
  footer > div > div:first-child { grid-template-columns: 1fr !important; gap: 24px !important; }
  footer h2, footer h3 { font-size: 16px !important; }
}

@media (min-width: 641px) and (max-width: 900px) {
  .case-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }

  /* v1.5: 태블릿 메뉴 박스 */
  .menu-boxes-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .menu-boxes-section { padding: 50px 24px !important; }

  /* v1.5: 태블릿 SEO 콘텐츠 */
  .main-seo-content { padding: 60px 32px !important; }
}

/* v1.5: 작은 모바일 (480px 이하) */
@media (max-width: 480px) {
  .hero-title { font-size: 30px !important; }
  .hero-subtitle { font-size: 14px !important; padding: 0 8px !important; }
  .hero-kicker { font-size: 10px !important; letter-spacing: 0.18em !important; }

  /* 메뉴 박스 1열로 (매우 작은 화면) */
  .menu-boxes-grid { grid-template-columns: 1fr !important; gap: 10px !important; }
  .menu-box { padding: 16px 14px !important; display: flex !important; align-items: center !important; gap: 12px !important; text-align: left !important; }
  .menu-box > div:first-child { font-size: 24px !important; margin-bottom: 0 !important; flex-shrink: 0 !important; }
  .menu-box h3 { margin: 0 !important; }
  .menu-box p { display: none !important; }

  .main-seo-content h2 { font-size: 22px !important; }
  .main-seo-content h3 { font-size: 17px !important; }
  .main-seo-content { padding: 32px 14px !important; }
}

/* ============================================
   v2.10.3: 한글 줄바꿈 전역 최적화
   - keep-all: 단어 중간 절대 안 끊김 ("공개합/니다" 방지)
   - text-wrap balance: 제목이 두 줄일 때 균형 있게 분배 (외톨이 단어 방지)
   ============================================ */
body {
  word-break: keep-all;
  overflow-wrap: break-word;
}
h1, h2, h3, h4,
.hero-title, .hero-subtitle {
  word-break: keep-all;
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}
/* ============================================================
   Smart Vet v1.0 — 동물병원 전용 컴포넌트
   딥 그린(--accent) + 웜 크림(--cream) + 앰버(--amber)
   ============================================================ */

/* ── 법적 고지 바 (전 페이지 상단 상시 노출) ──────────────
   표시광고법 제3조 대응. 축소·숨김 금지. 본문과 동일 가독성 유지. */
.sv-disclosure {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--cream);
  border-bottom: 1px solid #e4dcc9;
  font-size: 13.5px;
  line-height: 1.6;
  color: #5a4a2e;
  word-break: keep-all;
}
.sv-disclosure-dot {
  flex: 0 0 auto;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(201, 118, 31, 0.15);
}
.sv-disclosure-text { flex: 1 1 auto; }
.sv-disclosure-text strong { color: #7a3d10; font-weight: 700; }
.sv-disclosure-link {
  flex: 0 0 auto;
  color: #7a3d10;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .sv-disclosure { padding: 9px 14px; font-size: 12.5px; align-items: flex-start; }
  .sv-disclosure-dot { margin-top: 6px; }
}

/* ── 내비 응급 링크 ───────────────────────────────────── */
.nav-emergency { color: var(--alert) !important; font-weight: 600; }
.nav-emergency:hover { background: var(--alert-soft) !important; }
.dropdown-wide { min-width: 210px; }

/* ── 서비스 페이지 히어로 ─────────────────────────────── */
.sv-hero {
  padding: 64px 24px 52px;
  background: linear-gradient(168deg, var(--cream) 0%, #fbfaf6 62%);
  border-bottom: 1px solid var(--line);
}
.sv-hero-inner { max-width: 780px; margin: 0 auto; text-align: center; }
.sv-kicker {
  font-size: 12px;
  color: var(--accent-light);
  font-weight: 700;
  letter-spacing: 0.16em;
  margin-bottom: 14px;
}
.sv-hero-title {
  font-family: 'Gowun Batang', serif;
  font-size: clamp(27px, 4vw, 40px);
  font-weight: 700;
  color: var(--accent);
  line-height: 1.38;
  margin-bottom: 22px;
  word-break: keep-all;
}
.sv-def {
  max-width: 660px;
  margin: 0 auto 22px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 12px;
  padding: 16px 20px;
  text-align: left;
}
.sv-def p { margin: 0; font-size: 15px; color: var(--ink-soft); line-height: 1.8; word-break: keep-all; }
.sv-def strong { color: var(--accent); }
.sv-hero-desc {
  font-size: 16.5px; color: var(--ink-soft); line-height: 1.85;
  max-width: 620px; margin: 0 auto 26px; word-break: keep-all;
}
.sv-hero-cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.sv-btn {
  display: inline-block; padding: 13px 30px; border-radius: 100px;
  font-weight: 600; font-size: 15px; text-decoration: none; transition: all .18s ease;
}
.sv-btn-primary { background: var(--accent); color: #fff; }
.sv-btn-primary:hover { background: var(--accent-light); transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* ── 본문 ─────────────────────────────────────────────── */
.sv-body { padding: 62px 24px 40px; background: var(--bg-card); }
.sv-body-inner { max-width: 760px; margin: 0 auto; }

.sv-h2 {
  font-family: 'Gowun Batang', serif;
  font-size: clamp(20px, 2.8vw, 26px);
  font-weight: 700; color: var(--accent);
  margin: 46px 0 16px; padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-soft);
  word-break: keep-all; line-height: 1.45;
}
.sv-body-inner > .sv-h2:first-child { margin-top: 0; }
.sv-p { font-size: 16px; color: var(--ink-soft); line-height: 1.95; margin: 0 0 16px; word-break: keep-all; }
.sv-lead {
  font-size: 17px; color: var(--ink); line-height: 1.95;
  margin: 0 0 30px; padding: 20px 22px;
  background: var(--accent-soft); border-radius: var(--radius);
  word-break: keep-all;
}

/* 보호자 시선 인용 (감성 블록) */
.sv-voice {
  position: relative;
  margin: 34px 0; padding: 26px 26px 26px 52px;
  background: var(--cream); border-radius: var(--radius);
  font-family: 'Gowun Batang', serif;
  font-size: 16.5px; color: #4a3f2a; line-height: 1.9;
  word-break: keep-all; border: 0;
}
.sv-voice-mark {
  position: absolute; left: 20px; top: 12px;
  font-size: 40px; color: var(--gold); opacity: .5; line-height: 1;
}

/* 안내 / 주의 박스 */
.sv-note, .sv-warn {
  margin: 24px 0; padding: 18px 20px; border-radius: 12px;
}
.sv-note { background: var(--accent-soft); border-left: 4px solid var(--accent-light); }
.sv-warn { background: var(--alert-soft); border-left: 4px solid var(--alert); }
.sv-note-t { margin: 0 0 7px; font-size: 15px; font-weight: 700; word-break: keep-all; }
.sv-note .sv-note-t { color: var(--accent); }
.sv-warn .sv-note-t { color: var(--alert); }
.sv-note-d { margin: 0 0 6px; font-size: 15px; color: var(--ink-soft); line-height: 1.85; word-break: keep-all; }
.sv-note-d:last-child { margin-bottom: 0; }

/* 관찰 신호 목록 */
.sv-signals { list-style: none; margin: 20px 0; padding: 0; }
.sv-signals li {
  position: relative; padding: 10px 0 10px 28px;
  font-size: 15.5px; color: var(--ink-soft); line-height: 1.8;
  border-bottom: 1px dashed var(--line); word-break: keep-all;
}
.sv-signals li:last-child { border-bottom: 0; }
.sv-signals li::before {
  content: ''; position: absolute; left: 6px; top: 19px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);
}

/* 과정 스텝 */
.sv-steps { list-style: none; margin: 24px 0; padding: 0; counter-reset: none; }
.sv-steps li { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.sv-steps li:last-child { border-bottom: 0; }
.sv-step-n {
  flex: 0 0 30px; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  border-radius: 50%; font-size: 14px; font-weight: 700;
}
.sv-step-t { margin: 3px 0 6px; font-size: 16px; font-weight: 700; color: var(--accent); word-break: keep-all; }
.sv-step-d { margin: 0; font-size: 15px; color: var(--ink-soft); line-height: 1.85; word-break: keep-all; }

/* 카드 그리드 */
.sv-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px; margin: 26px 0;
}
.sv-card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 18px;
  transition: all .18s ease;
}
.sv-card-link { text-decoration: none; display: block; color: inherit; }
.sv-card-link:hover { border-color: var(--accent-light); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.sv-card-i { font-size: 26px; display: block; margin-bottom: 10px; }
.sv-card-t { margin: 0 0 7px; font-size: 15.5px; font-weight: 700; color: var(--accent); word-break: keep-all; }
.sv-card-d { margin: 0; font-size: 14.5px; color: var(--ink-soft); line-height: 1.8; word-break: keep-all; }

/* 표 */
.sv-table-wrap { overflow-x: auto; margin: 24px 0; -webkit-overflow-scrolling: touch; }
.sv-table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 460px; }
.sv-table th {
  background: var(--accent); color: #fff; font-weight: 600;
  padding: 12px 14px; text-align: left; white-space: nowrap;
}
.sv-table td {
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  color: var(--ink-soft); line-height: 1.75; word-break: keep-all; vertical-align: top;
}
.sv-table tbody tr:nth-child(even) { background: #fafbf8; }

/* 미니 문답 (details/summary) */
.sv-miniqa { margin: 22px 0; }
.sv-qa-item {
  border: 1px solid var(--line); border-radius: 12px;
  margin-bottom: 10px; background: var(--bg-card); overflow: hidden;
}
.sv-qa-item summary {
  padding: 15px 44px 15px 18px; cursor: pointer; position: relative;
  font-size: 15.5px; font-weight: 600; color: var(--accent);
  line-height: 1.65; word-break: keep-all; list-style: none;
}
.sv-qa-item summary::-webkit-details-marker { display: none; }
.sv-qa-item summary::after {
  content: '+'; position: absolute; right: 18px; top: 50%;
  transform: translateY(-50%); font-size: 20px; font-weight: 400;
  color: var(--ink-muted); transition: transform .2s ease;
}
.sv-qa-item[open] summary { background: var(--accent-soft); }
.sv-qa-item[open] summary::after { content: '−'; }
.sv-qa-item p {
  margin: 0; padding: 4px 18px 18px; font-size: 15px;
  color: var(--ink-soft); line-height: 1.9; word-break: keep-all;
}

/* ── 사이트맵 페이지 ──────────────────────────────────── */
.sv-sitemap-list { list-style: none; margin: 16px 0 28px; padding: 0; }
.sv-sitemap-list li { border-bottom: 1px solid var(--line-soft); }
.sv-sitemap-list a {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 13px 6px; text-decoration: none; transition: background .15s ease;
}
.sv-sitemap-list a:hover { background: var(--accent-soft); }
.sv-sm-i { flex: 0 0 auto; font-size: 15px; }
.sv-sm-t { font-size: 15.5px; font-weight: 600; color: var(--accent); word-break: keep-all; }
.sv-sm-d { font-size: 13.5px; color: var(--ink-muted); word-break: keep-all; flex: 1 1 240px; }

/* ── 내부링크 허브 ────────────────────────────────────── */
.sv-related { padding: 54px 24px; background: var(--bg); border-top: 1px solid var(--line); }
.sv-casehub { padding: 54px 24px 66px; background: var(--cream); }
.sv-related-inner { max-width: 900px; margin: 0 auto; }
.sv-related-h {
  font-family: 'Gowun Batang', serif; font-size: 21px; font-weight: 700;
  color: var(--accent); margin: 0 0 6px; text-align: center; word-break: keep-all;
}
.sv-casehub-note {
  text-align: center; font-size: 13px; color: var(--ink-muted);
  margin: 0 0 22px; word-break: keep-all;
}
.sv-related-h + .sv-related-grid { margin-top: 22px; }
.sv-related-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px;
}
.sv-related-card {
  display: block; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px; text-decoration: none;
  transition: all .18s ease;
}
.sv-related-card:hover { border-color: var(--accent-light); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.sv-related-i { font-size: 22px; display: block; margin-bottom: 9px; }
.sv-related-t {
  display: block; font-size: 15px; font-weight: 700; color: var(--accent);
  margin-bottom: 5px; line-height: 1.55; word-break: keep-all;
}
.sv-related-d { display: block; font-size: 13.5px; color: var(--ink-muted); line-height: 1.7; word-break: keep-all; }
.sv-hub-more { text-align: center; margin: 22px 0 0; }
.sv-hub-more a { color: var(--accent); text-decoration: none; font-size: 14.5px; font-weight: 600; }
.sv-hub-more a:hover { text-decoration: underline; }

/* ── 반응형 ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .sv-hero { padding: 40px 18px 36px; }
  .sv-body { padding: 42px 18px 30px; }
  .sv-lead { font-size: 16px; padding: 17px 18px; }
  .sv-voice { padding: 22px 20px 22px 44px; font-size: 15.5px; }
  .sv-related, .sv-casehub { padding: 40px 18px; }
  .sv-cards { grid-template-columns: 1fr; }
  .sv-steps li { gap: 12px; }
}

/* 프린트: 고지 바는 인쇄물에도 남깁니다 */
@media print {
  .sv-disclosure { background: #fff !important; border-bottom: 2px solid #000; }
  .sv-related, .sv-casehub { display: none; }
}
