/* ============================================================
   블리스내과의원 — 공통 스타일
   메인컬러: #67a887  |  Pretendard + Noto Sans KR + Inter
   ============================================================ */

/* ── 접근성 유틸리티 ── */
.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;
}

/* Google Fonts는 각 HTML <head>에서 preload로 로드 (렌더링 차단 방지) */

/* ── CSS 변수 (디자인 토큰) ── */
:root {
  --accent:       #67a887;
  --accent-deep:  #4d8a6d;
  --accent-dark:  #2e5e47;
  --accent-soft:  #e8f4ef;
  --accent-mid:   #b2d9c6;
  --ink:          #1a2e25;
  --ink-soft:     #4a5e54;
  --ink-lighter:  #7a9089;
  --paper:        #f8faf9;
  --paper-deep:   #eef4f1;
  --line:         #d4e5dc;
  --white:        #ffffff;
  --shadow-sm:    0 2px 8px rgba(103,168,135,.10);
  --shadow-md:    0 6px 24px rgba(103,168,135,.14);
  --shadow-lg:    0 16px 48px rgba(103,168,135,.18);
  --radius-sm:    6px;
  --radius-md:    12px;
  --radius-lg:    20px;
  --transition:   0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ── 리셋 & 기본 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; overflow-x: clip; }
/* 헤더 마운트: 높이 예약 없음 — main padding-top으로 통일 관리 */
#site-header-mount { min-height: 0; }
body {
  font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
  word-break: keep-all;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
input, textarea, select { font-family: inherit; }
/* iOS 스크롤 성능 */
.mobile-nav, .tab-panels, .inner-section { -webkit-overflow-scrolling: touch; }

/* Pretendard CDN */
@font-face {
  font-family: 'Pretendard';
  src: url('https://cdn.jsdelivr.net/npm/pretendard@1.3.9/dist/web/variable/PretendardVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

/* ── 컨테이너 ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container--wide { max-width: 1400px; margin: 0 auto; padding: 0 24px; }

/* ── 섹션 공통 ── */
.section { padding: 80px 0; }
.section--gray { background: var(--paper); }
.section--accent { background: var(--accent-soft); }
.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(24px, 3.5vw, 38px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 16px;
}
.section-desc {
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  word-break: keep-all;
  line-height: 1.8;
}

/* ── 헤더 ── */
/* ── 헤더 구조: 로고 행(상단) + 네비 행(하단) ── */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}
#site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 2px 20px rgba(0,0,0,.08);
}

/* 로고 행 */
.header-logo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1300px;
  margin: 0 auto;
  padding: 18px 32px 14px;
  border-bottom: 1px solid var(--line);
}
.header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
}
.header-logo-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nhis-badge {
  height: 36px;
  width: auto;
  object-fit: contain;
}
.header-tel {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-dark);
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.header-tel svg { flex-shrink: 0; }

/* 네비 행 */
.header-nav-row {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
}
.nav-pc { display: flex; align-items: center; width: 100%; }
.nav-pc ul {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  list-style: none;
  margin: 0; padding: 0;
  width: 100%;
}
.nav-item { position: relative; text-align: left; }
.nav-link {
  display: block;
  padding: 13px 0 13px 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  transition: color var(--transition);
  white-space: nowrap;
}
.nav-link:hover,
.nav-item.active > .nav-link { color: var(--accent); }
.nav-item-has-children > .nav-link::after {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  margin-left: 5px;
  vertical-align: middle;
  transition: transform var(--transition);
}
.nav-item.active > .nav-link::after { transform: rotate(-135deg) translateY(2px); }

/* ── 메가 메뉴 ── */
.mega-menu {
  position: absolute;
  left: 0; right: 0;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 2px solid var(--accent);
  box-shadow: 0 12px 40px rgba(0,0,0,.12);
  z-index: 900;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4,0,0.2,1);
}
.mega-menu.open { max-height: 360px; }
.mega-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 20px 32px 24px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
}
.mega-group {
  display: block;
  padding: 0 24px 0 0;
  border-right: 1px solid var(--line);
  margin-right: 24px;
}
.mega-group:last-child { border-right: none; padding-right: 0; margin-right: 0; }
.mega-group-title { display: none; }
.mega-group ul { display: flex; flex-direction: column; gap: 2px; list-style: none; padding: 0; margin: 0; }
.mega-group ul li a {
  display: block;
  padding: 7px 10px 7px 10px;
  font-size: 15px;
  color: var(--ink-soft);
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
}
.mega-group ul li a:hover {
  background: var(--accent-soft);
  color: var(--accent-dark);
}
/* 호버한 카테고리 컬럼 강조 */
.mega-group.active .mega-group-title a { color: var(--accent); }

