/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

@font-face {
  font-family: 'NewGulim';
  src: url('a뉴굴림1.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'NewGulim';
  src: url('a뉴굴림2.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'NewGulim';
  src: url('a뉴굴림3.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'NewGulim';
  src: url('a뉴굴림4.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #0e0e0e;
  --bg-card: #1a1a1a;
  --bg-card-hover: #222;
  --text: #e8e0d4;
  --text-muted: #9a9084;
  --accent: #c8a96e;
  --accent-light: #dfc18f;
  --border: #2a2a2a;
  --font-serif: 'Noto Serif KR', 'NewGulim', serif;
  --font-body: 'NewGulim', 'Noto Serif KR', serif;
  --max-w: 1100px;
  --nav-h: 64px;
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-light); }
img { max-width: 100%; height: auto; display: block; border-radius: 6px; }

/* ===== Navigation ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(14,14,14,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.nav.scrolled {
  background: rgba(14,14,14,.95);
  border-bottom-color: var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: 'NewGulim', var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.nav-logo span {
  font-family: 'NewGulim', var(--font-serif);
  font-weight: 400;
  font-size: .8rem;
  color: var(--text-muted);
  margin-left: 8px;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 28px;
}
.nav-links a {
  color: var(--text-muted);
  font-size: .85rem;
  letter-spacing: .02em;
  padding: 4px 0;
  position: relative;
  transition: color .2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width .3s;
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-mobile-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 28px; height: 20px;
  position: relative;
}
.nav-mobile-toggle span {
  display: block;
  width: 100%; height: 1.5px;
  background: var(--text);
  position: absolute; left: 0;
  transition: .3s;
}
.nav-mobile-toggle span:nth-child(1) { top: 0; }
.nav-mobile-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-mobile-toggle span:nth-child(3) { bottom: 0; }

/* ===== Breadcrumb ===== */
.breadcrumb {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 12px 24px;
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  gap: 8px;
  font-size: .8rem;
  color: var(--text-muted);
}
.breadcrumb li + li::before {
  content: '>';
  margin-right: 8px;
  color: var(--text-muted);
  opacity: .5;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }

/* ===== Hero (Main Page) ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: url('메인사진.png') center top/cover no-repeat;
  filter: brightness(.45);
}
.hero-vignette {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(14,14,14,.7) 70%, var(--bg) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  padding: 0 24px 80px;
}
.hero-clinic-name {
  font-size: .85rem;
  color: var(--text-muted);
  letter-spacing: .15em;
  margin-bottom: 16px;
}
.hero-subtitle-top {
  font-size: .95rem;
  color: var(--accent);
  letter-spacing: .1em;
  margin-bottom: 12px;
}
.hero-title {
  font-family: 'NewGulim', var(--font-serif);
  font-size: 3.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero-divider {
  width: 40px; height: 1px;
  background: var(--accent);
  margin: 0 auto 20px;
}
.hero-tagline {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
}
.hero-scroll {
  position: absolute;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.hero-scroll span {
  display: block;
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollDown 2s infinite;
}
@keyframes scrollDown {
  0% { opacity: 1; transform: scaleY(1); }
  100% { opacity: 0; transform: scaleY(.3) translateY(16px); }
}

/* ===== Page Hero (Sub Pages) ===== */
.page-hero {
  padding: calc(var(--nav-h) + 48px) 24px 48px;
  text-align: center;
  background: linear-gradient(180deg, #151515 0%, var(--bg) 100%);
}
.page-hero .section-label {
  font-size: .8rem;
  color: var(--accent);
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.page-hero h1 {
  font-family: 'NewGulim', var(--font-serif);
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.page-hero .page-desc {
  font-size: .95rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.9;
}

/* ===== Section Common ===== */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px 24px;
}
.section-label {
  font-size: .75rem;
  color: var(--accent);
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.section-title {
  font-family: 'NewGulim', var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.section-desc {
  font-size: .95rem;
  color: var(--text-muted);
  line-height: 1.9;
  max-width: 720px;
}

/* ===== Content Blocks ===== */
.content-block {
  margin-bottom: 60px;
}
.content-block h2 {
  font-family: 'NewGulim', var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}
.content-block h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--accent);
}
.content-block p {
  font-size: .92rem;
  color: var(--text-muted);
  line-height: 1.9;
  margin-bottom: 16px;
}
.content-block ul {
  list-style: none;
  padding: 0;
}
.content-block li {
  font-size: .9rem;
  color: var(--text-muted);
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.content-block li::before {
  content: '';
  position: absolute;
  left: 0; top: 16px;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* ===== Two Column Layout ===== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin: 48px 0;
}
.two-col img {
  width: 100%;
  border-radius: 8px;
}

/* ===== Cards Grid ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin: 32px 0;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 24px;
  transition: background .2s, border-color .2s;
}
.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
}
.card h3 {
  font-family: 'NewGulim', var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}
.card p {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.7;
  word-break: keep-all;
}

/* ===== Treatment Cards (Main Page) ===== */
.treatment-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 32px 0;
}
.treatment-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  z-index: 1;
  transition: transform .2s, border-color .2s;
}
.treatment-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  z-index: 2;
}
.treatment-card a {
  display: block;
  color: inherit;
  text-decoration: none;
}
.treatment-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 0;
}
.treatment-card-body {
  padding: 20px;
  overflow: hidden;
}
.treatment-card h3 {
  font-family: 'NewGulim', var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.treatment-card p {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===== Info Table ===== */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}
.info-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
  color: var(--text-muted);
  vertical-align: top;
}
.info-table td:first-child {
  width: 100px;
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}
.info-table .closed { color: #c0392b; }
.info-table .lunch { font-size: .8rem; opacity: .7; }

/* ===== CTA Button ===== */
.cta-btn {
  display: inline-block;
  padding: 14px 36px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  font-size: .9rem;
  border-radius: 6px;
  transition: background .2s;
  margin-top: 20px;
}
.cta-btn:hover {
  background: var(--accent-light);
  color: var(--bg);
}

/* ===== Blog Board ===== */
.blog-board { margin: 32px 0; }
.blog-board-header {
  display: grid;
  grid-template-columns: 48px 64px 1fr 80px;
  padding: 10px 12px;
  border-bottom: 2px solid var(--border);
  font-size: .75rem;
  color: var(--text-muted);
  letter-spacing: .05em;
}
.blog-row {
  display: grid;
  grid-template-columns: 48px 64px 1fr 80px;
  padding: 12px 12px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  font-size: .88rem;
  transition: background .15s;
}
.blog-row:hover { background: var(--bg-card); }
.blog-row-num {
  color: var(--text-muted);
  font-size: .8rem;
}
.blog-row-cat-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: .7rem;
  font-weight: 600;
}
.blog-row-cat-tag.medical { background: rgba(200,169,110,.15); color: var(--accent); }
.blog-row-cat-tag.personal { background: rgba(154,144,132,.1); color: var(--text-muted); }
.blog-row-date {
  color: var(--text-muted);
  font-size: .8rem;
  text-align: right;
}
.blog-more {
  display: inline-block;
  padding: 12px 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: .85rem;
  transition: border-color .2s, color .2s;
  margin-top: 24px;
}
.blog-more:hover { border-color: var(--accent); color: var(--accent); }
.blog-loading {
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: .85rem;
}

/* ===== Map / Location ===== */
.location-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin: 32px 0;
}
.location-detail {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  font-size: .9rem;
}
.location-detail-label {
  color: var(--text);
  font-weight: 600;
  min-width: 48px;
}
.location-detail-value { color: var(--text-muted); }
.map-fallback {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 40px 24px;
  text-align: center;
}
.map-fallback p {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 16px;
  line-height: 1.7;
}

/* ===== Philosophy Section ===== */
.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: center;
  margin: 48px 0;
}
.philosophy-photo img {
  width: 100%;
  border-radius: 8px;
}
.philosophy-text p {
  font-size: .92rem;
  color: var(--text-muted);
  line-height: 2;
  margin-bottom: 16px;
}

