/* ============================================================
   잠실센트럴안과의원 — Common Stylesheet (style.css)
   Design System: Deep Navy / Kanit + Noto Sans KR
   ============================================================ */

/* ------------------------------------------------------------
   1. IMPORTS
   ------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;600;700&family=Noto+Sans+KR:wght@300;400;500;600;700&display=swap');

/* ------------------------------------------------------------
   2. CSS RESET
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}


img, video, svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol { list-style: none; }

button, input, select, textarea {
  font: inherit;
  border: none;
  background: none;
  outline: none;
  cursor: pointer;
}

table { border-collapse: collapse; width: 100%; }

/* ------------------------------------------------------------
   3. DESIGN TOKENS — light mode defaults
   ------------------------------------------------------------ */
:root {
  /* Brand colours */
  --color-primary:      #144168;
  --color-navy-dark:    #0c2d4a;
  --color-navy-mid:     #1a5282;
  --color-accent:       #1a7fd4;
  --color-blue-sub:     #e4f0fb;

  /* Text */
  --color-text:         #1b2536;
  --color-text-2:       #4a5e74;
  --color-text-3:       #8096ad;

  /* Surfaces */
  --color-surface:      #ffffff;
  --color-surface-2:    #f3f7fc;
  --color-border:       #cdd8e6;
  --color-bg:           #eaf0f7;

  /* Functional aliases */
  --color-link:         var(--color-accent);
  --color-link-hover:   var(--color-navy-mid);

  /* Typography */
  --font-body:          'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
  --font-kanit:         'Kanit', sans-serif;

  /* Spacing scale */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;

  /* Border radius */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(20,65,104,.08);
  --shadow-md: 0 4px 16px rgba(20,65,104,.12);
  --shadow-lg: 0 8px 32px rgba(20,65,104,.16);
  --shadow-xl: 0 16px 48px rgba(20,65,104,.20);

  /* Transitions */
  --trans-fast:   0.15s ease;
  --trans-normal: 0.25s ease;
  --trans-slow:   0.40s ease;

  /* Layout */
  --wrap-max: 1200px;
  --header-h: 80px;

  /* Z-index layers */
  --z-base:      1;
  --z-dropdown:  100;
  --z-sidebar:   150;
  --z-header:    200;
  --z-modal:     300;
  --z-toast:     400;
}

/* ------------------------------------------------------------
   4. DARK MODE TOKENS
   ------------------------------------------------------------ */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-primary:   #2a6aaa;
    --color-navy-dark: #1a4a72;
    --color-navy-mid:  #2a6aaa;
    --color-accent:    #3a9fef;
    --color-blue-sub:  #1a3550;

    --color-text:      #e8edf3;
    --color-text-2:    #9db3c8;
    --color-text-3:    #6a88a3;

    --color-surface:   #111c29;
    --color-surface-2: #162233;
    --color-border:    #243648;
    --color-bg:        #0d1824;

    --shadow-sm: 0 1px 4px rgba(0,0,0,.30);
    --shadow-md: 0 4px 16px rgba(0,0,0,.40);
    --shadow-lg: 0 8px 32px rgba(0,0,0,.50);
    --shadow-xl: 0 16px 48px rgba(0,0,0,.60);
  }
}

:root[data-theme="dark"] {
  --color-primary:   #2a6aaa;
  --color-navy-dark: #1a4a72;
  --color-navy-mid:  #2a6aaa;
  --color-accent:    #3a9fef;
  --color-blue-sub:  #1a3550;

  --color-text:      #e8edf3;
  --color-text-2:    #9db3c8;
  --color-text-3:    #6a88a3;

  --color-surface:   #111c29;
  --color-surface-2: #162233;
  --color-border:    #243648;
  --color-bg:        #0d1824;

  --shadow-sm: 0 1px 4px rgba(0,0,0,.30);
  --shadow-md: 0 4px 16px rgba(0,0,0,.40);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.50);
  --shadow-xl: 0 16px 48px rgba(0,0,0,.60);
}