/* 햄버거 */
.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}
.hamburger .ham-icon { display: block; }

/* 모바일 사이드 메뉴 헤더 */
.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 64px;
  background: #fff;
  border-bottom: 2px solid #e8f4ef;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
/* 뒷배경 로고 워터마크 */
.mobile-nav-header::after {
  content: '';
  position: absolute;
  right: -16px;
  bottom: -22px;
  width: 120px;
  height: 120px;
  background: url('../images/logo_bliss.png') center/contain no-repeat;
  opacity: 0.06;
  pointer-events: none;
}
.mobile-nav-logo {
  height: 32px;
  position: relative;
  z-index: 1;
}
.mobile-nav-close {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #4d8a6d;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.mobile-nav-close:hover,
.mobile-nav-close:active {
  background: #e8f4ef;
  color: #1a2e25;
}

/* ── 모바일 메뉴 backdrop ── */
.mobile-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1098;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-nav-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* ── 모바일 메뉴 ── */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0; right: 0;
  width: min(320px, 85vw);
  height: 100%;
  height: 100dvh;
  background: var(--white);
  z-index: 1200;
  overflow-y: auto;
  padding: 0 0 80px;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -4px 0 24px rgba(0,0,0,.12);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.mobile-nav.open { transform: translateX(0) translateZ(0); }
.mobile-nav-item { border-bottom: 1px solid var(--line); }
.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.mobile-nav-link .chevron {
  width: 8px; height: 8px;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: rotate(45deg);
  transition: transform var(--transition);
}
.mobile-nav-item.open .mobile-nav-link .chevron { transform: rotate(-135deg); }
.mobile-submenu {
  display: none;
  background: var(--paper);
  padding: 4px 0;
}
.mobile-nav-item.open .mobile-submenu { display: block; }
.mobile-submenu li a {
  display: block;
  padding: 12px 24px 12px 40px;
  font-size: 14px;
  color: var(--ink-soft);
}
.mobile-submenu li a:hover { color: var(--accent); }

/* ── 메인 콘텐츠 여백 (헤더 fixed, 로고행77px + 네비행53px = 130px) ── */
main { padding-top: 130px; }

/* ── 페이지 히어로 (내부 페이지) ── */
.page-hero {
  position: relative;
  height: 280px;
  display: flex;
  align-items: center;
  background: url('../images/hero_banner.png') center center / cover no-repeat;
  overflow: hidden;
}
/* 오른쪽에 반투명 흰색 — 텍스트 가독성 */
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(255,255,255,0.0) 30%,
    rgba(255,255,255,0.55) 70%,
    rgba(255,255,255,0.72) 100%
  );
  pointer-events: none;
}
.page-hero-content {
  position: relative; z-index: 1;
}
.page-hero-label {
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.page-hero-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-soft);
}
.breadcrumb a { color: var(--ink-soft); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: .5; }

/* ── 내부 페이지 탭 ── */
.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--line);
  margin-bottom: 48px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-nav::-webkit-scrollbar { display: none; }
.tab-btn {
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: var(--transition);
}
.tab-btn:hover { color: var(--accent); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── 카드 ── */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* ── 버튼 ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-outline {
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
}
.btn-outline:hover { background: var(--accent); color: var(--white); }
.btn-sm { padding: 10px 20px; font-size: 13px; }

/* ── 구분선 ── */
.divider { height: 1px; background: var(--line); margin: 40px 0; }

/* ── PC 우측 퀵메뉴 ── */
#quick-menu {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 800;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(220,235,228,0.9);
  border-radius: 22px;
  padding: 10px 6px;
  box-shadow: 0 8px 40px rgba(0,0,0,.13), 0 1px 4px rgba(0,0,0,.05);
}
.quick-btn {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: transparent;
  border: none;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.18s;
  text-decoration: none;
}
.quick-btn:hover {
  background: rgba(103,168,135,.12);
  color: var(--accent-dark);
  transform: scale(1.04);
}
.quick-btn svg { flex-shrink: 0; }
.quick-btn--top {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  height: 52px;
  border-radius: 0 0 14px 14px;
  color: var(--ink-soft);
}
.quick-btn--top:hover {
  background: var(--paper);
  color: var(--ink);
}

