/*
Theme Name: Hospital Guide
Template: twentytwentyfive
Description: Premium hospital homepage guide theme
Version: 1.0
*/
:root {
  --hg-deep-blue: #1B4F8A;
  --hg-navy: #14365C;
  --hg-mint: #3EC6B0;
  --hg-amber: #E8A13A;
  --hg-white: #FFFFFF;
  --hg-off-white: #F8FAFB;
  --hg-light-gray: #EEF2F6;
  --hg-text: #1E293B;
  --hg-text-secondary: #64748B;
  --hg-border: #E2E8F0;
  --hg-radius: 12px;
  --hg-radius-sm: 8px;
  --hg-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  --hg-shadow-lg: 0 4px 16px rgba(0,0,0,0.08), 0 12px 32px rgba(0,0,0,0.06);
  --hg-transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --hg-max-width: 780px;
  --hg-wide-width: 1200px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', sans-serif;
  color: var(--hg-text);
  line-height: 1.75;
  background: var(--hg-white);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* HIDE default WP theme chrome */
.wp-site-blocks > header, .wp-site-blocks > footer,
body > .wp-site-blocks > .has-global-padding { display: none !important; }

/* ===== HEADER ===== */
.hg-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hg-border);
  padding: 0 24px;
}
.hg-header-inner {
  max-width: var(--hg-wide-width);
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.hg-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.hg-logo-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: linear-gradient(135deg, var(--hg-deep-blue), var(--hg-mint));
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 800; font-size: 16px;
}
.hg-logo-text { font-weight: 700; font-size: 17px; color: var(--hg-navy); letter-spacing: -0.02em; }

.hg-nav { display: flex; gap: 4px; }
.hg-nav a {
  padding: 8px 14px; border-radius: var(--hg-radius-sm);
  color: var(--hg-text-secondary); font-size: 14px; font-weight: 500;
  text-decoration: none; transition: all var(--hg-transition);
}
.hg-nav a:hover { color: var(--hg-deep-blue); background: var(--hg-light-gray); }

.hg-mobile-toggle { display: none; background: none; border: none; padding: 8px; cursor: pointer; }
.hg-mobile-toggle svg { width: 24px; height: 24px; color: var(--hg-text); }

@media (max-width: 768px) {
  .hg-nav { display: none; position: fixed; top: 64px; left: 0; right: 0; background: white; flex-direction: column; padding: 16px; box-shadow: var(--hg-shadow-lg); border-bottom: 1px solid var(--hg-border); }
  .hg-nav.open { display: flex; }
  .hg-nav a { padding: 12px 16px; font-size: 16px; }
  .hg-mobile-toggle { display: block; }
}

/* ===== SINGLE POST STYLES ===== */
.hg-single-wrap {
  max-width: var(--hg-max-width);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.hg-single-wrap .entry-title,
.hg-single-wrap h1 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  color: var(--hg-navy);
  line-height: 1.3;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
}

.hg-single-wrap .entry-content h2 {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 700;
  color: var(--hg-deep-blue);
  margin: 56px 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--hg-mint);
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.hg-single-wrap .entry-content h3 {
  font-size: clamp(17px, 2.5vw, 21px);
  font-weight: 600;
  color: var(--hg-navy);
  margin: 40px 0 16px;
}

.hg-single-wrap .entry-content p {
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--hg-text);
  margin-bottom: 20px;
}

.hg-single-wrap .entry-content ul,
.hg-single-wrap .entry-content ol {
  padding-left: 24px;
  margin-bottom: 24px;
}

.hg-single-wrap .entry-content li {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 8px;
}

.hg-single-wrap .entry-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--hg-radius);
  overflow: hidden;
  margin: 28px 0;
  font-size: 14.5px;
  box-shadow: var(--hg-shadow);
  border: 1px solid var(--hg-border);
}

.hg-single-wrap .entry-content table thead th {
  background: var(--hg-deep-blue);
  color: white;
  padding: 14px 16px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.hg-single-wrap .entry-content table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--hg-border);
  vertical-align: top;
}

