/* ═══════════════════════════════════════════
   오상신경외과 — 메인 스타일시트
   ═══════════════════════════════════════════ */

/* ─── 콘텐츠 보호 (커서·드래그·우클릭 차단) ─── */
body:not(.admin-page) {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: default;
}
body:not(.admin-page) img {
  -webkit-user-drag: none;
  pointer-events: none;
}
/* input/textarea/button은 정상 작동 유지 */
body:not(.admin-page) input,
body:not(.admin-page) textarea,
body:not(.admin-page) select,
body:not(.admin-page) button,
body:not(.admin-page) a {
  -webkit-user-select: auto;
  user-select: auto;
  cursor: pointer;
}
body:not(.admin-page) a { cursor: pointer; }

/* ─── 리셋 & 기본 ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
/* 배경 로고는 홈에서만 — body.home-page::before 로 제한 */
body.home-page::before {
  content: '';
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 700px; height: 700px;
  background: url('/assets/images/symbol.png') no-repeat center / contain;
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ─── 레이아웃 ─── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--container-padding);
}
.container--narrow { max-width: var(--max-width-narrow); }
.section { padding: var(--section-padding); }
.section--dark { background: var(--color-bg-dark); color: #fff; }
.section--gray { background: var(--color-bg-section); }

/* ─── 네비게이션 ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);
  transition: background var(--transition), box-shadow var(--transition), backdrop-filter var(--transition);
}
.nav.scrolled {
  background: rgba(255,255,255,0.98);
  backdrop-filter: none;
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 72px;
}
.nav-logo { display: flex; align-items: center; }
.nav-logo__img {
  height: 36px; width: auto;
  display: none;
}
.nav-logo__img--white {
  height: 36px; width: auto;
  display: block;
  filter: brightness(0) invert(1);
}
.nav.scrolled .nav-logo__img { display: block; }
.nav.scrolled .nav-logo__img--white { display: none; }

.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-links > li { position: relative; }
.nav-links > li > a {
  display: block; padding: 8px 16px;
  font-size: 15px; font-weight: 500; color: rgba(255,255,255,0.9);
  transition: color var(--transition);
  white-space: nowrap;
}
.nav.scrolled .nav-links > li > a { color: var(--color-text); }
.nav-links > li > a:hover { color: #fff; }
.nav.scrolled .nav-links > li > a:hover { color: #000; }

/* 드롭다운 */
.nav-dropdown {
  position: absolute; top: 100%; left: 0;
  background: #fff; border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg); min-width: 200px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all var(--transition);
}
.nav-links > li:hover .nav-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-dropdown a {
  display: block; padding: 12px 20px;
  font-size: 14px; color: var(--color-text);
  transition: background var(--transition);
}
.nav-dropdown a:hover { background: var(--color-bg-section); }

/* 햄버거 */
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  width: 28px; padding: 4px 0;
}
.nav-hamburger span {
  display: block; height: 2px; background: #fff;
  transition: all var(--transition);
}
.nav.scrolled .nav-hamburger span { background: var(--color-primary); }

/* 모바일 메뉴 */
.mobile-menu {
  display: none; position: fixed; top: 72px; left: 0; right: 0; bottom: 0;
  background: #fff; z-index: 999; overflow-y: auto;
  padding: 24px;
}
.mobile-menu.active { display: block; }
.mobile-menu a {
  display: block; padding: 14px 0;
  font-size: 16px; border-bottom: 1px solid var(--color-border);
}
.mobile-menu .sub-menu a { padding-left: 20px; font-size: 14px; color: var(--color-text-light); }

/* ─── 히어로 (비디오) ─── */
.hero-video {
  position: relative; width: 100%; height: 100vh;
  overflow: hidden; background: #000;
}
.hero-video iframe {
  position: absolute; top: 50%; left: 50%;
  width: 177.78vh; min-width: 100%; height: 100vh; min-height: 56.25vw;
  transform: translate(-50%, -50%);
  border: none;
}
.hero-video__overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; z-index: 2;
  background: rgba(0,0,0,0.3);
}
.hero-video__subtitle {
  font-size: 18px; color: #c0c0c0; letter-spacing: 5px;
  margin-bottom: 12px;
}
.hero-video__title {
  font-size: clamp(32px, 5vw, 56px); font-weight: 700; color: #fff;
  margin-bottom: 24px;
}
.hero-video__desc {
  font-size: 16px; color: #c0c0c0; line-height: 1.8;
}
.hero-video__sound {
  position: absolute; bottom: 24px; right: 24px; z-index: 3;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.15); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff;
  transition: background var(--transition);
}
.hero-video__sound:hover { background: rgba(255,255,255,0.3); }