/* ------------------------------------------------------------
   5. BASE / BODY
   ------------------------------------------------------------ */
body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ------------------------------------------------------------
   6. TYPOGRAPHY
   ------------------------------------------------------------ */
.kanit { font-family: var(--font-kanit); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
}

h1 { font-size: clamp(28px, 5vw,   52px); }
h2 { font-size: clamp(22px, 3.5vw, 38px); }
h3 { font-size: clamp(18px, 2.5vw, 26px); }
h4 { font-size: clamp(16px, 2vw,   20px); }

p { line-height: 1.8; }

strong { font-weight: 700; }

/* ------------------------------------------------------------
   7. LAYOUT UTILITIES
   ------------------------------------------------------------ */
.wrap {
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: max(20px, env(safe-area-inset-right, 20px));
}

.container {
  width: 100%;
  padding-inline: 20px;
}

/* Screen-reader only */
.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;
}

/* Text alignment */
.text-center { text-align: center; }
.text-left   { text-align: left;   }
.text-right  { text-align: right;  }

/* ------------------------------------------------------------
   8. BUTTONS
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background var(--trans-fast), color var(--trans-fast),
              border-color var(--trans-fast), box-shadow var(--trans-fast),
              transform var(--trans-fast);
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
}

.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border: 2px solid var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-navy-dark);
  border-color: var(--color-navy-dark);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background: var(--color-accent);
  color: #fff;
  border: 2px solid var(--color-accent);
}

.btn-accent:hover {
  background: var(--color-navy-mid);
  border-color: var(--color-navy-mid);
}

.btn-sm { padding: 8px 18px;  font-size: 13px; }
.btn-lg { padding: 16px 40px; font-size: 17px; }

/* ------------------------------------------------------------
   9. SECTION HEADER — 전체 통일 스타일
   ------------------------------------------------------------ */

/* 섹션 레이블 (eyebrow) — accent 라인 + Kanit 소문자 스타일 */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-kanit);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--sp-3);
}

.section-label::before {
  content: '';
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-accent);
  flex-shrink: 0;
}

/* 섹션 제목 */
.section-title {
  font-size: clamp(25px, 3vw, 39px);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.25;
  margin-bottom: var(--sp-3);
  letter-spacing: -0.01em;
}

.section-title span { color: var(--color-accent); }

/* 섹션 설명 */
.section-desc {
  font-size: 22px;
  color: var(--color-text-2);
  max-width: 560px;
  line-height: 1.8;
  font-weight: 400;
}

/* 섹션 헤더 래퍼 */
.section-header {
  margin-bottom: var(--sp-10);
}

.section-header.center {
  text-align: center;
}

.section-header.center .section-label {
  justify-content: center;
}

.section-header.center .section-label::before {
  display: none; /* 가운데 정렬 시 왼쪽 라인 제거 */
}

.section-header.center .section-label::after {
  content: '';
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-accent);
  flex-shrink: 0;
}

.section-header.center .section-desc { margin-inline: auto; }

/* 하위 호환 — 기존 eyebrow 클래스 */
.section-eyebrow {
  font-family: var(--font-kanit);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--color-accent);
  display: block;
  margin-bottom: var(--sp-3);
}

/* ------------------------------------------------------------
   10. CARD
   ------------------------------------------------------------ */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: box-shadow var(--trans-normal), transform var(--trans-normal);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-body { padding: var(--sp-6); }

.card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* ------------------------------------------------------------
   11. TAGS & BADGES
   ------------------------------------------------------------ */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  background: var(--color-blue-sub);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  background: var(--color-accent);
  color: #fff;
  line-height: 1;
}

/* ------------------------------------------------------------
   12. SITE HEADER
   ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  background: var(--color-surface);
  box-shadow: 0 2px 12px rgba(20,65,104,.10);
  transition: box-shadow var(--trans-normal);
}

/* ---- Top bar ---- */
.header-top {
  background: var(--color-navy-dark);
  color: rgba(255,255,255,.75);
  font-size: 13px;
  height: 36px;
  display: flex;
  align-items: center;
}

