/* ===== 24시 동물병원 야간 응급 알리미 - Core Styles ===== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700;900&family=Noto+Serif+KR:wght@600;700&display=swap');

:root {
  --night: #0d1b2a;
  --night-mid: #1b2d3e;
  --night-soft: #243447;
  --amber: #f59e0b;
  --amber-light: #fcd34d;
  --teal: #0d9488;
  --teal-light: #14b8a6;
  --red-urgent: #dc2626;
  --red-soft: #fee2e2;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-900: #0f172a;
  --font-sans: 'Noto Sans KR', sans-serif;
  --font-serif: 'Noto Serif KR', serif;
  --radius: 12px;
  --radius-sm: 6px;
  --shadow: 0 4px 24px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.18);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.7;
  font-size: 16px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

/* ===== HEADER / NAV ===== */
.site-header {
  background: var(--night);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--amber);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
}
.logo-icon {
  width: 36px; height: 36px;
  background: var(--amber);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.logo span { color: var(--amber); }
.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}
.nav-links a {
  color: var(--gray-200);
  font-size: 0.88rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
  font-weight: 500;
}
.nav-links a:hover { background: var(--night-soft); color: var(--amber); }
.nav-links .urgent {
  background: var(--red-urgent);
  color: white;
  border-radius: var(--radius-sm);
}
.nav-links .urgent:hover { background: #b91c1c; color: white; }
.hamburger { display: none; background: none; border: none; cursor: pointer; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--white); margin: 5px 0; transition: all 0.3s; }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--night) 0%, var(--night-mid) 50%, #0f3c40 100%);
  color: var(--white);
  padding: 72px 20px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -80px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 400px;
  background: radial-gradient(ellipse, rgba(245,158,11,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  background: rgba(245,158,11,0.15);
  border: 1px solid rgba(245,158,11,0.4);
  color: var(--amber-light);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
  letter-spacing: 0.04em;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.3;
  max-width: 760px;
  margin: 0 auto 16px;
}
.hero h1 em { font-style: normal; color: var(--amber); }
.hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.72);
  max-width: 560px;
  margin: 0 auto 36px;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: var(--amber);
  line-height: 1;
}
.stat-label { font-size: 0.8rem; color: rgba(255,255,255,0.6); margin-top: 4px; }

/* ===== REGION QUICK NAV ===== */
.region-nav {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 12px 20px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.region-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  align-items: center;
}
.region-label {
  font-size: 0.78rem;
  color: var(--gray-400);
  font-weight: 600;
  flex-shrink: 0;
  margin-right: 4px;
}
.region-pill {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 0.82rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
  white-space: nowrap;
}
.region-pill:hover, .region-pill.active {
  background: var(--night);
  color: var(--amber);
}

/* ===== MAIN LAYOUT ===== */
.main-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
}
@media (max-width: 900px) {
  .main-wrap { grid-template-columns: 1fr; }
}