/* ─── 타임라인 (SINCE 2015-2026) ─── */
.timeline-section { padding: 120px 0; background: var(--color-bg); }
.timeline-section .container { display: flex; gap: 60px; align-items: center; }
.timeline-content { flex: 1; }
.timeline-since {
  font-size: 13px; color: var(--color-text-muted);
  letter-spacing: 4px; text-transform: uppercase;
  margin-bottom: 12px;
}
.timeline-years {
  display: flex; align-items: baseline; gap: 24px;
  margin-bottom: 48px;
}
.timeline-year-group {
  display: flex; align-items: baseline; gap: 2px;
}
.timeline-year {
  font-size: clamp(36px, 5vw, 56px); font-weight: 700;
  color: var(--color-primary); line-height: 1;
}
.timeline-year-group--end .timeline-year {
  color: #c3a990;
}
.timeline-year-suffix {
  font-size: 18px; color: var(--color-text-muted); font-weight: 400;
  margin-left: 2px;
}
.timeline-year-group--end .timeline-year-suffix {
  color: #c3a990;
}
.timeline-line {
  flex: 1; min-width: 120px; height: 1px; background: var(--color-border);
  position: relative; align-self: center;
}
.timeline-line::after {
  content: ''; position: absolute; left: 0; top: -1px;
  width: 0; height: 2px; background: #c3a990;
  transition: width 1.5s ease;
}
.timeline-line.animated::after { width: 100%; }
.timeline-highlight {
  font-size: clamp(22px, 3vw, 30px); font-weight: 700;
  margin-bottom: 20px; line-height: 1.5;
  color: var(--color-primary);
}
.timeline-desc {
  font-size: 16px; color: var(--color-text-light); line-height: 2;
}
.timeline-slider { flex: 1; max-width: 500px; }
.timeline-slider img { width: 100%; border-radius: var(--border-radius-lg); }
.timeline-dots { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.timeline-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--color-border); transition: background var(--transition);
}
.timeline-dot.active { background: var(--color-primary); }

/* ─── 통계 카운터 (배경 이미지 오버레이) ─── */
.stats-section {
  position: relative; overflow: hidden;
  padding: 120px 0; text-align: center;
}
.stats-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.stats-bg__overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.55); }
.stats-content {
  position: relative; z-index: 1;
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
}
.stats-subtitle {
  font-size: 16px; color: rgba(255,255,255,0.7);
  letter-spacing: 3px; margin-bottom: 8px;
}
.stats-headline {
  font-size: clamp(28px, 4vw, 42px); font-weight: 700; color: #fff;
  margin-bottom: 60px;
}
.stats-row {
  display: flex; justify-content: center; gap: 120px;
  margin-bottom: 48px;
}
.stats-item { text-align: center; }
.stats-label { font-size: 15px; color: rgba(255,255,255,0.7); letter-spacing: 2px; margin-bottom: 12px; }
.stats-number-wrap { display: flex; align-items: baseline; justify-content: center; gap: 4px; }
.stats-number {
  font-size: clamp(56px, 8vw, 90px); font-weight: 700; color: #fff;
  font-variant-numeric: tabular-nums;
  display: inline-block; min-width: 1.2em; text-align: right;
}
.stats-plus { font-size: 36px; color: rgba(255,255,255,0.5); }
.stats-unit { font-size: 22px; color: rgba(255,255,255,0.6); margin-left: 4px; }
.stats-line {
  width: 40px; height: 2px; background: rgba(255,255,255,0.3);
  margin: 16px auto 0;
}
.stats-desc { font-size: 16px; color: rgba(255,255,255,0.7); line-height: 1.8; }

/* ─── 자율신경 오작동 섹션 ─── */
.autonomic-intro { padding: 120px 0; text-align: center; }
.autonomic-intro__sub { font-size: 18px; color: var(--color-text-light); margin-bottom: 8px; }
.autonomic-intro__symptoms { font-size: 18px; color: var(--color-text); margin-bottom: 12px; }
.autonomic-intro__headline {
  font-size: clamp(24px, 3vw, 36px); font-weight: 700;
  line-height: 1.5;
}

