/*
Theme Name: HospiConsult Theme
Theme URI: https://hospiconsult.toothvia.com
Description: Hospital Consulting Information Platform Theme
Author: MediConsult
Version: 1.0
License: Proprietary
Text Domain: hospiconsult
*/

:root {
  --hc-primary: #1a365d;
  --hc-primary-light: #2c5282;
  --hc-accent: #2b6cb0;
  --hc-accent-light: #4299e1;
  --hc-bg: #ffffff;
  --hc-bg-alt: #f7fafc;
  --hc-bg-card: #ffffff;
  --hc-text: #1a202c;
  --hc-text-muted: #718096;
  --hc-text-light: #a0aec0;
  --hc-border: #e2e8f0;
  --hc-border-light: #edf2f7;
  --hc-success: #38a169;
  --hc-warning: #d69e2e;
  --hc-radius: 8px;
  --hc-radius-lg: 12px;
  --hc-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --hc-shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --hc-shadow-lg: 0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.05);
  --hc-font: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --hc-font-serif: 'Noto Serif KR', Georgia, serif;
  --hc-max-w: 1200px;
  --hc-content-w: 780px;
  --hc-gap: 8px;
}

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

html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

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

body {
  font-family: var(--hc-font);
  color: var(--hc-text);
  background: var(--hc-bg);
  line-height: 1.7;
  overflow-x: hidden;
}

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

a { color: var(--hc-accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--hc-primary); }
a:focus-visible { outline: 2px solid var(--hc-accent-light); outline-offset: 2px; border-radius: 2px; }

/* HEADER */
.hc-header {
  background: var(--hc-bg);
  border-bottom: 1px solid var(--hc-border);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.95);
}
.hc-header-inner {
  max-width: var(--hc-max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.hc-logo {
  display: flex; align-items: center; gap: 12px;
  font-weight: 700; font-size: 1.125rem;
  color: var(--hc-primary);
}
.hc-logo img { width: 40px; height: 40px; border-radius: 8px; }
.hc-logo-text { line-height: 1.3; }
.hc-logo-sub { font-size: 0.7rem; font-weight: 400; color: var(--hc-text-muted); letter-spacing: 0.02em; }

.hc-nav { display: flex; gap: 4px; align-items: center; }
.hc-nav a {
  padding: 8px 16px; border-radius: var(--hc-radius);
  font-size: 0.9rem; font-weight: 500;
  color: var(--hc-text); transition: all 0.2s;
}
.hc-nav a:hover { background: var(--hc-bg-alt); color: var(--hc-accent); }

.hc-menu-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
}
.hc-menu-toggle svg { width: 24px; height: 24px; stroke: var(--hc-text); }

@media (max-width: 768px) {
  .hc-nav { display: none; position: fixed; top: 72px; left: 0; right: 0; bottom: 0;
    background: var(--hc-bg); flex-direction: column; padding: 24px; gap: 0; z-index: 99; }
  .hc-nav.open { display: flex; }
  .hc-nav a { padding: 16px; font-size: 1rem; border-bottom: 1px solid var(--hc-border-light); width: 100%; }
  .hc-menu-toggle { display: flex; }
}

/* CONTENT AREA */
.hc-content-wrap {
  max-width: var(--hc-content-w);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* SINGLE POST */
.hc-post-hero { margin-bottom: 40px; }
.hc-post-hero img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
  border-radius: var(--hc-radius-lg);
}
.hc-post-meta {
  display: flex; gap: 16px; align-items: center;
  font-size: 0.85rem; color: var(--hc-text-muted);
  margin-bottom: 16px;
}
.hc-post-cat {
  background: var(--hc-bg-alt); padding: 4px 12px;
  border-radius: 20px; font-weight: 500;
  color: var(--hc-accent); font-size: 0.8rem;
}

.hc-post-title {
  font-family: var(--hc-font);
  font-size: 2rem; font-weight: 800;
  line-height: 1.3; color: var(--hc-primary);
  margin-bottom: 24px;
}

/* POST BODY */
.hc-post-body { font-size: 1.05rem; line-height: 1.8; }
.hc-post-body h2 {
  font-size: 1.5rem; font-weight: 700;
  color: var(--hc-primary); margin: 56px 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--hc-border);
  line-height: 1.4;
}
.hc-post-body h3 {
  font-size: 1.2rem; font-weight: 600;
  color: var(--hc-primary-light); margin: 40px 0 16px;
}
.hc-post-body p { margin-bottom: 20px; }
.hc-post-body ul, .hc-post-body ol { margin: 16px 0 24px 24px; }
.hc-post-body li { margin-bottom: 8px; line-height: 1.7; }
.hc-post-body img {
  border-radius: var(--hc-radius-lg);
  margin: 32px 0;
  box-shadow: var(--hc-shadow);
}
.hc-post-body blockquote {
  border-left: 4px solid var(--hc-accent);
  background: var(--hc-bg-alt);
  padding: 20px 24px;
  margin: 24px 0;
  border-radius: 0 var(--hc-radius) var(--hc-radius) 0;
  font-size: 1rem; color: var(--hc-text);
}
.hc-post-body table {
  width: 100%; border-collapse: collapse;
  margin: 24px 0; font-size: 0.95rem;
  border-radius: var(--hc-radius); overflow: hidden;
  box-shadow: var(--hc-shadow);
}
.hc-post-body table thead th {
  background: var(--hc-primary);
  color: #fff; font-weight: 600;
  padding: 14px 16px; text-align: left;
  font-size: 0.9rem;
}
.hc-post-body table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--hc-border-light);
}
.hc-post-body table tr:nth-child(even) { background: var(--hc-bg-alt); }
.hc-post-body table tr:hover { background: #edf2f7; }
.hc-post-body .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 24px 0; }