.header-top .wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-5);
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
}

.header-top-tel {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-kanit);
  font-weight: 600;
  color: #fff;
  font-size: 14px;
  text-decoration: none;
}

.header-top-tel svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.header-top-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.header-top-nav a {
  color: rgba(255,255,255,.7);
  font-size: 12px;
  transition: color var(--trans-fast);
}

.header-top-nav a:hover { color: #fff; }

.header-top-divider {
  width: 1px;
  height: 12px;
  background: rgba(255,255,255,.25);
}

/* ---- Middle (logo row) ---- */
.header-middle { padding-block: 14px; }

.header-middle .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
}

.site-logo img { max-height: 53px; width: auto; }

.site-logo-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.site-logo-sub {
  font-size: 11px;
  color: var(--color-text-3);
  font-family: var(--font-kanit);
  letter-spacing: 0.05em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

/* ---- Main nav ---- */
.header-nav {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  position: relative;
}

.header-nav .wrap {
  display: block;
  width: 100%;
  max-width: 1400px;        /* 서브페이지 인라인 .wrap 1100px 오버라이드 방지 + 네비 폭 제한 */
  margin-inline: auto;
  padding-inline: max(20px, env(safe-area-inset-right, 20px));
}


.nav-list {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: stretch;
  width: 100%;
}

.nav-item {
  position: static;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  height: 52px;
  padding-inline: var(--sp-4);
  font-size: 19px;
  font-weight: 600;
  color: var(--color-text);
  transition: color var(--trans-fast), background var(--trans-fast);
  white-space: nowrap;
  cursor: pointer;
}

.nav-link svg {
  width: 11px;
  height: 11px;
  transition: transform var(--trans-fast);
  flex-shrink: 0;
}

.nav-item:hover .nav-link,
.header-nav:hover .nav-link {
  color: var(--color-accent);
}

.nav-item:hover .nav-link svg { transform: rotate(180deg); }

.nav-item.active > .nav-link {
  color: var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
}

/* ═══ 메가메뉴 (레퍼런스 스타일) ═══
   헤더 전체 너비로, 모든 카테고리 컬럼을 한 번에 표시 */
.nav-mega {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-top: 2px solid var(--color-accent);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .2s ease, transform .2s ease;
  z-index: var(--z-dropdown);
}

.header-nav:hover .nav-mega {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mega-grid {
  /* header-nav .wrap 과 동일한 박스모델 → nav 7개 컬럼 픽셀 단위 1:1 정렬 */
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: max(20px, env(safe-area-inset-right, 20px));
  padding-block: 20px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: start;
}

.mega-col {
  display: flex;
  flex-direction: column;
  min-width: 0; /* 텍스트가 길어도 셀 너비 유지 */
  border-right: 1px solid var(--color-border);
}

.mega-col:last-child { border-right: none; }

.mega-link {
  display: block;
  padding: 9px 20px;
  font-size: 18px;
  font-weight: 500;
  color: var(--color-text-2);
  transition: color var(--trans-fast), background var(--trans-fast);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.mega-link:hover {
  color: var(--color-accent);
  background: var(--color-blue-sub);
}

/* ---- Hamburger ---- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: none;
  border: 1px solid var(--color-border);
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: transform var(--trans-normal), opacity var(--trans-fast);
  transform-origin: center;
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Mobile nav drawer ---- */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-header) + 10);
}

.mobile-nav-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
}

.mobile-nav-drawer {
  position: absolute;
  top: 0;
  right: 0;               /* 오른쪽에서 왼쪽으로 슬라이드 */
  bottom: 0;
  width: min(320px, 85vw);
  background: var(--color-surface);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  transform: translateX(100%);
  transition: transform var(--trans-slow);
  padding: var(--sp-6) var(--sp-5);
  padding-bottom: calc(var(--sp-6) + env(safe-area-inset-bottom, 0px));
}