/* ─── 시그니처 프로그램 카드 ─── */
.signature-section { padding: 100px 0; }
.signature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
}
.signature-card {
  position: relative; overflow: hidden;
  border-radius: var(--border-radius-lg);
  aspect-ratio: 3/4;
}
.signature-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.signature-card:hover img { transform: scale(1.05); }
.signature-card__label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 24px; background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
}
.signature-card__tag { font-size: 12px; letter-spacing: 2px; opacity: 0.8; display: block; margin-bottom: 4px; }
.signature-card__title { font-size: 20px; font-weight: 600; }
.signature-card__overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.6); color: #fff;
  display: flex; align-items: flex-end; padding: 24px;
  opacity: 0; transition: opacity var(--transition);
}
.signature-card:hover .signature-card__overlay { opacity: 1; }
.signature-card__plus { font-size: 32px; position: absolute; top: 24px; right: 24px; }

/* ─── 의료진 소개 (교차 레이아웃) ─── */
.doctors-section { padding: 120px 0; }
.doctors-label {
  font-size: 16px; color: var(--color-text-muted); letter-spacing: 2px;
  line-height: 2; margin-bottom: 4px;
}
.doctors-title { font-size: clamp(32px, 4vw, 48px); margin-bottom: 80px; }
.doctors-title strong { font-weight: 700; }

/* 의료진 행: 이미지 + 텍스트 교차 */
.doctor-row {
  display: flex; align-items: stretch; gap: 48px;
  margin-bottom: 80px;
}
.doctor-row:last-child { margin-bottom: 0; }
.doctor-row--reverse { flex-direction: row-reverse; }
.doctor-row__image { flex: 0 0 42%; max-width: 42%; }
.doctor-row__image img {
  width: 100%; height: 100%;
  border-radius: var(--border-radius-lg);
  object-fit: cover;
}
.doctor-row__info {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: 20px 0;
}
.doctor-row__name { font-size: clamp(28px, 3vw, 36px); font-weight: 700; }
.doctor-row__role { font-size: 17px; color: var(--color-text-muted); margin-left: 12px; font-weight: 400; }
.doctor-row__divider { width: 100%; height: 1px; background: var(--color-border); margin: 20px 0; }
.doctor-row__career { list-style: disc; padding-left: 20px; }
.doctor-row__career li {
  font-size: 14px; color: var(--color-text-light);
  padding: 4px 0; line-height: 1.8;
}

/* ─── 환자 후기 (카드 슬라이더) ─── */
.reviews-section { padding: 120px 0; background: var(--color-bg-section); }
.reviews-label { font-size: 16px; color: var(--color-text-muted); line-height: 2; }
.reviews-title { font-size: clamp(32px, 4vw, 48px); margin-bottom: 48px; }
.reviews-title strong { font-weight: 700; }

.reviews-slider { position: relative; }
.reviews-track-wrap { overflow: hidden; }
.reviews-track {
  display: flex; gap: 20px;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.review-card {
  flex: 0 0 calc((100% - 80px) / 5);
  min-width: 0;
  background: #fff;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex; flex-direction: column;
}
.review-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.1);
  transform: translateY(-4px);
}
.review-card__img {
  background: #f5f5f5;
  aspect-ratio: 3/4;
  overflow: hidden;
}
.review-card__img img {
  width: 100%; height: 100%; object-fit: cover;
}
.review-card__title {
  padding: 20px;
  font-size: 14px; line-height: 1.6;
  color: var(--color-text);
  flex: 1;
}

/* 슬라이더 화살표 */
.reviews-arrow {
  position: absolute; top: 45%; transform: translateY(-50%);
  z-index: 2;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  font-size: 28px; color: var(--color-text);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.reviews-arrow:hover { background: var(--color-primary); color: #fff; }
.reviews-arrow--prev { left: -24px; }
.reviews-arrow--next { right: -24px; }

/* 슬라이더 도트 */
.reviews-dots {
  display: flex; justify-content: center; gap: 8px;
  margin-top: 32px;
}
.reviews-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--color-border);
  transition: background var(--transition);
  cursor: pointer; border: none;
}
.reviews-dot.active { background: var(--color-primary); }