/* ===== SECTION TITLES ===== */
.section-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--night);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* ===== HOSPITAL CARDS ===== */
.hospital-list { display: flex; flex-direction: column; gap: 16px; }
.hospital-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
}
.hospital-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.hospital-card.open-24 { border-left: 4px solid var(--teal); }
.hospital-card.emergency { border-left: 4px solid var(--red-urgent); }
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.hospital-name {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--night);
}
.badge-row { display: flex; gap: 6px; flex-wrap: wrap; }
.badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}
.badge-24 { background: rgba(13,148,136,0.12); color: var(--teal); border: 1px solid rgba(13,148,136,0.3); }
.badge-emergency { background: var(--red-soft); color: var(--red-urgent); border: 1px solid rgba(220,38,38,0.2); }
.badge-weekend { background: rgba(245,158,11,0.12); color: #b45309; border: 1px solid rgba(245,158,11,0.3); }
.badge-open { background: rgba(22,163,74,0.1); color: #15803d; border: 1px solid rgba(22,163,74,0.3); }
.hospital-info { font-size: 0.88rem; color: var(--gray-600); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.hospital-info svg { flex-shrink: 0; }
.hospital-hours { font-size: 0.85rem; color: var(--gray-600); margin-bottom: 14px; }
.hours-open { color: #15803d; font-weight: 600; }
.hours-closed { color: var(--red-urgent); font-weight: 600; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}
.btn-map { background: var(--teal); color: white; }
.btn-map:hover { background: var(--teal-light); }
.btn-call { background: var(--amber); color: var(--night); }
.btn-call:hover { background: var(--amber-light); }
.btn-copy { background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-200); }
.btn-copy:hover { background: var(--gray-200); }
.btn-detail { background: var(--night); color: white; }
.btn-detail:hover { background: var(--night-soft); }

/* ===== EMERGENCY ALERT ===== */
.emergency-alert {
  background: linear-gradient(135deg, #7f1d1d, #991b1b);
  color: white;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 28px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.alert-icon { font-size: 2rem; flex-shrink: 0; }
.alert-title { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.alert-body { font-size: 0.87rem; opacity: 0.88; line-height: 1.6; }

/* ===== SIDEBAR ===== */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.sidebar-card-head {
  background: var(--night);
  color: var(--white);
  padding: 14px 18px;
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-card-body { padding: 16px 18px; }
.region-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.region-btn {
  text-align: center;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 0.78rem;
  font-weight: 500;
  transition: all 0.2s;
  display: block;
}
.region-btn:hover { background: var(--night); color: var(--amber); }
.tip-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.tip-list li {
  padding: 10px 12px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  color: var(--gray-700);
  border-left: 3px solid var(--amber);
  line-height: 1.5;
}
.tip-list li strong { color: var(--night); display: block; margin-bottom: 2px; }

/* ===== INFO SECTIONS ===== */
.info-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 36px;
  margin-top: 40px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
}
.info-section h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--night);
  margin-bottom: 16px;
}
.info-section p { font-size: 0.93rem; color: var(--gray-700); margin-bottom: 12px; line-height: 1.8; }
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.info-card {
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 16px;
  border: 1px solid var(--gray-200);
}
.info-card h3 { font-size: 0.9rem; font-weight: 700; color: var(--night); margin-bottom: 6px; }
.info-card p { font-size: 0.83rem; color: var(--gray-600); margin: 0; }

/* ===== FAQ ===== */
.faq-item {
  border-bottom: 1px solid var(--gray-200);
  padding: 18px 0;
}
.faq-item:last-child { border-bottom: none; }
.faq-q {
  font-weight: 700;
  color: var(--night);
  margin-bottom: 8px;
  font-size: 0.95rem;
  display: flex;
  gap: 10px;
}
.faq-q::before { content: 'Q.'; color: var(--teal); flex-shrink: 0; }
.faq-a { font-size: 0.88rem; color: var(--gray-700); line-height: 1.7; padding-left: 24px; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--night);
  color: rgba(255,255,255,0.7);
  margin-top: 60px;
  padding: 48px 20px 28px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  margin-bottom: 40px;
}
.footer-col h4 {
  color: var(--amber);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.footer-col ul li a { font-size: 0.82rem; color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--amber); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy { font-size: 0.78rem; }
.footer-logo { font-family: var(--font-serif); color: var(--amber); font-weight: 700; font-size: 0.9rem; }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  font-size: 0.82rem;
  color: var(--gray-400);
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--teal); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--gray-400); }

/* ===== TOAST ===== */
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--night);
  color: white;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 0.87rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s;
  z-index: 9999;
  white-space: nowrap;
}
#toast.show { transform: translateX(-50%) translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--night); padding: 12px 20px; }
  .hamburger { display: block; }
  .hero { padding: 48px 20px 40px; }
  .hero-stats { gap: 20px; }
  .main-wrap { padding: 24px 16px; gap: 24px; }
  .info-section { padding: 24px 20px; }
  .hospital-card { padding: 16px 18px; }
  .card-actions { gap: 6px; }
  .btn { padding: 7px 12px; font-size: 0.8rem; }
}

/* ===== PAGE-SPECIFIC ===== */
.page-hero {
  background: linear-gradient(135deg, var(--night) 0%, var(--night-mid) 60%, #1a3a3a 100%);
  color: white;
  padding: 48px 20px 40px;
  text-align: center;
}
.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 12px;
}
.page-hero h1 em { font-style: normal; color: var(--amber); }
.page-hero p { color: rgba(255,255,255,0.72); font-size: 0.95rem; max-width: 600px; margin: 0 auto; }

.sub-region-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.sub-region-pill {
  padding: 6px 14px;
  background: var(--gray-100);
  color: var(--gray-700);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--gray-200);
  transition: all 0.2s;
}
.sub-region-pill:hover, .sub-region-pill.active { background: var(--teal); color: white; border-color: var(--teal); }