/* CALLOUT */
.hc-callout {
  background: linear-gradient(135deg, #ebf4ff 0%, #e6f0ff 100%);
  border-left: 4px solid var(--hc-accent);
  padding: 20px 24px; border-radius: 0 var(--hc-radius) var(--hc-radius) 0;
  margin: 24px 0; font-size: 0.95rem;
}
.hc-callout strong { color: var(--hc-primary); }

/* RELATED POSTS */
.hc-related { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--hc-border); }
.hc-related h3 { font-size: 1.25rem; font-weight: 700; color: var(--hc-primary); margin-bottom: 24px; }
.hc-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.hc-card {
  background: var(--hc-bg-card);
  border-radius: var(--hc-radius-lg);
  overflow: hidden;
  box-shadow: var(--hc-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.hc-card:hover { transform: translateY(-4px); box-shadow: var(--hc-shadow-lg); }
.hc-card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.hc-card-body { padding: 16px; }
.hc-card-title { font-size: 0.95rem; font-weight: 600; color: var(--hc-text); line-height: 1.5; }

/* FOOTER */
.hc-footer {
  background: var(--hc-primary);
  color: rgba(255,255,255,0.8);
  padding: 64px 24px 40px;
}
.hc-footer-inner {
  max-width: var(--hc-max-w);
  margin: 0 auto;
}
.hc-footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.hc-footer-brand { font-size: 1.125rem; font-weight: 700; color: #fff; margin-bottom: 12px; }
.hc-footer-desc { font-size: 0.85rem; line-height: 1.7; color: rgba(255,255,255,0.6); }
.hc-footer h4 { font-size: 0.85rem; font-weight: 600; color: #fff; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.05em; }
.hc-footer a { color: rgba(255,255,255,0.6); font-size: 0.85rem; display: block; padding: 4px 0; transition: color 0.2s; }
.hc-footer a:hover { color: #fff; }
.hc-footer-bottom {
  padding-top: 24px;
  display: flex; justify-content: space-between; align-items: flex-start;
  font-size: 0.8rem; color: rgba(255,255,255,0.4);
  flex-wrap: wrap; gap: 16px;
}
.hc-footer-legal {
  font-size: 0.75rem; color: rgba(255,255,255,0.45);
  line-height: 1.7; max-width: 800px;
}
.hc-footer-legal p { margin: 4px 0; }

@media (max-width: 768px) {
  .hc-footer-top { grid-template-columns: 1fr; gap: 32px; }
  .hc-post-title { font-size: 1.5rem; }
  .hc-post-body h2 { font-size: 1.25rem; }
  .hc-content-wrap { padding: 32px 16px 64px; }
}

/* NOTICE STYLES */
.ai-notice, .legal-notice, .affiliate-notice { max-width: var(--hc-content-w); }
.legal-notice { border-radius: 0 var(--hc-radius) var(--hc-radius) 0 !important; }

/* SCROLL ANIMATIONS */
.hc-fade-in {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.hc-fade-in.visible { opacity: 1; transform: translateY(0); }

/* Remove WordPress defaults */
.wp-block-separator, .wp-block-spacer { display: none; }