.mobile-nav.open { display: block; }

.mobile-nav.open .mobile-nav-drawer { transform: translateX(0); }

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-2);
}

.mobile-nav-list { margin-bottom: var(--sp-6); }

.mobile-nav-group { margin-bottom: var(--sp-2); }

.mobile-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
}

.mobile-nav-top svg {
  width: 14px;
  height: 14px;
  transition: transform var(--trans-fast);
}

.mobile-nav-group.open .mobile-nav-top svg { transform: rotate(180deg); }

.mobile-sub-list {
  display: none;
  flex-direction: column;
  padding: var(--sp-2) 0 var(--sp-2) var(--sp-4);
}

.mobile-nav-group.open .mobile-sub-list { display: flex; }

.mobile-sub-link {
  padding: 8px 0;
  font-size: 14px;
  color: var(--color-text-2);
  border-bottom: 1px dashed var(--color-border);
}

.mobile-sub-link:last-child { border-bottom: none; }

.mobile-nav-tel svg { width: 20px; height: 20px; flex-shrink: 0; }
.mobile-nav-tel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--color-blue-sub);
  border-radius: var(--radius-md);
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-kanit);
  letter-spacing: .02em;
  color: var(--color-primary);
  margin-top: var(--sp-4);
  text-decoration: none;
}

/* ------------------------------------------------------------
   13. RIGHT SIDEBAR
   ------------------------------------------------------------ */
.right-sidebar {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: var(--z-sidebar);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 56px;
  height: 60px;
  background: var(--color-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background var(--trans-fast), transform var(--trans-fast);
  border: none;
  text-decoration: none;
  line-height: 1.2;
}

.sidebar-btn:hover {
  background: var(--color-navy-dark);
  transform: translateX(-4px);
}

.sidebar-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-btn.kakao { background: #fee500; color: #3c1e1e; }
.sidebar-btn.kakao:hover { background: #f5d800; }

.sidebar-btn.blog  { background: #03c75a; color: #fff; }
.sidebar-btn.blog:hover { background: #02a84d; }

.sidebar-btn.top {
  background: var(--color-surface-2);
  color: var(--color-primary);
  border-left: 2px solid var(--color-border);
}

.sidebar-btn.top:hover {
  background: var(--color-primary);
  color: #fff;
}

/* ------------------------------------------------------------
   14. MOBILE BOTTOM TAB
   ------------------------------------------------------------ */
.mobile-tab {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: calc(var(--z-header) - 1);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -4px 16px rgba(20,65,104,.10);
}

.mobile-tab-list {
  display: flex;
  align-items: stretch;
}

.mobile-tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding-block: 8px;
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-3);
  text-decoration: none;
  transition: color var(--trans-fast), background var(--trans-fast);
  cursor: pointer;
  border: none;
  background: none;
}

.mobile-tab-item svg { width: 22px; height: 22px; flex-shrink: 0; }

.mobile-tab-item:hover,
.mobile-tab-item.active { color: var(--color-accent); }

.mobile-tab-item.call { background: var(--color-accent); color: #fff; }
.mobile-tab-item.call:hover { background: var(--color-navy-mid); color: #fff; }

/* ------------------------------------------------------------
   15. FOOTER
   ------------------------------------------------------------ */
.site-footer {
  background: var(--color-navy-dark);
  color: rgba(255,255,255,.70);
  padding-block: 0 0;
}

/* 오시는 길 + 지도 그리드 */
.ft-location-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 48px;
  align-items: stretch;
  padding-block: 60px 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--sp-10);
  padding-bottom: var(--sp-10);
  border-bottom: 1px solid rgba(255,255,255,.12);
  margin-bottom: var(--sp-6);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
  text-decoration: none;
}

.footer-logo img { max-height: 44px; filter: brightness(0) invert(1); opacity: .85; }

.footer-logo-name { font-size: 16px; font-weight: 700; color: #fff; line-height: 1.2; }

.footer-logo-sub { font-size: 11px; color: rgba(255,255,255,.5); font-family: var(--font-kanit); }

.footer-tagline { font-size: 13px; line-height: 1.7; color: rgba(255,255,255,.55); max-width: 280px; }

.footer-col-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
}

.footer-info-list { display: flex; flex-direction: column; gap: var(--sp-3); }

.footer-info-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: 13px;
  color: rgba(255,255,255,.65);
}

.footer-info-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--color-accent);
}

