/* Detail-page chrome (clinic + vet pages). */

[lang^="zh"] body, [data-lang="zh"] body {
  font-family: 'Noto Sans TC', 'Inter', -apple-system, system-ui, sans-serif;
}

.detail-page { background: var(--milk); min-height: 100vh; }
.detail-main { max-width: 880px; margin: 0 auto; padding: 24px 20px 60px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px;
  background: linear-gradient(135deg, #8aab78 0%, #6b8e60 55%, #4f6e44 100%);
  color: #fff;
  box-shadow: var(--shadow);
  position: sticky; top: 0; z-index: 20;
}
.topnav-cta {
  background: #25d366 !important; color: #fff !important;
  padding: 7px 14px !important;
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600;
  border-radius: 999px;
  font-size: 13px;
}
.topnav-cta:hover { background: #1da856 !important; }
.home-page .topbar { box-shadow: none; }

.hamburger {
  display: none;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.28);
  width: 42px; height: 42px;
  border-radius: 12px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}
.hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .18s, opacity .18s;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: 64px; right: 14px; left: 14px;
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  gap: 4px;
  z-index: 30;
  border: 1px solid var(--line);
  animation: menu-pop .15s ease-out;
}
.mobile-menu[hidden] { display: none; }
@keyframes menu-pop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.mobile-menu a, .mobile-menu button {
  display: block;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 16px;
  border-radius: 10px;
  text-align: left;
  border: 0;
  background: transparent;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
}
.mobile-menu a:hover, .mobile-menu button:hover { background: var(--milk); }
.mobile-menu .mobile-menu-cta { background: #25d366; color: #fff; font-weight: 600; }
.mobile-menu .mobile-menu-cta:hover { background: #1da856; }
.mobile-menu .mobile-lang {
  border-top: 1px solid var(--line);
  margin-top: 4px; padding-top: 14px;
  color: var(--ink-soft);
}

@media (max-width: 860px) {
  .brand-text em { display: none; }
  .topnav { gap: 8px; }
  .topnav-cta { padding: 6px 10px !important; font-size: 12px; }
}
@media (max-width: 720px) {
  .topnav { display: none; }
  .hamburger { display: flex; }
  .topbar { align-items: flex-start; padding: 10px 14px; }
  .brand { flex-wrap: wrap; column-gap: 10px; row-gap: 2px; }
  .brand-mark { width: 36px; height: 36px; font-size: 20px; }
  .brand-text { flex: 1 1 100%; }
  .brand-text strong {
    font-size: 16px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .brand-text em { display: block; font-size: 12px; line-height: 1.3; }
  .hamburger { width: 36px; height: 36px; gap: 4px; }
  .hamburger span { width: 18px; }
}
@media (max-width: 600px) {
  .brand-text strong { font-size: 15px; }
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none;
  min-width: 0; flex: 1 1 auto;
}
.brand-mark {
  background: #fff; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-size: 22px; transform: rotate(-12deg);
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong {
  font-family: 'Fraunces', serif; font-size: 17px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-text em { font-style: normal; font-size: 12px; opacity: .9; }
.topnav { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.topnav a {
  color: #fff; text-decoration: none; font-weight: 500; font-size: 14px;
  padding: 6px 12px; border-radius: 999px;
}
.topnav a:hover { background: rgba(255,255,255,0.15); }
#langToggle {
  background: rgba(255,255,255,0.18);
  border: 0; color: #fff; padding: 7px 14px;
  border-radius: 999px; font-weight: 600; font-size: 13px;
  cursor: pointer; transition: background .12s;
}
#langToggle:hover { background: rgba(255,255,255,0.3); }

.back {
  display: inline-block; color: var(--paw-dark);
  text-decoration: none; margin-bottom: 14px; font-size: 14px;
}
.back:hover { color: var(--ink); }

.clinic-header h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 4vw, 38px);
  margin: 6px 0 6px;
  line-height: 1.1;
}
.clinic-zh { color: var(--ink-soft); margin: 0 0 14px; font-size: 17px; }
.clinic-desc {
  margin: 14px 0 0;
  font-size: 15px; line-height: 1.55;
  color: var(--ink); max-width: 760px;
  padding: 14px 16px;
  background: rgba(122, 155, 106, 0.08);
  border-left: 3px solid var(--paw-soft);
  border-radius: 0 10px 10px 0;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; align-items: center; }
.tag-row + .tag-row { margin-top: 4px; }
.tag-row .tag-label {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-soft); margin-right: 4px; min-width: 64px;
}

.specialist-card {
  background: linear-gradient(135deg, #fff8e8 0%, #fff 100%);
  border: 1px solid #f0d8a3 !important;
}
.specialist-card .section { color: #8a4a14; }
.specialist-list {
  list-style: none; padding: 0; margin: 8px 0 12px;
  display: grid; gap: 8px;
}
.specialist-list li {
  background: #fff; border: 1px solid #f0d8a3;
  padding: 10px 14px; border-radius: 10px;
  font-size: 14px; line-height: 1.45;
}
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--c, var(--paw)) 18%, white);
  color: color-mix(in srgb, var(--c, var(--paw)) 65%, black);
  font-size: 13px; font-weight: 500;
}
.tag .dot { width: 9px; height: 9px; border-radius: 50%; }
.badge-afcd {
  display: inline-block;
  background: #d2f3da; color: #1f6b30;
  padding: 4px 12px; border-radius: 999px; font-size: 12px;
  font-weight: 600; margin: 4px 0 0;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
  margin: 14px 0;
  box-shadow: var(--shadow);
}
.section {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 18px; margin: 0 0 14px;
  display: flex; align-items: center; gap: 8px;
}
.section .count {
  background: var(--tag-bg); color: var(--tag-ink);
  font-family: 'Inter', sans-serif; font-size: 13px;
  padding: 2px 9px; border-radius: 999px; font-weight: 600;
}

.contact-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.contact-row:last-child { border-bottom: 0; }
.contact-row .ic { font-size: 18px; line-height: 1.3; flex-shrink: 0; }
.contact-row .phone {
  font-weight: 600; color: var(--paw-dark);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.contact-row .phone:hover { text-decoration: underline; }
.contact-row .zh { color: var(--ink-soft); font-size: 14px; }
.contact-row small { display: block; margin-top: 2px; }

.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.btn {
  background: #fff; color: var(--ink);
  border: 1px solid var(--line);
  text-decoration: none;
  padding: 9px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  transition: transform .12s, background .12s, color .12s;
}
.btn:hover { transform: translateY(-1px); background: var(--milk); }
.btn.primary { background: var(--paw); color: #fff; border-color: var(--paw); }
.btn.primary:hover { background: var(--paw-dark); border-color: var(--paw-dark); }

.map-card { padding: 0; overflow: hidden; }
#clinicMap, .map-fallback {
  width: 100%; height: 320px;
  background: linear-gradient(135deg, #e8e0cc 0%, #c8d8b8 100%);
}
.map-fallback {
  display: grid; place-items: center; text-align: center; padding: 20px;
}
.map-fallback p { margin: 0 0 6px; }

.vet-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .vet-list { grid-template-columns: 1fr; } }
.vet-card {
  display: block;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  text-decoration: none; color: inherit;
  background: #fff;
  transition: border-color .12s, transform .12s, box-shadow .12s;
}
.vet-card:hover {
  border-color: var(--paw);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.vet-name { font-weight: 600; font-size: 15px; }
.vet-name .zh { color: var(--ink-soft); font-weight: 500; font-size: 13px; margin-left: 6px; }
.vet-meta { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.vet-reg {
  position: absolute; top: 12px; right: 14px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 11px; color: var(--ink-soft);
  background: var(--tag-bg);
  padding: 2px 8px; border-radius: 6px;
}

.empty-note { color: var(--ink-soft); font-size: 14px; margin: 0; }

.kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 18px;
  margin: 0;
}
.kv dt { color: var(--ink-soft); font-size: 13px; padding-top: 2px; }
.kv dd { margin: 0; font-size: 14px; }
.muted { color: var(--ink-soft); }
.muted.small { font-size: 12px; margin-top: 14px; }

.clinic-link-card {
  display: block; position: relative;
  text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 50px 16px 18px;
  transition: border-color .12s, transform .12s, box-shadow .12s;
}
.clinic-link-card:hover {
  border-color: var(--paw); transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.clinic-link-name { font-weight: 600; font-size: 16px; }
.clinic-link-name .zh { color: var(--ink-soft); margin-left: 8px; font-weight: 500; font-size: 14px; }
.clinic-link-addr { color: var(--ink-soft); font-size: 13px; margin: 4px 0; }
.clinic-link-phone { color: var(--paw-dark); font-size: 13px; font-weight: 500; }
.clinic-link-arrow {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-size: 22px; color: var(--paw);
}

.site-footer {
  text-align: center; padding: 30px 20px 40px;
  font-size: 12px; color: var(--ink-soft);
}

.about-detail .src-list {
  list-style: none; padding: 0; margin: 0;
}
.about-detail .src-list li {
  border-left: 3px solid var(--paw-soft);
  padding: 6px 0 6px 14px;
  margin-bottom: 14px;
}
.about-detail .src-list li:last-child { margin-bottom: 0; }
.about-detail .src-list strong {
  font-family: 'Fraunces', serif; font-size: 16px;
}
.about-detail .src-list p { margin: 4px 0 0; font-size: 14px; line-height: 1.55; }
.about-detail .api-block {
  background: var(--milk);
  padding: 12px 16px; border-radius: 8px;
  font-family: ui-monospace, monospace; font-size: 13px;
  overflow-x: auto;
  margin: 12px 0;
}
.about-detail .cta-only { text-align: center; }
.about-detail .cta-only .btn { display: inline-flex; align-items: center; gap: 6px; }
.footer-meta { margin: 18px 0 0; }

.cta-banner {
  margin: 22px auto 0;
  max-width: 880px;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #fff;
  border-radius: 16px;
  padding: 18px 22px;
  display: flex; align-items: center; gap: 18px;
  box-shadow: 0 8px 24px rgba(18, 140, 126, 0.25);
}
.cta-banner .cta-text { flex: 1; min-width: 0; line-height: 1.4; text-align: left; color: #fff; font-size: 14px; }
.cta-banner .cta-text strong {
  display: block; font-family: 'Fraunces', serif; font-size: 17px;
  font-weight: 700; margin-bottom: 2px; color: #fff;
}
.cta-banner .cta-btn {
  background: #fff; color: #128c7e;
  padding: 11px 18px; border-radius: 999px;
  font-weight: 700; font-size: 14px;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
  transition: transform .12s, box-shadow .12s;
}
.cta-banner .cta-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,0.18); }
.home-cta { margin: 18px 0 14px; }
@media (max-width: 600px) {
  .cta-banner { flex-direction: column; align-items: stretch; padding: 16px; }
  .cta-banner .cta-text { text-align: center; }
  .cta-banner .cta-btn { justify-content: center; }
}