/* ── 진료시간 모달 ── */
#hours-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
}
#hours-modal.open { display: flex; align-items: center; justify-content: center; }
.hours-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
}
.hours-box {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 480px;
  width: 90%;
  z-index: 1;
  box-shadow: var(--shadow-lg);
}
.hours-box h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 24px;
}
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table tr { border-bottom: 1px solid var(--line); }
.hours-table tr:last-child { border-bottom: none; }
.hours-table td { padding: 10px 0; font-size: 14px; }
.hours-table td:first-child { font-weight: 600; color: var(--ink); width: 60px; }
.hours-table td:last-child { color: var(--ink-soft); }
.hours-close {
  position: absolute;
  top: 16px; right: 20px;
  font-size: 22px;
  color: var(--ink-soft);
  cursor: pointer;
  line-height: 1;
}

/* ── 모바일 하단 탭바 ── */
#mobile-tabbar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 900;
  background: var(--white);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
#mobile-tabbar ul {
  display: flex;
}
#mobile-tabbar li { flex: 1; }
#mobile-tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px 8px;
  font-size: 9px;
  font-weight: 600;
  color: var(--ink-soft);
  gap: 3px;
  transition: color var(--transition);
}
#mobile-tabbar a:hover,
#mobile-tabbar a.active { color: var(--accent); }
#mobile-tabbar svg { width: 20px; height: 20px; }

/* ── 팝업 ── */
#popup-container {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 2000;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  -webkit-transform: translateZ(0); /* iOS GPU 레이어 강제 */
}
#popup-container.has-popup { pointer-events: auto; opacity: 1; }
.popup-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.55);
  pointer-events: auto;
  cursor: pointer; /* iOS click 인식 */
  -webkit-tap-highlight-color: transparent;
}
.popup-items {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 16px;
  padding: 16px;
  max-height: 90vh; /* dvh 대신 vh — 인앱 브라우저 호환 */
  max-width: 96vw;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  pointer-events: auto;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: nowrap;
}
@keyframes popupIn {
  from { opacity: 0; transform: scale(0.92) translateY(8px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}
.popup-item {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  width: min(400px, 90vw);
  flex-shrink: 0;
  animation: popupIn 0.28s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}
.popup-item img { width: 100%; display: block; }
.popup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 14px;
  background: var(--ink);
}
.popup-footer button {
  font-size: 13px;
  color: rgba(255,255,255,.7);
  background: none; border: none;
  cursor: pointer;
  padding: 4px 4px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 36px; /* iOS 최소 터치 영역 */
}
.popup-footer button:hover { color: var(--white); }

/* ── 게시판 ── */
.board-grid {
  display: grid;
  gap: 16px;
}
.board-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: pointer;
}
.board-item:hover { border-color: var(--accent-mid); background: var(--accent-soft); }
.board-num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  flex-shrink: 0;
}
.board-content { flex: 1; min-width: 0; }
.board-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.board-meta { font-size: 12px; color: var(--ink-lighter); margin-top: 4px; }
.board-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}
.badge-answered { background: #dcfce7; color: #166534; }
.badge-pending { background: #fef9c3; color: #854d0e; }
.badge-secret { background: var(--paper); color: var(--ink-soft); }

/* ── 비급여 테이블 ── */
.nonpay-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.nonpay-table th {
  background: var(--accent-dark);
  color: var(--white);
  padding: 14px 20px;
  text-align: left;
  font-weight: 600;
}
.nonpay-table td {
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.nonpay-table tr:hover td { background: var(--accent-soft); }
.nonpay-table .price {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--accent-dark);
}
.nonpay-section-title {
  background: var(--accent-soft);
  padding: 14px 20px;
  font-weight: 700;
  font-size: 15px;
  color: var(--accent-dark);
  border-left: 4px solid var(--accent);
  margin-top: 32px;
  margin-bottom: 0;
}

/* ── 협력병원 ── */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}
.partner-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}
.partner-item:hover {
  border-color: var(--accent-mid);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.partner-item img { max-height: 48px; object-fit: contain; }
.partner-name { font-size: 13px; font-weight: 600; color: var(--ink-soft); text-align: center; }

/* ── 푸터 ── */
#site-footer {
  background: var(--ink);
  color: rgba(255,255,255,.65);
  padding: 48px 0 32px;
}
.footer-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 32px;
}
.footer-logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}
.footer-logo-en {
  font-size: 12px;
  color: rgba(255,255,255,.45);
  font-family: 'Inter', sans-serif;
  margin-bottom: 16px;
}
.footer-info p { font-size: 13px; line-height: 1.9; }
.footer-nav-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.footer-nav-list li { margin-bottom: 8px; }
.footer-nav-list a { font-size: 13px; transition: color var(--transition); }
.footer-nav-list a:hover { color: var(--accent-mid); }
.footer-bottom {
  max-width: 1300px;
  margin: 0 auto;
  padding: 20px 32px 0;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.footer-bottom a { color: rgba(255,255,255,.45); margin-left: 16px; }
.footer-bottom a:hover { color: var(--white); }

/* ── 스크롤 애니메이션 ── */
.fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1),
              transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.fade-up.visible { opacity: 1; transform: none; }