.footer-hours-table { width: 100%; border-collapse: collapse; }

.footer-hours-table td {
  padding: 4px 0;
  font-size: 13px;
  color: rgba(255,255,255,.65);
  vertical-align: top;
}

.footer-hours-table td:first-child {
  width: 80px;
  color: rgba(255,255,255,.45);
  font-size: 12px;
}

.footer-hours-table tr.today td { color: #fff; font-weight: 600; }

.footer-nav-list { display: flex; flex-direction: column; gap: var(--sp-2); }

.footer-nav-link {
  font-size: 13px;
  color: rgba(255,255,255,.6);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  transition: color var(--trans-fast);
}

.footer-nav-link::before {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}

.footer-nav-link:hover { color: #fff; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.footer-copyright { font-size: 12px; color: rgba(255,255,255,.4); }
.footer-copyright strong { color: rgba(255,255,255,.6); font-weight: 600; }

.footer-bottom-nav { display: flex; gap: var(--sp-5); }

.footer-bottom-nav a {
  font-size: 12px;
  color: rgba(255,255,255,.4);
  transition: color var(--trans-fast);
}

.footer-bottom-nav a:hover { color: rgba(255,255,255,.8); }

/* 푸터 하단 copyright 바 (CTA 배너 아래) */
.footer-copyright-bar {
  background: var(--color-navy-dark);
  border-top: 1px solid rgba(255,255,255,.08);
  padding-block: 20px;
}

/* ------------------------------------------------------------
   16. SUB-PAGE HERO
   ------------------------------------------------------------ */
.sub-hero {
  position: relative;
  height: 320px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-image: url('/images/sub-hero-common.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  background-color: #0A2545;
}

.sub-hero-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.sub-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
    rgba(10,37,69,.80) 0%,
    rgba(10,37,69,.55) 50%,
    rgba(10,37,69,.25) 100%);
  z-index: 1;
}

.sub-hero-content {
  position: relative;
  z-index: 2;
  padding-bottom: var(--sp-10);
  width: 100%;
}

/* 서브히어로 내부 공통 — 전체 너비, 가로 패딩, 세로 중앙 */
.sub-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-inline: max(64px, env(safe-area-inset-right, 64px));
  max-width: 1400px;
  margin-inline: auto;
}
.sub-hero-inner .wrap {
  padding-inline: 0;
  max-width: none;
}

.sub-hero-title {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--sp-3);
  line-height: 1.2;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  color: rgba(255,255,255,.65);
}

.breadcrumb-sep { font-size: 10px; opacity: .5; }

.breadcrumb a { color: rgba(255,255,255,.65); transition: color var(--trans-fast); }
.breadcrumb a:hover { color: #fff; }

.breadcrumb-current { color: rgba(255,255,255,.9); font-weight: 600; }

/* Sub page two-col layout */
.sub-container {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--sp-10);
  padding-block: var(--sp-12);
  align-items: start;
}

.sub-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.sub-sidebar-title {
  font-size: 16px;
  font-weight: 700;
  padding: var(--sp-4) var(--sp-5);
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.sub-sidebar-nav { border: 1px solid var(--color-border); border-top: none; }

.sub-sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--sp-5);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-2);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--trans-fast), color var(--trans-fast);
}

.sub-sidebar-link:last-child { border-bottom: none; }