/* ─── 유튜브 섹션 ─── */
.youtube-section { padding: 120px 0; }
.youtube-label { font-size: 16px; color: var(--color-text-muted); line-height: 2; }
.youtube-title { font-size: clamp(32px, 4vw, 48px); margin-bottom: 48px; }
.youtube-title strong { font-weight: 700; color: #db5858; }
.youtube-layout { display: flex; gap: 24px; }
.youtube-player { flex: 1.5; min-width: 0; }
.youtube-player__frame {
  position: relative; width: 100%; padding-top: 56.25%; /* 16:9 */
  border-radius: var(--border-radius-lg); overflow: hidden;
  background: #000;
}
.youtube-player__frame iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.youtube-player__title { padding: 16px 0; font-size: 16px; font-weight: 500; }
.youtube-playlist { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; max-height: 480px; overflow-y: auto; }
.youtube-item {
  display: flex; gap: 12px; padding: 8px;
  border-radius: var(--border-radius); cursor: pointer;
  transition: background var(--transition);
}
.youtube-item:hover, .youtube-item.active { background: var(--color-bg-section); }
.youtube-item__thumb {
  width: 168px; flex-shrink: 0; position: relative;
  border-radius: 6px; overflow: hidden;
}
.youtube-item__thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.youtube-item__play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.3); opacity: 0;
  transition: opacity var(--transition);
}
.youtube-item:hover .youtube-item__play { opacity: 1; }
.youtube-item__play::after {
  content: ''; width: 0; height: 0;
  border-left: 12px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent;
}
.youtube-item__info { flex: 1; }
.youtube-item__title { font-size: 14px; font-weight: 500; line-height: 1.5; margin-bottom: 4px; }
.youtube-item__sub { font-size: 12px; color: var(--color-text-muted); }
.youtube-more {
  margin-top: 12px; padding: 12px; text-align: center;
  font-size: 14px; color: var(--color-text-muted);
  border: 1px solid var(--color-border); border-radius: var(--border-radius);
  transition: all var(--transition);
}
.youtube-more:hover { background: var(--color-bg-section); color: var(--color-text); }

/* ─── 연락처/지도 ─── */
.contact-section { padding: 100px 0; }
.contact-title { font-size: 36px; font-weight: 700; margin-bottom: 40px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-map {
  border-radius: var(--border-radius-lg); overflow: hidden;
  aspect-ratio: 4/3; background: var(--color-bg-section);
}
.contact-map iframe { width: 100%; height: 100%; border: none; }
.contact-info { display: flex; flex-direction: column; gap: 32px; }
.contact-info__address { font-size: 18px; line-height: 1.8; }
.contact-info__address i { color: #c3a990; margin-right: 8px; }
.contact-info__hours h3 { font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.contact-info__hours table { width: 100%; }
.contact-info__hours td { padding: 8px 0; font-size: 16px; }
.contact-info__hours td:first-child { color: var(--color-text-muted); width: 100px; }
.contact-info__hours .note { font-size: 14px; color: var(--color-text-muted); margin-top: 12px; }
.contact-info__phone h3 { font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.contact-phone-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; border-radius: var(--border-radius);
  background: var(--color-primary); color: #fff;
  font-size: 18px; font-weight: 600;
  transition: all var(--transition);
}
.contact-phone-btn:hover { background: #222; transform: translateY(-2px); }
.contact-phone-btn i { font-size: 16px; }

/* ─── 푸터 ─── */
.footer {
  background: var(--color-bg-dark); color: rgba(255,255,255,0.7);
  padding: 60px 0 40px;
}
.footer-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
}
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 40px; }
.footer-info p { font-size: 14px; line-height: 2; }
.footer-sns { display: flex; gap: 16px; }
.footer-sns a {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px;
  transition: background var(--transition);
}
.footer-sns a:hover { background: rgba(255,255,255,0.2); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px; text-align: center;
}
.footer-bottom p { font-size: 12px; color: rgba(255,255,255,0.4); }
.footer-links { display: flex; gap: 24px; justify-content: center; margin-bottom: 12px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.5); }
.footer-links a:hover { color: #fff; }

/* ─── 유틸리티 ─── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.fade-up {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ─── 반응형 ─── */
@media (max-width: 1024px) {
  .timeline-section .container { flex-direction: column; }
  .timeline-slider { max-width: 100%; }
  .doctor-row { flex-direction: column !important; gap: 32px; }
  .doctor-row__image { flex: none; max-width: 100%; }
  .youtube-layout { flex-direction: column; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .section { padding: var(--section-padding-mobile); }
  .stats-section { padding: 80px 0; }
  .stats-row { flex-direction: column; gap: 40px; }
  .stats-headline { margin-bottom: 40px; }
  .signature-grid { grid-template-columns: 1fr; }
  .review-card { flex: 0 0 calc((100% - 20px) / 2); }
  .reviews-arrow { display: none; }
}

@media (max-width: 480px) {
  .review-card { flex: 0 0 100%; }
}