/* ===== Studio Section ===== */
.studio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin: 32px 0;
}
.studio-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
}
.studio-item h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}
.studio-item p {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 24px;
  text-align: center;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.footer-name {
  font-family: 'NewGulim', var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.footer-clinic {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 16px;
}
.footer-links a {
  color: var(--text-muted);
  font-size: .82rem;
}
.footer-links a:hover { color: var(--accent); }
.footer-copy {
  font-size: .75rem;
  color: var(--text-muted);
  opacity: .6;
}

/* ===== Reveal Animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(14,14,14,.97);
    flex-direction: column;
    padding: 16px 24px 24px;
    gap: 0;
    display: none;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links li { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .nav-mobile-toggle { display: block; }

  .hero-title { font-size: 2.2rem; }
  .page-hero h1 { font-size: 1.8rem; }
  .section-title { font-size: 1.4rem; }
  .section { padding: 48px 20px; }

  .two-col,
  .philosophy-grid,
  .location-grid,
  .studio-grid { grid-template-columns: 1fr; gap: 24px; }

  .treatment-grid { grid-template-columns: 1fr 1fr; }

  .blog-board-header,
  .blog-row { grid-template-columns: 48px 1fr 72px; }
  .blog-row-cat,
  .blog-board-header .col-cat { display: none; }

  .breadcrumb { padding: 8px 20px; }
}
@media (max-width: 480px) {
  .hero-title { font-size: 1.8rem; }
  .treatment-card img { height: 140px; }
}