.sub-sidebar-link:hover,
.sub-sidebar-link.active {
  background: var(--color-blue-sub);
  color: var(--color-accent);
  font-weight: 600;
}

.sub-sidebar-link svg { width: 12px; height: 12px; opacity: .4; }

.sub-content { min-width: 0; }

/* ------------------------------------------------------------
   17. FAQ ACCORDION
   ------------------------------------------------------------ */
.faq-list { display: flex; flex-direction: column; gap: var(--sp-3); }

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
}

.faq-item.open {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-sm);
}

.faq-q {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  background: var(--color-surface);
  transition: background var(--trans-fast);
  user-select: none;
}

.faq-item.open .faq-q {
  background: var(--color-blue-sub);
  color: var(--color-primary);
}

.faq-q-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-kanit);
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.faq-q-text { flex: 1; }

.faq-q-arrow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-text-3);
  transition: transform var(--trans-normal);
}

.faq-item.open .faq-q-arrow { transform: rotate(180deg); }

/* Smooth expand using grid trick */
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--trans-normal);
}

.faq-item.open .faq-a { grid-template-rows: 1fr; }

.faq-a-inner { overflow: hidden; }

.faq-a-content {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  font-size: 15px;
  color: var(--color-text-2);
  line-height: 1.8;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.faq-a-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-surface-2);
  color: var(--color-text-3);
  font-family: var(--font-kanit);
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ------------------------------------------------------------
   18. SECTIONS
   ------------------------------------------------------------ */
.section     { padding-block: var(--sp-20); }
.section-sm  { padding-block: var(--sp-12); }

.section-white { background: var(--color-surface); }
.section-light { background: var(--color-surface-2); }
.section-navy  { background: var(--color-navy-dark); color: #fff; }
.section-bg    { background: var(--color-bg); }

.divider { border: none; height: 1px; background: var(--color-border); }

/* ------------------------------------------------------------
   19. FORMS (shared)
   ------------------------------------------------------------ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}

.form-label { font-size: 14px; font-weight: 600; color: var(--color-text-2); }

.form-control {
  padding: 12px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--color-text);
  background: var(--color-surface);
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
}

.form-control:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(26,127,212,.15);
}

.form-control::placeholder { color: var(--color-text-3); }

textarea.form-control { resize: vertical; min-height: 120px; }

/* ------------------------------------------------------------
   20. TABLE (common)
   ------------------------------------------------------------ */
.tbl-basic { width: 100%; border-collapse: collapse; font-size: 14px; }

.tbl-basic thead th {
  background: var(--color-primary);
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
}

.tbl-basic tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-2);
  vertical-align: top;
}

.tbl-basic tbody tr:last-child td { border-bottom: none; }
.tbl-basic tbody tr:hover td { background: var(--color-blue-sub); }

/* ------------------------------------------------------------
   21. PAGINATION
   ------------------------------------------------------------ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-10);
}

.page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-2);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  transition: all var(--trans-fast);
  text-decoration: none;
}

.page-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-blue-sub);
}

.page-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ------------------------------------------------------------
   22. TOAST / ALERT
   ------------------------------------------------------------ */