.hg-single-wrap .entry-content table tbody tr:nth-child(even) { background: var(--hg-off-white); }
.hg-single-wrap .entry-content table tbody tr:last-child td { border-bottom: none; }
.hg-single-wrap .entry-content table tbody tr:hover { background: #F0F7FF; }

@media (max-width: 640px) {
  .hg-single-wrap .entry-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

.hg-single-wrap .entry-content blockquote {
  border-left: 4px solid var(--hg-mint);
  background: linear-gradient(135deg, #F0FDF9, #F8FAFB);
  padding: 20px 24px;
  margin: 28px 0;
  border-radius: 0 var(--hg-radius) var(--hg-radius) 0;
  font-size: 15.5px;
  color: var(--hg-navy);
}

.hg-single-wrap .entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--hg-radius);
  margin: 24px 0;
}

.hg-single-wrap .entry-content .wp-block-image { margin: 32px 0; }

/* Callout boxes */
.hg-callout {
  padding: 20px 24px;
  border-radius: var(--hg-radius);
  margin: 28px 0;
  font-size: 15px;
  line-height: 1.7;
}
.hg-callout-info {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1E40AF;
}
.hg-callout-warning {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #92400E;
}
.hg-callout-tip {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #166534;
}

/* Chart styles */
.hg-bar-chart { margin: 24px 0; }
.hg-bar-item {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 10px; font-size: 14px;
}
.hg-bar-label { min-width: 80px; text-align: right; font-weight: 500; color: var(--hg-text-secondary); }
.hg-bar-track { flex: 1; height: 28px; background: var(--hg-light-gray); border-radius: 6px; overflow: hidden; }
.hg-bar-fill { height: 100%; border-radius: 6px; display: flex; align-items: center; padding: 0 10px; color: white; font-size: 12px; font-weight: 600; }
.hg-bar-fill-blue { background: linear-gradient(90deg, var(--hg-deep-blue), #2B6CB0); }
.hg-bar-fill-mint { background: linear-gradient(90deg, var(--hg-mint), #2DD4BF); }

/* Legal/AI notices */
.legal-notice { font-size: 0.85em !important; }
.ai-notice { font-size: 0.85em !important; }

/* ===== FOOTER ===== */
.hg-footer {
  background: var(--hg-navy);
  color: rgba(255,255,255,0.7);
  padding: 56px 24px 32px;
  font-size: 13.5px;
  line-height: 1.7;
}
.hg-footer-inner {
  max-width: var(--hg-wide-width);
  margin: 0 auto;
}
.hg-footer-brand { color: white; font-weight: 700; font-size: 16px; margin-bottom: 12px; }
.hg-footer-links { display: flex; gap: 20px; margin: 16px 0; flex-wrap: wrap; }
.hg-footer-links a { color: rgba(255,255,255,0.6); text-decoration: none; font-size: 13px; transition: color var(--hg-transition); }
.hg-footer-links a:hover { color: var(--hg-mint); }
.hg-footer-legal {
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 12px; color: rgba(255,255,255,0.4);
  line-height: 1.8;
}

/* ===== RELATED POSTS CARDS ===== */
.hg-related { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--hg-border); }
.hg-related-title { font-size: 20px; font-weight: 700; color: var(--hg-navy); margin-bottom: 24px; }
.hg-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.hg-related-card {
  border-radius: var(--hg-radius);
  overflow: hidden;
  box-shadow: var(--hg-shadow);
  transition: transform var(--hg-transition), box-shadow var(--hg-transition);
  text-decoration: none;
  background: white;
}
.hg-related-card:hover { transform: translateY(-3px); box-shadow: var(--hg-shadow-lg); }
.hg-related-card img { width: 100%; height: 140px; object-fit: cover; }
.hg-related-card-body { padding: 16px; }
.hg-related-card-body h4 { font-size: 15px; font-weight: 600; color: var(--hg-navy); margin: 0; line-height: 1.4; }

/* Scroll animation */
.hg-fade-up { opacity: 0; transform: translateY(24px); transition: opacity 0.5s ease, transform 0.5s ease; }
.hg-fade-up.visible { opacity: 1; transform: translateY(0); }

/* ===== TOC in-post ===== */
.hg-toc {
  background: var(--hg-off-white);
  border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius);
  padding: 20px 24px;
  margin-bottom: 36px;
}
.hg-toc-title { font-size: 15px; font-weight: 700; color: var(--hg-navy); margin-bottom: 12px; }
.hg-toc a { display: block; padding: 6px 0; color: var(--hg-text-secondary); text-decoration: none; font-size: 14px; border-bottom: 1px solid transparent; transition: all var(--hg-transition); }
.hg-toc a:hover { color: var(--hg-deep-blue); padding-left: 8px; }