.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }
.fade-up-delay-4 { transition-delay: 0.4s; }
.fade-left {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-left.visible { opacity: 1; transform: none; }
.fade-right {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-right.visible { opacity: 1; transform: none; }

/* ── 내부 페이지 공통 레이아웃 ── */
.inner-section { padding: 64px 0 32px; }
.inner-section:first-child { padding-top: 56px; }
.content-block { max-width: 860px; }
.content-block h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--accent-soft);
}
.content-block p { font-size: 15px; line-height: 1.9; color: var(--ink-soft); margin-bottom: 12px; }
.content-block ul { margin: 12px 0 12px 0; }
.content-block ul li {
  font-size: 15px;
  color: var(--ink-soft);
  padding: 6px 0 6px 16px;
  position: relative;
}
.content-block ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 14px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* 장점 카드 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: var(--transition);
}
.feature-card:hover {
  border-color: var(--accent-mid);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.feature-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.feature-icon svg { color: var(--accent); }
.feature-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.feature-desc { font-size: 14px; color: var(--ink-soft); line-height: 1.7; }

/* ── 이미지 + 텍스트 2단 ── */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.split-section.reverse { direction: rtl; }
.split-section.reverse > * { direction: ltr; }
.split-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
}
.split-img img { width: 100%; height: 100%; object-fit: cover; }

/* ── 슬라이드쇼 (둘러보기) ── */
.gallery-slider { position: relative; overflow: hidden; border-radius: var(--radius-lg); }
.gallery-track { display: flex; transition: transform 0.6s cubic-bezier(0.4,0,0.2,1); }
.gallery-slide { min-width: 100%; aspect-ratio: 16/9; }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; }
.slider-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  z-index: 2;
}
.slider-btn:hover { background: var(--white); transform: translateY(-50%) scale(1.08); }
.slider-btn--prev { left: 16px; }
.slider-btn--next { right: 16px; }
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}
.slider-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line);
  transition: var(--transition);
  cursor: pointer;
}
.slider-dot.active { background: var(--accent); transform: scale(1.3); }

/* ── Q&A 작성 폼 ── */
.qna-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 32px;
  margin-bottom: 40px;
}
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.form-input, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink);
  background: var(--white);
  transition: border-color var(--transition);
}
.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── FAQ 아코디언 ── */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  transition: background var(--transition);
}
.faq-q:hover { background: var(--accent-soft); }
.faq-item.open .faq-q { background: var(--accent-soft); color: var(--accent-dark); }
.faq-q .faq-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--line);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1;
  transition: var(--transition);
}
.faq-item.open .faq-q .faq-icon { background: var(--accent); color: var(--white); transform: rotate(45deg); }
.faq-a {
  display: none;
  padding: 16px 24px 20px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
  border-top: 1px solid var(--line);
}
.faq-item.open .faq-a { display: block; }