.toast-wrap {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 260px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: var(--color-navy-dark);
  color: #fff;
  font-size: 14px;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  animation: toast-in .3s ease forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.toast.success { border-left: 4px solid #22c55e; }
.toast.error   { border-left: 4px solid #ef4444; }
.toast.info    { border-left: 4px solid var(--color-accent); }

/* ------------------------------------------------------------
   23. SCROLL ANIMATIONS (JS-triggered)
   ------------------------------------------------------------ */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in { opacity: 0; transition: opacity .6s ease; }
.fade-in.visible { opacity: 1; }

.delay-1 { transition-delay: .1s; }
.delay-2 { transition-delay: .2s; }
.delay-3 { transition-delay: .3s; }
.delay-4 { transition-delay: .4s; }
.delay-5 { transition-delay: .5s; }

/* ------------------------------------------------------------
   24. RESPONSIVE — TABLET (≤900px)
   ------------------------------------------------------------ */
@media (max-width: 900px) {
  /* 데스크톱 GNB(7개 메뉴)는 875px 이상 필요 → 900px 이하에서는 햄버거 메뉴로 전환
     (이전에는 767px 에서 전환돼 768~900px 구간에서 메뉴가 잘렸음) */
  .header-top { display: none; }
  .header-nav { display: none; }
  .hamburger { display: flex; }
  .header-actions .btn { display: none; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
  .ft-location-grid { grid-template-columns: 1fr; gap: 32px; }

  .sub-container { grid-template-columns: 1fr; }

  .sub-sidebar { position: static; }

  .right-sidebar { display: none; }
}

/* ------------------------------------------------------------
   25. RESPONSIVE — MOBILE (≤767px)
   ------------------------------------------------------------ */
@media (max-width: 767px) {
  /* Header */
  .header-top { display: none; }
  .header-middle .wrap { padding-inline: 16px; }
  .site-logo img { max-height: 40px; }
  .header-nav { display: none; }
  .hamburger { display: flex; }
  .header-actions .btn { display: none; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-8); }
  .ft-location-grid { grid-template-columns: 1fr; gap: 24px; padding-block: 40px 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* Sub-hero */
  .sub-hero { height: 200px; }
  .sub-hero-title { font-size: clamp(20px, 5vw, 28px); }

  /* Mobile tab */
  .mobile-tab { display: block; }
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }

  /* Section spacing */
  .section { padding-block: var(--sp-12); }

  /* Lift effect off on touch */
  .card:hover { transform: none; }

  .wrap { padding-inline: 16px; }
}

/* ------------------------------------------------------------
   26. RESPONSIVE — SMALL MOBILE (≤400px)
   ------------------------------------------------------------ */
@media (max-width: 400px) {
  body { font-size: 14px; }
  .wrap { padding-inline: 12px; }
  .btn  { padding: 10px 20px; font-size: 14px; }
  .mobile-tab-item { font-size: 9px; }
  .mobile-tab-item svg { width: 20px; height: 20px; }
  .sub-hero { height: 160px; }
  .faq-q { padding: var(--sp-4); font-size: 14px; }
  .faq-a-content { padding: var(--sp-4); font-size: 14px; }
}

/* ------------------------------------------------------------
   통합 FAQ (index.html 하단) — Admin > 통합 FAQ 에서 관리
   ------------------------------------------------------------ */
.site-faq { background: var(--color-surface-2); padding-block: 96px; }
.site-faq-inner { max-width: 960px; margin-inline: auto; padding-inline: 24px; }
.site-faq-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 28px; }
.site-faq-tab { font-size: 15px; font-weight: 600; color: var(--color-text-2); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 999px; padding: 9px 18px; transition: all .2s; }
.site-faq-tab:hover { color: var(--color-accent); border-color: var(--color-accent); }
.site-faq-tab.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.site-faq-list { display: flex; flex-direction: column; gap: 10px; }
.site-faq-item { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; overflow: hidden; }
.site-faq-q { width: 100%; display: flex; align-items: center; gap: 14px; padding: 20px 22px; text-align: left; }
.site-faq-mark { font-family: var(--font-kanit); font-size: 18px; font-weight: 700; color: var(--color-accent); flex-shrink: 0; width: 22px; }
.site-faq-mark.a { color: var(--color-navy-mid); }
.site-faq-qtext { flex: 1; font-size: 17px; font-weight: 600; color: var(--color-text); line-height: 1.55; }
.site-faq-chev { width: 10px; height: 10px; border-right: 2px solid var(--color-text-3); border-bottom: 2px solid var(--color-text-3); transform: rotate(45deg); transition: transform .25s; flex-shrink: 0; margin-right: 4px; }
.site-faq-q[aria-expanded="true"] .site-faq-chev { transform: rotate(-135deg); }
.site-faq-a { display: none; border-top: 1px solid var(--color-border); background: var(--color-surface-2); }
.site-faq-q[aria-expanded="true"] + .site-faq-a { display: block; }
.site-faq-a-inner { display: flex; gap: 14px; padding: 18px 22px 22px; }
.site-faq-a-inner p { font-size: 16px; line-height: 1.85; color: var(--color-text-2); margin: 0; }
@media (max-width: 767px) { .site-faq { padding-block: 64px; } .site-faq-q { padding: 16px 16px; } .site-faq-qtext { font-size: 16px; } }

/* ------------------------------------------------------------
   공통 스크롤 애니메이션 (reveal.js) — html.rv-js 가 있을 때만 숨김
   ------------------------------------------------------------ */
.rv-js .rv { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.22,.61,.36,1), transform .8s cubic-bezier(.22,.61,.36,1); will-change: opacity, transform; }
.rv-js .rv[data-rv="left"]  { transform: translateX(-36px); }
.rv-js .rv[data-rv="right"] { transform: translateX(36px); }
.rv-js .rv[data-rv="zoom"]  { transform: scale(.94) translateY(16px); }
.rv-js .rv.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv-js .rv { opacity: 1; transform: none; transition: none; } }

/* ------------------------------------------------------------
   모바일 — 데스크톱 기준으로 넣은 강제 줄바꿈(<br>) 해제
   (제목류는 의도된 줄나눔이므로 유지, 본문·설명문만 자연 줄바꿈)
   ------------------------------------------------------------ */
@media (max-width: 767px) {
  .ab-body br,
  .eq-showcase-desc br,
  .hero-sub-2 br,
  .section-desc br,
  .care-item p br,
  .care-panel-lead br,
  .sub-hero-desc br,
  .dz-lead br,
  .specialty-lead br { display: none; }
}

/* ------------------------------------------------------------
   지도 앱 바로가기 버튼 (카카오맵 · 네이버지도 · 티맵)
   ------------------------------------------------------------ */
.mapapp-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.mapapp-btn {
  flex: 1 1 0;
  min-width: 118px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1;
  color: var(--color-primary);
  text-decoration: none;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .12s;
  box-shadow: 0 1px 3px rgba(20,65,104,.08);
}
.mapapp-btn img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: block;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(20,65,104,.10);
}
.mapapp-btn span { white-space: nowrap; }
.mapapp-btn:hover { border-color: var(--color-accent); box-shadow: 0 3px 12px rgba(20,65,104,.16); }
.mapapp-btn:active { transform: translateY(1px); }
.mapapp-btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

@media (max-width: 480px) {
  .mapapp-btns { gap: 6px; }
  .mapapp-btn { font-size: 13px; padding: 9px 8px; min-width: 0; gap: 6px; border-radius: 10px; }
  .mapapp-btn img { width: 22px; height: 22px; }
}

/* 메인 FAQ 설명 문구 — PC/태블릿에서 한 줄 유지 */
@media (min-width: 768px) {
  .site-faq .section-desc { max-width: none; white-space: nowrap; }
}

/* ------------------------------------------------------------
   헤더 자리 미리 확보 (CLS 방지)
   헤더는 스크립트로 주입되므로, 주입 전까지 같은 높이의 빈 블록을 두어
   본문이 나중에 아래로 밀리지 않게 한다. 주입이 끝나면 body.hdr-ready 가
   붙으면서 이 블록은 사라진다 — 같은 프레임에서 교체되어 화면 떨림이 없다.
   높이는 실제 헤더 높이와 일치시킨다 (≤767: 68 / 768~900: 81 / ≥901: 170)
   ------------------------------------------------------------ */
body::before {
  content: '';
  display: block;
  height: 68px;
}
@media (min-width: 768px) { body::before { height: 81px; } }
@media (min-width: 901px) { body::before { height: 170px; } }
body.hdr-ready::before { display: none; }