/* ── 오시는길 ── */
.location-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 40px;
  align-items: start;
}
.location-map {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16/10;
  border: 1px solid var(--line);
}
.location-map iframe { width: 100%; height: 100%; }
.location-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.location-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
}
.location-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.hours-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 14px;
  border-bottom: 1px dashed var(--line);
}
.hours-row:last-child { border-bottom: none; }
.hours-row .day { font-weight: 600; color: var(--ink); }
.hours-row .time { color: var(--ink-soft); font-family: 'Inter', sans-serif; }
.hours-row .closed { color: #e74c3c; }
.hours-note {
  font-size: 12px;
  color: var(--ink-lighter);
  margin-top: 10px;
}

/* ── 장비 소개 ── */
.equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.equipment-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}
.equipment-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.equipment-img {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.equipment-img img { max-height: 140px; object-fit: contain; }
.equipment-body { padding: 20px; }
.equipment-name { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.equipment-desc { font-size: 13px; color: var(--ink-soft); }

/* ── 알림 토스트 ── */
.toast {
  position: fixed;
  bottom: 80px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 99px;
  font-size: 14px;
  z-index: 3000;
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ================================================================
   반응형
   ================================================================ */

/* 태블릿 (768px ~ 1024px) */
@media (max-width: 1024px) {
  .split-section { grid-template-columns: 1fr; gap: 32px; }
  .split-section.reverse { direction: ltr; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .location-grid { grid-template-columns: 1fr; }
  .header-tel { display: none; }
}

/* 모바일 (~ 767px) */
@media (max-width: 767px) {
  main { padding-top: 62px; }
  .header-logo-row { padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px 10px; }
  .logo-img { height: 34px; }
  .nhis-badge { display: none; }
  .header-tel { font-size: 13px; }
  .header-nav-row { display: none; }
  .mega-menu { display: none; }
  .hamburger { display: flex !important; }
  .mobile-nav { display: block; }
  .mobile-nav-backdrop { display: block; }
  #quick-menu { display: none; }
  #mobile-tabbar { display: block; }
  main { padding-bottom: 60px; }
  .section { padding: 56px 0 28px; }
  .inner-section { padding: 40px 0 20px; }
  .container { padding: 0 16px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .footer-inner > *:first-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .page-hero { height: 200px; }
  .feature-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .tab-btn { padding: 12px 16px; font-size: 14px; }
  .popup-items { flex-direction: column; flex-wrap: wrap; align-items: center; }
  .nonpay-table th, .nonpay-table td { padding: 10px 12px; }
  .partner-grid { grid-template-columns: repeat(2, 1fr); }
  .director-profile-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
  .btn { padding: 10px 20px; font-size: 13px; }
}

/* ── 글로벌 카드 호버/터치 리프트 애니메이션 ── */
.card, .program-card, .service-card, .diagnosis-card, .compare-card,
.diet-target-item, .diet-mj-item, .faq-item, .advantage-item,
.feature-card, .equipment-card, .partner-item, .emp-card,
.home-location-card, .home-notice-item, .recommend-chip {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
@media (hover: hover) {
  .card:hover, .program-card:hover, .service-card:hover,
  .diagnosis-card:hover, .compare-card:hover,
  .diet-target-item:hover, .diet-mj-item:hover,
  .feature-card:hover, .equipment-card:hover,
  .partner-item:hover, .emp-card:hover,
  .home-location-card:hover, .home-notice-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(103,168,135,.15);
  }
}
@media (hover: none) {
  .card:active, .program-card:active, .service-card:active,
  .diagnosis-card:active, .compare-card:active,
  .diet-target-item:active, .diet-mj-item:active,
  .feature-card:active, .equipment-card:active,
  .partner-item:active, .emp-card:active,
  .home-location-card:active, .home-notice-item:active {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(103,168,135,.12);
  }
}

/* 인쇄 */
@media print {
  #site-header, #quick-menu, #mobile-tabbar, #popup-container { display: none !important; }
  main { padding-top: 0 !important; }
}

/* ── 스크롤 애니메이션 폴백: JS 비활성 환경에서 모두 표시 ── */
@media (prefers-reduced-motion: reduce) {
  .fade-up, .fade-left, .fade-right {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
