/**
 * hospital.css - 병원 홈페이지 공통 스타일
 * main.css를 베이스로, 병원 전용 컴포넌트 추가
 */

/* ============================================
   CSS 변수 재정의 (병원 테마)
   ============================================ */
:root {
    /* 서체 — 영문·숫자 Montserrat, 한글 TWayAir, 그 외 Pretendard (templates/layout.php 에서 로드). 한자는 Pretendard 에도 없어 시스템 서체가 받는다 */
    --font-sans:      'Montserrat', 'TWayAir', 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    /* 서브페이지 본문 — Pretendard 만 (영문·숫자도). 개별 요소가 Montserrat 를 지정한 곳은 그대로 */
    --font-sub:       'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    --primary:        #024287;   /* 메인컬러 — 새 프로젝트 브랜드 컬러로 교체 */
    --primary-dark:   #002751;   /* 메인컬러 다크 */
    --primary-light:  #2579B1;
    --secondary:      #524540;   /* 서브컬러: 골드 */
    --accent:         #024287;   /* CTA 골드(딥) */
    --text-dark:      #333;
    --text-mid:       #666;
    --text-light:     #888;
    --bg-light:       #F8FAFD;
    --bg-section:     #F0F4FA;
    --border:         #ddd;
    --white:          #fff;
    --shadow-sm:      0 2px 8px rgba(0,0,0,.08);
    --shadow-md:      0 4px 20px rgba(0,0,0,.12);
    --shadow-lg:      0 8px 40px rgba(0,0,0,.16);
    --radius-sm:      6px;
    --radius-md:      12px;
    --radius-lg:      20px;
    --header-height:  75px;
    --transition:     .25s ease;
}

/* ============================================
   전역 리셋 / 기본
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }

html { overflow-x: clip; }

body {
    margin: 0;
    font-family: var(--font-sans);
    font-weight: 500;   /* 기본 굵기 500 — 한글(TWayAir)은 Regular 한 굵기라 500 도 같은 모양, 영문(Montserrat)은 Medium */
    color: var(--text-dark);
    background: var(--white);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
/* 제목은 브라우저 기본 bold 를 쓰지 않는다 — 굵게 보일 곳만 각 규칙에서 명시한다 (강조 strong·b 는 그대로 700) */
h1, h2, h3, h4, h5, h6, th, dt { font-weight: 500; }
ul, ol { list-style: none; margin: 0; padding: 0; }

.section-inner { max-width: 1440px; margin: 0 auto; padding: 0 20px; }

/* ============================================
   반응형 줄바꿈 유틸 — <br class="br-m"> / <br class="br-pc">
   문장 줄바꿈 위치를 뷰포트별로 다르게 줄 때 사용 (모든 페이지 공용)
   - .br-m  : 모바일(767px 이하)에서만 줄바꿈
   - .br-pc : 데스크탑(768px 이상)에서만 줄바꿈
   ============================================ */
.br-m  { display: none; }
.br-pc { display: inline; }
@media (max-width: 767px) {
    .br-m  { display: inline; }
    .br-pc { display: none; }
}

/* ============================================
   공통 버튼
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 25px;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 500;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    white-space: nowrap;
}
.btn-primary {
    background: var(--text-dark);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}
.btn-outline {
    background: transparent;
    color: var(--text-mid);
    border: 1px solid var(--text-mid);
}
.btn-outline:hover {
    background: #333;
    border: 1px solid #333;
    color: var(--white);
    transform: translateY(-1px);
}
.btn-lg { padding: 16px 36px; font-size: 1.05rem; font-weight: 500;}

/* ============================================
   헤더 — 기본 투명, 호버/스크롤 시 흰 배경이 위에서 내려옴
   ============================================ */
.main-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    transition: transform .35s ease;
    /* 투명(배너 위) 상태 색상 — solid 상태에서 재정의 */
    --hd-text:   var(--white);
    --hd-logo:   var(--white);
    --hd-accent: #E4D2AB;
}
/* 아래로 스크롤 시 헤더 숨김 (JS: .nav-hidden 토글) */
.main-header.nav-hidden {
    transform: translateY(-100%);
    pointer-events: none;
}
.main-header.scrolled,
.main-header.mega-open {
    --hd-text:   var(--text-dark);
    --hd-logo:   var(--primary);
    --hd-accent: var(--accent);
}

/* 흰 배경 바 — 평상시 화면 위로 숨김, 호버/스크롤 시 커튼처럼 하강 */
.main-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: var(--header-height);
    background: var(--white);
    box-shadow: 0 2px 14px rgba(0,0,0,.08);
    z-index: 2;
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity .35s ease, transform .35s ease;
}
.main-header.scrolled::before,
.main-header.mega-open::before {
    opacity: 1;
    transform: translateY(0);
}

.header-inner {
    position: relative;
    z-index: 3; /* 흰 바(::before) 위에 렌더링 */
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.header-logo img { height: 35px; width: auto; transition: filter .3s ease; }
.main-header:not(.scrolled):not(.mega-open) .header-logo img {
    filter: brightness(0) invert(1); /* 투명 상태: 로고 흰색 처리 */
}
.logo-text {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--hd-logo);
    transition: color .3s ease;
}

/* 데스크톱 네비 — 우측(전체 메뉴 버튼 옆) 배치 */
.nav-desktop {
    margin-left: auto;
    margin-right: 60px;
}
.nav-list {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
}
.nav-item { position: relative; }

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    height: var(--header-height);
    padding: 0 18px;
    font-size: .98rem;
    font-weight: 500;
    white-space: nowrap;
    color: var(--hd-text);
    transition: color .3s ease;
}
/* 헤더 바 하단 밑줄 인디케이터 */
.nav-link::after {
    content: '';
    position: absolute;
    left: 18px; right: 18px;
    bottom: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .3s ease, background .3s ease;
}
.nav-link:hover { color: var(--accent); }
.nav-link.active { color: var(--accent); font-weight: 500; }
.nav-link.active::after { transform: scaleX(1); }

/* ── 메가 메뉴 — 페이드인 + 살짝 하강 ── */
.mega-menu {
    position: absolute;
    top: var(--header-height);
    left: 0; right: 0;
    background: var(--white);
    border-top: 1px solid #edf0f5;
    box-shadow: 0 18px 32px rgba(20,42,99,.1);
    padding: 44px 0 48px;
    z-index: 1;
    overflow: hidden; /* 워터마크 클리핑 */
    opacity: 0;
    transform: translateY(-14px);
    visibility: hidden;
    pointer-events: none;
    transition: opacity    .35s ease,
                transform  .35s ease,
                visibility 0s linear .35s;
}
/* 열림 상태 */
.main-header.mega-open .mega-menu {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition: opacity .35s ease, transform .35s ease;
}

.mega-inner {
    position: relative;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    gap: 56px;
    align-items: flex-start;
}

/* 워터마크 */
.mega-watermark {
    position: absolute;
    left: 4%;
    bottom: -34px;
    font-size: 150px;
    font-weight: 900;
    letter-spacing: .02em;
    color: rgba(31, 60, 136, .05);
    pointer-events: none;
    user-select: none;
    line-height: 1;
}

/* 호버한 카테고리의 그룹만 표시 */
.mega-groups { flex: 1; min-width: 0; }
.mega-group { display: none; }
.mega-group.active {
    display: flex;
    gap: 56px;
    animation: megaGroupIn .3s ease both;
}
@keyframes megaGroupIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 좌측: 1차 카테고리명 + 설명 */
.mega-intro {
    flex: 0 0 230px;
}
.mega-intro-title {
    font-size: 1.7rem;
    font-weight: 500;
    color: var(--text-dark);
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}
.mega-intro-desc {
    font-size: .9rem;
    color: var(--text-mid);
    line-height: 1.7;
}

/* ── 헤더 진료예약 버튼 (검색 아이콘 자리) ── */
.header-cta { display: flex; align-items: center; gap: 40px; }   /* 진료예약 버튼 + 삼선 — 버튼은 삼선에서 40px 왼쪽 */
.nav-book-btn {
    display: inline-flex; align-items: center; gap: 7px;
    height: 40px; padding: 0 18px; border-radius: 999px;
    background: var(--primary); color: #fff;
    font-size: .9rem; font-weight: 500; white-space: nowrap;
    transition: background .2s, color .2s, transform .2s;
}
.nav-book-btn i { font-size: .95rem; }
.nav-book-btn:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }
/* 투명 헤더(배너 위)에서는 흰 버튼 + 브랜드색 글자 */
.main-header:not(.scrolled):not(.mega-open) .nav-book-btn { background: #fff; color: var(--primary); }
.main-header:not(.scrolled):not(.mega-open) .nav-book-btn:hover { background: var(--primary); color: #fff; }

/* ── 증상 검색 띠 (메가 패널 상단) ── */
.mega-search {
    max-width: 1440px; margin: 0 auto 26px; padding: 0 28px;
    display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
.mega-search-form { flex: 1 1 420px; min-width: 0; }
.mega-search-box {
    display: flex; align-items: center; gap: 12px;
    padding: 0 18px; height: 54px; border-radius: 999px;
    background: #F1F5FA; border: 1.5px solid transparent;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.mega-search-box:focus-within { background: #fff; box-shadow: 0 6px 24px rgba(2, 66, 135, .14); }   /* 포커스 표시는 그림자만 — 테두리·아웃라인 없음 */
.mega-search-box > i { color: var(--primary); font-size: 1.05rem; }
.mega-search-input {
    flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: 0;
    font: inherit; font-size: .88rem; color: var(--text-dark); font-weight: 400;
}
.mega-search-input:focus,
.mega-search-input:focus-visible { outline: none; box-shadow: none; }   /* 전역 :focus-visible 아웃라인(3px)보다 우선 */
.mega-search-input::placeholder { color: #8A94A6; }
.mega-search-input::-webkit-search-cancel-button { display: none; }
.mega-search-clear { color: #8A94A6; font-size: .85rem; padding: 6px; }
.mega-search-clear:hover { color: var(--text-dark); }
.mega-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mega-chips-label { font-size: .8rem; color: var(--text-mid); margin-right: 4px; }
.mega-chip {
    padding: 7px 14px; border-radius: 999px; font-size: .84rem;
    border: 1px solid #D5DEEA; color: var(--text-dark); background: #fff;
    transition: all .2s;
}
.mega-chip:hover { border-color: var(--primary); color: var(--primary); background: #F1F5FA; }
.mega-results { max-width: 1440px; margin: 0 auto; padding: 0 28px; }
.mega-results-head { font-size: .82rem; color: var(--text-mid); margin: 0 0 12px; }
.mega-results-list {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 20px;
}
.mega-results-list a {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    padding: 11px 14px; border-radius: 10px; background: #F7F9FC; color: var(--text-dark);
    transition: background .2s, color .2s;
}
.mega-results-list a:hover { background: var(--primary); color: #fff; }
.mega-results-list .r-title { font-size: .85rem; }
.mega-results-list .r-tag { font-size: .74rem; opacity: .6; white-space: nowrap; }
/* 제목이 아니라 병·증상 단어로 걸렸을 때 그 단어를 보여 준다 (예: "두근거림" → 자율신경실조) */
.mega-results-list .r-hit { flex: none; padding: 2px 8px; border-radius: 999px; background: rgba(2, 66, 135, .08); color: var(--primary); font-size: .72rem; }
.mega-results-list a:hover .r-hit { background: rgba(255, 255, 255, .22); color: #fff; }
.mega-results-list .r-hit[hidden] { display: none; }
.mega-results-empty { margin: 8px 0 0; font-size: .9rem; color: var(--text-mid); }
.mega-results-empty a { color: var(--primary); font-weight: 600; font-size: 1rem;}
.mega-menu.is-searching .mega-inner { display: none; }

/* 모바일 메뉴 상단 검색 */
.mobile-search { padding: 0 0 18px; }
.mobile-search .mega-search-box { height: 48px; }
.mobile-search .mega-results { padding: 14px 0 0; }
.mobile-search .mega-results-list { grid-template-columns: 1fr; }

/* 중앙: 그룹 열 (진료 클리닉 — 그룹마다 한 열, 제목 + 링크 목록) */
.mega-cols {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px 28px;
    align-content: start;
}
.mega-cols-2 { grid-template-columns: repeat(2, 1fr); }
.mega-cols-3 { grid-template-columns: repeat(3, 1fr); }
.mega-col-title {
    display: block;
    padding: 0 0 10px;
    margin-bottom: 8px;
    border-bottom: 2px solid var(--primary);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
}
.mega-col-title:hover { color: var(--primary); }
.mega-col-list { list-style: none; margin: 0; padding: 0; }
.mega-col-list a {
    display: block;
    padding: 6px 0;
    font-size: .9rem;
    color: var(--text-mid);
    transition: color .2s, padding-left .2s;
}
.mega-col-list a:hover,
.mega-col-list a.active { color: var(--primary); padding-left: 4px; }

/* 중앙: 서브메뉴 박스 2열 */
.mega-boxes {
    flex: 1;
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 14px;
    align-content: start;
}
.mega-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 17px 22px;
    border-bottom: 1px solid #E3E6ED;
    font-size: .92rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: border-color .2s, color .2s, box-shadow .2s;
}
.mega-box i {
    font-size: .7rem;
    color: #B6BCC9;
    transition: color .2s, transform .2s;
}
.mega-box:hover,
.mega-box.active {
    border-color: var(--accent); /* 아이콘(>)과 동일한 골드 */
    color: var(--accent);
    /*box-shadow: 0 4px 14px rgba(31,60,136,.08);*/
}
.mega-box:hover i,
.mega-box.active i {
    color: var(--accent);
    transform: translateX(3px);
}

/* 우측: 문의 및 상담 (고정 블록) */
.mega-side {
    flex: 0 0 300px;
    padding-left: 44px;
    border-left: 1px solid #EEF0F4;
}
.mega-side-label {
    font-size: .95rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 6px;
}
.mega-side-phone {
    display: block;
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: .01em;
    color: var(--primary);
    transition: color .2s;
}
.mega-side-phone:hover { color: var(--primary-dark); }
.mega-side-hours {
    list-style: none;
    padding: 0;
}
.mega-side-hours li {
    display: flex;
    gap: 14px;
    font-size: .88rem;
    padding: 3px 0;
}
.mega-hours-label {
    flex: 0 0 auto;
    min-width: 64px;   /* "월·수·금" 폭 */
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: var(--text-dark);
}
.mega-hours-value { color: var(--text-mid); }

/* 일요일 진료 강조 */
.mega-side-hours li.is-sunday .mega-hours-label,
.mega-side-hours li.is-sunday .mega-hours-value { color: var(--accent); font-weight: 700; }
.mega-hours-badge {
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--white);
    font-size: .62rem;
    font-weight: 700;
    font-style: normal;
    letter-spacing: .02em;
    line-height: 1.6;
}
.mega-side-note {
    font-size: .8rem;
    color: #9CA3AF;
    margin-bottom: 16px;
}
.mega-side-sns {
    display: flex;
    gap: 16px;
}
/* 박스 없이 아이콘만 브랜드 컬러로 표시 */
.mega-sns {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    line-height: 1;
    transition: transform .2s;
}
.mega-sns:hover { transform: translateY(-2px); }
.mega-sns--kakao img {
    width: 26px;
    /* 흰색 SVG → #301D1E 틴트 */
    filter: brightness(0) saturate(100%) invert(10%) sepia(9%) saturate(1900%) hue-rotate(314deg) brightness(96%) contrast(92%);
}
/* hover 시 전역 a:hover 색 변경 무시 — 브랜드 컬러 고정 */
.mega-sns--insta,
.mega-sns--insta:hover { color: #E4405F; }
.mega-sns--blog img {
    width: 26px;
    /* 흰색 SVG → 네이버 그린 틴트 */
    filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(114deg) brightness(97%) contrast(98%);
}

/* 호버 시 nav-link 활성 표시 — 밑줄 인디케이터 */
.nav-item.mega-active .nav-link { color: var(--hd-accent); }
.nav-item.mega-active .nav-link::after { transform: scaleX(1); }

/* 투명(배경 없음) 상태: 밑줄은 유지하되 텍스트는 흰색 유지 */
.main-header:not(.scrolled):not(.mega-open) .nav-link:hover,
.main-header:not(.scrolled):not(.mega-open) .nav-link.active,
.main-header:not(.scrolled):not(.mega-open) .nav-item.mega-active .nav-link {
    color: var(--white);
}
.main-header:not(.scrolled):not(.mega-open) .nav-link::after {
    background: #fff;
}

/* 헤더 CTA */
.header-cta {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-shrink: 0;
}

/* 데스크탑 전체 메뉴(사이트맵) 햄버거 */
.fullmenu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 6px;
    width: 40px;
    height: 40px;
    padding: 6px;
    background: none;
    border: none;
    cursor: pointer;
}
.fullmenu-btn span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--hd-text);
    border-radius: 2px;
    transition: background .3s ease, width .25s ease;
}
.fullmenu-btn span:nth-child(2) { width: 18px; }
.fullmenu-btn:hover span { width: 26px; background: var(--hd-accent); }

/* ── 전체 사이트맵 오버레이 — 좌측에서 슬라이드 ── */
.sitemap-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    /* 뒤 화면이 비치는 어두운 반투명 오버레이 — 가운데 흰 패널 (등장: 삼선 버튼 자리에서 원이 퍼짐) */
    background: rgba(0, 0, 0, .72);
    /* backdrop-filter 는 두지 않는다 — 전체 화면 고정 레이어에 걸면 뒤 화면이 바뀔 때마다(히어로 페이드·배너 워터마크) 화면 전체를 다시 블러해 GPU 부하가 컸음 (2026-09-11) */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    clip-path: circle(0px at calc(100% - 72px) 40px);
    visibility: hidden;
    transition: clip-path .75s cubic-bezier(.65, 0, .3, 1),
                visibility 0s linear .75s;
}
.sitemap-overlay.open {
    clip-path: circle(160% at calc(100% - 72px) 40px);
    visibility: visible;
    transition: clip-path .75s cubic-bezier(.65, 0, .3, 1);
}
.sitemap-panel {
    position: relative;
    width: 100%;
    max-width: 1600px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    background: var(--white);
    color: var(--text-dark);
    border-top: 4px solid var(--primary);
    padding: 40px 56px 44px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.sitemap-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 44px;
}
.sitemap-logo img { height: 44px; width: auto; }
.sitemap-logo span { font-size: 1.5rem; font-weight: 500; color: var(--primary); }
.sitemap-close {
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    padding: 4px 10px;
    transition: color .2s, transform .3s;
}
.sitemap-close:hover { color: var(--primary); transform: rotate(90deg); }

/* 열 — 왼쪽 세로 구분선, 제목 앞 브랜드색 바 */
.sitemap-grid {
    display: grid;
    grid-template-columns: repeat(var(--cols, 6), 1fr);
    gap: 0 32px;
}
.sitemap-col {
    padding-left: 22px;
    border-left: 1px solid #E5E8EE;
    opacity: 0;
    transform: translateY(10px);
}
.sitemap-overlay.open .sitemap-col {
    animation: sitemapColIn .45s ease forwards;
    animation-delay: calc(.35s + var(--i, 0) * .05s);   /* 원이 퍼진 뒤 열 순서(--i)대로 순차 등장 */
}
@keyframes sitemapColIn {
    to { opacity: 1; transform: translateY(0); }
}
.sitemap-col-title {
    position: relative;
    display: block;
    font-size: 1.12rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 16px;
    transition: color .2s;
}
.sitemap-col-title::before {
    content: '';
    position: absolute; left: -22px; top: 4px; bottom: 4px;
    width: 3px; background: var(--primary);
}
.sitemap-col-title:hover { color: var(--primary); }
.sitemap-col-list { list-style: none; margin: 0; padding: 0; }
.sitemap-col-list li + li { margin-top: 2px; }
.sitemap-link {
    display: block;
    padding: 4px 0;
    font-size: .9rem;
    font-weight: 500;
    color: var(--text-mid);
    transition: color .2s, padding-left .2s;
}
.sitemap-link:hover { color: var(--primary); padding-left: 6px; }

/* 그룹 메뉴 띠 (진료 클리닉) */
.sitemap-band { margin-top: 36px; padding-top: 30px; border-top: 1px solid #E5E8EE; }
.sitemap-band-title {
    display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px;
    font-size: 1.3rem; font-weight: 500; color: var(--text-dark);
}
.sitemap-band-title span { font-size: .8rem; color: var(--text-mid); }
.sitemap-band-title:hover { color: var(--primary); }

.sitemap-foot {
    display: flex;
    align-items: baseline;
    justify-content: center;   /* 전화번호 가운데 */
    gap: 24px;
    margin-top: 40px;
    padding-top: 22px;
    border-top: 1px solid #E5E8EE;
    color: var(--text-mid);
    font-size: .88rem;
}
.sitemap-foot-phone { color: var(--primary); font-size: 1.25rem; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }

/* 햄버거 버튼
   선 세 개를 flex gap 이 아니라 정수 픽셀 위치에 직접 놓는다(2026-09-30).
   gap 을 모르는 브라우저(iOS 14.0 이하 Safari·옛 삼성 인터넷)에서는 간격이 0 이 되어 세 선이 두꺼운 선 하나로 붙어 보였다.
   높이 37px(홀수) — 헤더 65·75px 에서 세로 가운데가 정수 위치가 되어 선이 반 픽셀에 걸려 흐려지지 않는다 */
.hamburger-btn {
    display: none;
    position: relative;
    width: 36px;
    height: 37px;
    padding: 0;
    margin-left: auto;
    border: 0;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
}
.hamburger-btn span {
    position: absolute;
    left: 4px;
    right: 4px;
    display: block;
    height: 2px;
    background: var(--hd-text);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}
.hamburger-btn span:nth-child(1) { top: 11px; }
.hamburger-btn span:nth-child(2) { top: 18px; }
.hamburger-btn span:nth-child(3) { top: 25px; }
.hamburger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; }
.hamburger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 모바일 슬라이드 메뉴 */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1001;
}
.mobile-nav-overlay.open { display: block; }

.mobile-nav-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(480px, 100vw);  /* 모바일은 화면 전체를 덮고, 태블릿 이상에서는 최대 480px */
    height: 100%;
    background: var(--white);
    z-index: 1002;
    overflow-y: auto;
    transform: translateX(105%);
    transition: transform .3s ease;
    display: flex;
    flex-direction: column;
}
.mobile-nav-panel.open { transform: none; }

.mobile-nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 15px;
    border-bottom: 1px solid var(--border);
}
.mobile-nav-logo { height: 25px; }
.mobile-logo-text { font-size: 1.1rem; font-weight: 800; color: var(--primary); }
.mobile-nav-close {
    font-size: 2.2rem;
    color: var(--text-mid);
    line-height: 1;
    border: none;
    background: none;
    padding: 0;
}

.mobile-nav-list { padding: 0; flex: 1; }
.mobile-nav-item { border-bottom: 1px solid var(--border); }

.mobile-nav-row {
    display: flex;
    align-items: center;
}
.mobile-nav-row .mobile-nav-link {
    flex: 1;
    justify-content: flex-start;
    padding-right: 8px;
}
.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    text-align: left;
    transition: color var(--transition);
}
@media (hover: hover) {
    .mobile-nav-link:hover { color: var(--primary); }
}
.mobile-nav-link.active { color: var(--primary); }
.mobile-nav-toggle {
    flex-shrink: 0;
    padding: 14px 16px 14px 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: .85rem;
}
.mobile-nav-toggle .bi-chevron-down { transition: transform var(--transition); }
.mobile-nav-toggle[aria-expanded="true"] .bi-chevron-down { transform: rotate(180deg); }

.mobile-sub-menu {
    max-height: 0;
    overflow: hidden;
    background: var(--bg-light);
    transition: max-height .38s cubic-bezier(.4,0,.2,1);
}
.mobile-sub-link {
    display: block;
    padding: 10px 20px 10px 36px;
    font-size: .9rem;
    color: var(--text-mid);
}
.mobile-sub-menu li:first-child .mobile-sub-link { padding-top: 15px; }
.mobile-sub-menu li:last-child .mobile-sub-link { padding-bottom: 15px; }
.mobile-sub-link:hover { color: var(--accent); }
.mobile-sub-link.active { color: var(--accent); font-weight: 500; }

/* 모바일 메뉴 하단: 데스크탑 mega-side와 동일 콘텐츠 (mega-side-* 클래스 재사용) */
.mobile-nav-cta {
    padding: 14px 20px 16px;
    /*border-top: 1px solid var(--border);*/
}
.mobile-nav-cta .mega-side-label { margin-bottom: 2px; }
.mobile-nav-cta .mega-side-phone { font-size: 1.5rem; margin-bottom: 8px; }
.mobile-nav-cta .mega-side-hours { margin-bottom: 6px; display: flex; flex-direction: column; gap: 2px; }   /* 월·수·금 / 화·목 / 토 (같은 시간끼리 묶은 3줄) */
.mobile-nav-cta .mega-side-hours li { padding: 1px 0; font-size: .84rem; }
.mobile-nav-cta .mega-side-note { margin-bottom: 10px; }

/* ============================================
   페이지 배너 (브레드크럼)
   ============================================ */
.page-banner {
    /*margin-top: var(--header-height);*/
    position: relative;
    background: none;
    color: var(--white);
    padding: 200px 0 180px;
    /* overflow:hidden 금지 — 하단 바 드롭다운 패널이 배너 밖으로 펼쳐짐 */
}
/* 그라디언트 레이어 (opacity 0.9) */
.page-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    opacity: 1;
    z-index: 0;
    pointer-events: none;
}
/* 배경 장식 레이어 (병원 사진 확보 전: 은은한 라이트 패턴) */
.page-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 85% 20%, rgba(200,169,106,.28) 0, transparent 35%),
        radial-gradient(circle at 10% 90%, rgba(255,255,255,.1) 0, transparent 40%);
    z-index: 1;
    pointer-events: none;
}

/* ── 배너 사진 (images/banner/banner_{slug}.webp|jpg|png 존재 시) ── */
.banner-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

/* ── 배너 사진이 있으면: 그라디언트 대신 어두운 오버레이 (카테고리 변형보다 우선) ── */
body .page-banner.has-photo::before {
    background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.25) 55%, rgba(0,0,0,.4) 100%);
    z-index: 1;
}
body .page-banner.has-photo::after { display: none; }

.page-banner-inner {
    position: relative;
    z-index: 2;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}
.page-banner-title {
    font-family: var(--font-sans);
    font-size: 2.5rem;
    font-weight: 500;
    margin: 0.67em 0 12px; /* <p> 로 변경 — 기존 <h1> 기본 상단 마진 유지 */
    text-align: center;
}

/* ── 배너 하단 바: 브레드크럼(좌) + 서브네비 드롭다운(우) — 배너 위에 플로팅 ── */
.banner-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18px;
    z-index: 5;
}
.banner-bar-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.banner-dds {
    display: flex;
    gap: 14px;
}
.banner-dd {
    position: relative;
    width: 300px;
    height: 48px;
}
.banner-dd-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    height: 100%;
    padding: 0 18px;
    border: none;
    border-radius: 4px;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(10px);
    color: var(--white);
    font-size: .9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: background .25s ease;
}
.banner-dd-trigger:hover,
.banner-dd.open .banner-dd-trigger { background: rgba(0, 0, 0, .6); }
.banner-dd-trigger i {
    font-size: .7rem;
    color: rgba(255, 255, 255, .85);
    transition: transform .25s ease;
}
.banner-dd.open .banner-dd-trigger i { transform: rotate(180deg); }
.banner-dd-list {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: 4px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
    z-index: 10;
}
.banner-dd.open .banner-dd-list {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity .25s ease, transform .25s ease;
}
.banner-dd-list a {
    display: block;
    padding: 10px 18px;
    font-size: .88rem;
    color: var(--text-mid);
    transition: background var(--transition), color var(--transition);
}
.banner-dd-list a:hover { background: var(--bg-light); color: var(--accent); }
.banner-dd-list a.active { color: var(--accent); font-weight: 500; }

/* 배너 하단 바 모바일(900 이하): 브레드크럼 위, 드롭다운 50/50 아래 */
@media (max-width: 900px) {
    .page-banner-title {
        font-size: 2rem;
    }
    .banner-bar { bottom: 14px; }
    .banner-bar-inner {
        flex-wrap: wrap;
        gap: 0;
        padding: 0 16px;
    }
    .banner-bar-inner .breadcrumb { display: none; }
    .banner-dds {
        width: 100%;
        gap: 10px;
    }
    .banner-dd {
        width: auto;
        flex: 1;
        height: 44px;
    }
}

.breadcrumb-list { display: flex; align-items: center; gap: 6px; }
/* 브레드크럼은 배너 제목 위 가운데 (배너 하단 바에는 드롭다운만 남아 우측 정렬) */
.page-banner-inner .breadcrumb { margin-bottom: 14px; }
.page-banner-inner .breadcrumb-list { justify-content: center; }
.page-banner-inner + .banner-bar .banner-bar-inner { justify-content: center; }   /* 드롭다운 가운데 */
.page-banner-title { margin-top: 0; }
.breadcrumb-item { display: flex; align-items: center; gap: 6px; }
.breadcrumb-link {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .82rem;
    color: rgba(255,255,255,.75);
    transition: color var(--transition);
}
.breadcrumb-link:hover { color: var(--white); }
.breadcrumb-item.current span { font-size: .82rem; color: var(--white); font-weight: 500; }
.breadcrumb-sep { color: rgba(255,255,255,.5); font-size: .7rem; }

/* ============================================
   서브페이지 공통 레이아웃
   ============================================ */
.subpage-content {
    padding: 50px 0 130px;
}
.subpage-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 콘텐츠 준비중 */
.coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    color: var(--text-light);
}
.coming-soon i {
    font-size: 4rem;
    color: var(--border);
    margin-bottom: 20px;
}
.coming-soon h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-mid);
    margin-bottom: 8px;
}

/* ============================================
   공지사항
   ============================================ */

/* 글이 적어도 콘텐츠 영역이 무너지지 않도록 기본 높이 확보 (목록·상세 공통) */
.notice-page { min-height: 800px; }

/* 카테고리 탭 */
.notice-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.notice-tab {
    padding: 7px 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: .88rem;
    font-weight: 500;
    color: var(--text-mid);
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.notice-tab:hover { border-color: var(--primary); color: var(--primary); }
.notice-tab.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* 카테고리 뱃지 */
.notice-cat-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: .75rem;
    font-weight: 600;
}
.notice-cat-notice     { background: #e8f0fe; color: #1a6eb5; }
.notice-cat-health_info{ background: #e6f9f0; color: #1a7a4a; }
.notice-cat-event      { background: #fff3e0; color: #c66b00; }

/* 목록 테이블 */
.notice-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.1rem;
}
.notice-table thead th {
    padding: 15px 14px;
    border-top: 1px solid var(--primary);
    border-bottom: 1px solid var(--primary);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    text-align: center;
}
.notice-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
.notice-table tbody tr:hover { background: #f5f8ff; }
.notice-table tbody td { padding: 14px; vertical-align: middle; }
.notice-title-link {
    color: var(--text-dark);
    font-weight: 500;
    transition: color var(--transition);
}
.notice-title-link:hover { color: var(--primary); }
.notice-date, .notice-views { font-size: 1rem; color: var(--text-light); text-align: center; }
.notice-row-pinned { background: #f8fafc; }
.notice-row-pinned:hover { background: #fff5e0 !important; }
.notice-pin-badge {
    display: inline-block;
    padding: 3px 10px;
    background: #b03a2e;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    border-radius: 3px;
}

/* 빈 목록 */
.notice-empty {
    padding: 80px 20px;
    text-align: center;
    color: var(--text-light);
}
.notice-empty i { font-size: 3rem; color: var(--border); display: block; margin-bottom: 16px; }

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 32px;
}
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .88rem;
    color: var(--text-mid);
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* 상세 페이지 */
.notice-detail-head {
    padding-bottom: 24px;
    border-bottom: 2px solid var(--text-mid);
    margin-bottom: 32px;
}
.notice-detail-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 12px 0 10px;
    line-height: 1.4;
}
.notice-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    font-size: .82rem;
    color: var(--text-light);
}
.notice-detail-meta > span { white-space: nowrap; }
.notice-detail-meta i { margin-right: 4px; }
.notice-detail-body {
    line-height: 1.85;
    font-size: .95rem;
    color: var(--text-dark);
    min-height: 200px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}
.notice-detail-body img { max-width: 100%; height: auto;}

/* Quill 에디터 정렬 클래스 — 프론트엔드 렌더링용 */
.notice-detail-body .ql-align-center  { text-align: center; }
.notice-detail-body .ql-align-right   { text-align: right; }
.notice-detail-body .ql-align-justify { text-align: justify; }
.notice-detail-body .ql-indent-1 { padding-left: 3em; }
.notice-detail-body .ql-indent-2 { padding-left: 6em; }
/* img는 전역 display:block 리셋 때문에 text-align이 적용 안됨 → inline-block으로 override */
.notice-detail-body .ql-align-center img,
.notice-detail-body .ql-align-right  img { display: inline-block; }

/* 이전/다음 글 */
.notice-nav { margin: 0 0 32px; }
.notice-nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: .9rem;
    color: var(--text-dark);
    transition: background var(--transition);
}
.notice-nav-item:hover { background: #f5f8ff; }
.notice-nav-empty {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: .88rem;
    color: var(--text-light);
}
.notice-nav-label {
    font-size: .78rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    min-width: 60px;
}
.notice-nav-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   섹션 공통
   ============================================ */
.section { padding: 100px 0; }
.section:first-child { padding-top: 0; }

.section-header {
    text-align: center;
    margin-bottom: 40px;
}
.section-kicker {
    font-size: .78rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: .15em;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.section-title {
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 14px;
    line-height: 1.3;
}
.section-desc {
    font-size: .98rem;
    color: var(--text-light);
    max-width: 520px;
    margin: 0 auto;
}
.section-more {
    text-align: center;
    margin-top: 48px;
}

/* ============================================
   플로팅 퀵메뉴
   ============================================ */
.quick-menu {
    position: fixed;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 900;
    width: 85px;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(2, 66, 135, .28);
    /* 참사랑 브랜드 블루 세로 그라데이션 — 위 밝은 하늘빛 → 메인 → 아래 딥 네이비 */
    background: linear-gradient(180deg, #2FA6D8 0%, var(--primary-light) 26%, var(--primary) 62%, var(--primary-dark) 100%);
    /* 처음엔 숨기고 스크롤이 400px 넘으면 나타남 (js/site/quick-menu-reveal.js 가 .visible 토글, TOP 버튼과 같은 기준) */
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(16px);
    transition: opacity .35s ease, transform .35s ease;
}
.quick-menu.visible { opacity: 1; pointer-events: auto; transform: translateY(-50%); }

/* 항상 펼쳐진 아이템 영역 */
.quick-menu-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.quick-menu-items li{padding: 5px 0;}

/* 개별 아이템 링크/버튼 */
.quick-menu-item-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
    padding: 8px;
    color: rgba(255,255,255,.8);
    font-size: .75rem;
    font-weight: 400;
    letter-spacing: .02em;
    font-family: inherit;
    line-height: 1.4; /* a/button 기본 line-height 차이 통일 */
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}
.quick-menu-items li:first-child .quick-menu-item-link {padding-top: 15px;}
.quick-menu-items li:last-child .quick-menu-item-link {padding-bottom: 25px;}
.quick-menu-item-link:hover { color: #fff; background: rgba(255,255,255,.1); }
.quick-menu-item-link i { font-size: 1.4rem; line-height: 1; }
/* SVG 아이콘은 CSS color가 안 먹으므로 opacity로 hover 밝기 동기화 */
.quick-menu-item-link img { width: 30px; opacity: .8; transition: opacity .3s ease; }
.quick-menu-item-link:hover img { opacity: 1; }

/* 트리거 버튼 (퀵메뉴가 항상 펼쳐져 있으므로 숨김) */
.quick-menu-trigger { display: none; }

/* 모바일 하단 고정 CTA */
.mobile-fixed-cta {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 900;
    background: transparent;
    box-shadow: 0 -5px 18px rgba(0, 0, 0, .16);
    transform: translateY(100%);
    transition: transform .35s ease;
}
.mobile-fixed-cta.visible { transform: translateY(0); }
/* 참사랑: 스크롤과 무관하게 항상 고정 표시 (뼈대의 스크롤 후 등장 동작을 끔) */
.mobile-fixed-cta { transform: none; }
.mobile-cta-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 8px 4px 8px 4px;
    font-size: .72rem;
    font-weight: 500;
    color: var(--text-mid);
    transition: color var(--transition);
    border: none;
    background: none;
    font-family: inherit;
}
.mobile-cta-btn { line-height: 1.4; } /* a/button 기본 line-height 차이 통일 */
.mobile-cta-btn i { font-size: 1.3rem; line-height: 1; height: 25px; display: flex; align-items: center; }
.mobile-cta-btn img { height: 25px; }
/* 모바일 하단 바 — 진료시간(남색 칸) · 전화문의 · 예약하기 · 네이버 톡톡 (2026-09-30 사용자 시안)
   흰 바탕, 남색 아이콘·글자, 뒤 세 칸 사이 가는 세로선. 아이콘은 인라인 SVG(currentColor) */
.mobile-fixed-cta { background: #fff; box-shadow: 0 -4px 16px rgba(2, 66, 135, .08); }
.mobile-cta-btn {
    position: relative;
    gap: 6px;
    padding: 12px 4px 11px;
    font-size: .8rem;
    letter-spacing: -.01em;
    color: var(--primary);
    background: #fff;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}
.mobile-cta-btn svg { display: block; width: 26px; height: 26px; flex: none; }
.mobile-cta-btn:hover, .mobile-cta-btn:focus { color: var(--primary); }
/* 뒤 칸 사이 세로선(전화|예약|톡톡) — 남색 칸 바로 옆에는 두지 않는다. 옛 브라우저도 알도록 단순 선택자 */
.mobile-cta-btn--booking::before,
.mobile-cta-btn--talk::before {
    content: ''; position: absolute; left: 0; top: 16px; bottom: 16px; width: 1px; background: #DDE3EA;
}
.mobile-cta-btn--hours { background: var(--primary); color: #fff; }
.mobile-cta-btn--hours:hover, .mobile-cta-btn--hours:focus { color: #fff; }
.mobile-cta-btn--hours[aria-expanded="true"] { background: #01356D; }
/* 진료시간 안내 — 바 바로 위에 열림 */
.mobile-hours {
    position: absolute; left: 12px; right: 12px; bottom: calc(100% + 10px);
    padding: 18px 20px 16px; border-radius: 16px; background: #fff;
    box-shadow: 0 10px 30px rgba(2, 66, 135, .18); color: var(--text-dark);
}
.mobile-hours[hidden] { display: none; }
.mobile-fixed-cta.is-hours-open { z-index: 902; }   /* 안내가 열린 동안 맨 위로 버튼(901)보다 위 */
.mobile-hours-title { margin: 0 0 10px; font-size: .92rem; color: var(--primary); }
.mobile-hours-list { margin: 0; display: grid; gap: 6px; }
.mobile-hours-list > div { display: flex; justify-content: space-between; gap: 12px; font-size: .92rem; }
.mobile-hours-list dd { margin: 0; font-family: 'Montserrat', sans-serif; font-weight: 500; }
.mobile-hours-note { margin: 10px 0 0; font-size: .8rem; color: var(--text-mid); }

/* 맨 위로 */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 80px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-dark);
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 901;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-3px); }
.back-to-top-label { display: none; }
/* 데스크톱: 퀵메뉴와 한 세트 — 같은 폭의 흰 사각 박스, 퀵메뉴 바로 아래(세로 위치는 main.js 가 맞춤), 항상 표시 */
@media (min-width: 1024px) {
    .back-to-top {
        right: 10px;
        width: 85px;               /* .quick-menu 와 같은 폭 */
        height: 76px;
        border-radius: 0;
        background: #fff;
        color: var(--primary);
        flex-direction: column;
        gap: 4px;
        box-shadow: 0 10px 28px rgba(2, 66, 135, .18);   /* 표시 여부는 .visible(스크롤 400px) — 퀵메뉴와 함께 나타남 */
        transform: translateX(16px);                       /* 퀵메뉴와 같은 전환(시간·방향) */
        transition: opacity .35s ease, transform .35s ease;
    }
    .back-to-top.visible { transform: none; }
    .back-to-top svg { width: 22px; height: 22px; }
    .back-to-top-label { display: block; font-size: .72rem; letter-spacing: .06em; font-weight: 500; }
    .back-to-top:hover { transform: none; background: var(--primary); color: #fff; }
}

/* 푸터 스타일은 css/site/footer.css (참사랑 전용 디자인) */

/* ============================================
   상담 모달
   ============================================ */
.consultation-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.consultation-modal.open { display: flex; }

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 16px;
    border-bottom: 1px solid var(--border);
}
.modal-header h2 { font-size: 1.15rem; font-weight: 800; }
.modal-close {
    color: var(--text-light);
    transition: color var(--transition);
}
.modal-close:hover { color: var(--text-dark); }
.modal-body { padding: 24px 28px 28px; }

.modal-contact-info { margin-bottom: 20px; text-align: center; }
.modal-contact-label { font-size: .78rem; color: var(--text-light); display: block; margin-bottom: 4px; }
.modal-contact-phone {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}
.modal-contact-divider { border: none; border-top: 1px solid var(--border); margin: 12px 0; }
.modal-contact-desc { font-size: .8rem; color: var(--text-light); }

/* 모달 폼 */
.modal-consultation-form .form-group { margin-bottom: 12px; }
.modal-consultation-form input,
.modal-consultation-form select,
.modal-consultation-form textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .88rem;
    font-family: inherit;
    color: var(--text-dark);
    transition: border-color var(--transition);
}
.modal-consultation-form input:focus,
.modal-consultation-form select:focus,
.modal-consultation-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}
.phone-input-group {
    display: flex;
    align-items: center;
    gap: 6px;
}
.phone-input-group input { flex: 1; }
.phone-input-group span { color: var(--text-light); font-weight: 700; }
.privacy-agreement { font-size: .8rem; color: var(--text-light); }
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.checkbox-label input { width: auto; }
.checkbox-label a { color: var(--primary); text-decoration: underline; }
.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius-sm);
    font-size: .95rem;
    font-weight: 700;
    margin-top: 8px;
    transition: background var(--transition);
}
.btn-submit:hover { background: var(--primary-dark); }

/* ============================================
   서브페이지 우상단 BI 워터마크
   ============================================ */
#main-content { position: relative; }
.subpage-watermark {
    position: absolute;
    top: -150px; /* 심볼 상단이 page-banner 밑으로 살짝 들어가도록 위로 확장 */
    right: 0;
    bottom: 0;
    left: 0;
    overflow: clip; /* 우측으로 삐져나가는 심볼이 가로 스크롤을 만들지 않도록 */
    pointer-events: none;
    z-index: -1; /* 배너·콘텐츠 배경 뒤에 깔림 */
}
.subpage-watermark img {
    position: absolute;
    top: 0;
    right: -50px;
    width: clamp(300px, 28vw, 540px);
    opacity: .03;
}
@media (max-width: 767px) {
    .subpage-watermark { top: -60px; }
    .subpage-watermark img { width: 220px; right: -60px; }
}

/* ============================================
   개인정보 모달
   ============================================ */
.privacy-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 10100; /* 상담 모달(10000) 위에 표시 */
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.privacy-modal.open { display: flex; }
.privacy-modal-content {
    font-family: var(--font-sub);   /* 모달(환자권리장전·개인정보처리방침) 본문은 서브페이지처럼 Pretendard */
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.privacy-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
}
.privacy-modal-header h2 { font-size: 1.05rem; font-weight: 700; }
.privacy-modal-close { font-size: 1.4rem; color: var(--text-light); }
.privacy-modal-body {
    overflow-y: auto;
    padding: 20px 24px;
    font-size: .82rem;
    color: var(--text-mid);
    line-height: 1.75;
    flex: 1;
}
.privacy-modal-body h3 {
    font-size: .9rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 18px 0 6px;
}
.privacy-modal-body p { margin-bottom: 10px; }
.privacy-modal-confirm {
    margin: 12px 24px 20px;
    padding: 11px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius-sm);
    font-weight: 700;
    width: calc(100% - 48px);
}

/* 정보 모달 내 표 (비급여안내 등) */
.info-modal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0 10px;
    font-size: .82rem;
}
.info-modal-table th,
.info-modal-table td {
    border: 1px solid var(--border);
    padding: 9px 12px;
    text-align: left;
}
.info-modal-table th {
    background: var(--bg-light);
    font-weight: 700;
    color: var(--text-dark);
}
.info-modal-note {
    font-size: .76rem;
    color: var(--text-light);
}

/* ============================================
   404 에러 페이지
   ============================================ */
.error-page {
    font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif;
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--header-height) 24px 80px;
}
.error-page-inner { text-align: center; }
.error-icon { font-size: 4rem; color: var(--border); margin-bottom: 16px; }
.error-code { font-size: 6rem; font-weight: 900; color: var(--primary); line-height: 1; margin-bottom: 12px; }
.error-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 10px; }
.error-desc { color: var(--text-light); margin-bottom: 12px; }
.error-redirect { font-size: .9rem; color: var(--text-light); margin-bottom: 32px; }
.error-redirect #redirect-count { font-weight: 700; color: var(--primary); }
.error-actions { display: flex; gap: 14px; justify-content: center; }

/* ============================================
   개인정보처리방침 페이지
   ============================================ */
.privacy-content { width: 100%; }
.privacy-content h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: 28px; }
.privacy-content h2, .privacy-content h3 { font-size: 1.05rem; font-weight: 700; margin: 24px 0 10px; color: var(--primary); }
.privacy-content p { font-size: .88rem; color: var(--text-mid); line-height: 1.75; margin-bottom: 10px; }
.privacy-date { color: var(--text-light); font-size: .8rem; margin-top: 32px; }

/* ============================================
   온라인 상담 페이지
   ============================================ */
.consultation-page { padding-bottom: 120px; }
.consult-section {
    max-width: 1000px;
    margin: 0 auto;
}

/* 상단 타이틀 */
.consult-head {
    text-align: center;
    margin-bottom: 64px;
}
.consult-head-kicker {
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .22em;
    color: var(--accent);
    margin: 0 0 16px;
}
.consult-head-title {
    font-family: var(--font-sans);
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 18px;
}
.consult-head-desc {
    font-size: 1rem;
    color: var(--text-mid);
    margin: 0;
}

/* 입력 그리드 — 2열, 일부 항목은 전체 폭 */
.consult-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 32px;
}
.consult-field--full { grid-column: 1 / -1; }

.consult-field label {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}
.consult-field label em {
    font-style: normal;
    color: #e74c3c;
    margin-left: 4px;
}
.consult-field input,
.consult-field select,
.consult-field textarea {
    width: 100%;
    padding: 15px 18px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--white);
    font-family: inherit;
    font-size: .98rem;
    color: var(--text-dark);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.consult-field textarea {
    min-height: 180px;
    resize: vertical;
    line-height: 1.7;
}
.consult-field input::placeholder,
.consult-field textarea::placeholder { color: var(--text-light); }
.consult-field select { appearance: none; -webkit-appearance: none; }
/* 셀렉트 화살표 */
.consult-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23231916' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 44px;
}
/* 선택 전에는 플레이스홀더처럼 흐리게 */
.consult-field select:invalid { color: var(--text-light); }
.consult-field input:focus,
.consult-field select:focus,
.consult-field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(200, 169, 106, .18);
}
/* 유효성 오류 */
.consult-field.error input,
.consult-field.error select,
.consult-field.error textarea { border-color: #e74c3c; }
.consult-field .error-message {
    display: none;
    margin-top: 8px;
    font-size: .85rem;
    color: #e74c3c;
}

/* 개인정보 동의 */
.consult-agree {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 32px 0 28px;
}
.consult-agree input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
    flex-shrink: 0;
}
.consult-agree label {
    font-size: .95rem;
    color: var(--text-mid);
    cursor: pointer;
}
.consult-agree a {
    color: var(--text-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.consult-agree a:hover { color: var(--accent); }

/* 제출 버튼 */
.consult-submit {
    width: 100%;
    padding: 22px;
    border: none;
    border-radius: 6px;
    background: var(--primary);
    color: var(--white);
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition), opacity var(--transition);
}
.consult-submit:hover { background: var(--accent); }
.consult-submit:disabled,
.consult-submit.loading { opacity: .6; cursor: not-allowed; }

/* 하단 연락 안내 */
.consult-contact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 40px;
    margin-top: 44px;
}
.consult-contact li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .95rem;
    color: var(--text-mid);
}
.consult-contact i { color: var(--accent); }
.consult-contact a { color: var(--text-mid); transition: color var(--transition); }
.consult-contact a:hover { color: var(--accent); }

/* 상담 페이지 반응형 */
@media (max-width: 767px) {
    .subpage-content {
        padding: 50px 0 72px;
    }
    .consultation-page { padding-bottom: 80px; }
    .consult-head { margin-bottom: 40px; }
    .consult-grid { grid-template-columns: 1fr; gap: 22px; }
    .consult-field label { font-size: .95rem; margin-bottom: 10px; }
    .consult-field input,
    .consult-field select,
    .consult-field textarea { padding: 14px 16px; font-size: .95rem; }
    .consult-field textarea { min-height: 150px; }
    .consult-submit { padding: 18px; font-size: 1rem; }
    .consult-contact { flex-direction: column; align-items: center; gap: 10px; margin-top: 32px; }
}

/* ============================================
   반응형 - 태블릿
   ============================================ */
@media (max-width: 1170px) {
.header-cta {display: none;}
   }
@media (max-width: 1023px) {
    :root { --header-height: 65px; }

    .subpage-content {
        padding: 50px 0 100px;
    }

    /* 모바일/태블릿: 동일한 투명→흰 배경 페이드 전환 */
    .header-inner { max-width: 100%; }

     .header-logo img {
        height: 30px;
        width: auto;
    }
    .nav-desktop { display: none; }
    .hamburger-btn { display: flex; }
    .quick-menu { display: none; }
    .mobile-fixed-cta { display: flex; }
    .back-to-top { bottom: 80px; right: 10px;}
}

/* ============================================
   반응형 - 모바일
   ============================================ */
@media (max-width: 640px) {
    .subpage-title {
        font-size: 1.35rem !important;
        margin: 22px 0 10px !important;
    }

    .notice-date,
    .notice-views { display: none; }
    .notice-table thead th:nth-child(3),
    .notice-table thead th:nth-child(4) { display: none; }

    .notice-table {
        font-size: .95rem;
    }

    .notice-pin-badge {
        padding: 3px 7px;
        font-size: .65rem;
    }
}

@media (max-width: 767px) {
    .section { padding: 56px 0; }
    .section-title { font-size: 2rem;}

    .page-banner { padding: 80px 0 115px; }
    .page-banner-title { font-size: 1.6rem; letter-spacing: -0.02em;}

    .header-logo img {
        height: 30px;
        width: auto;
    }

    .subpage-content { padding: 20px 0 60px;}
    .notice-page { min-height: 420px; }
    .notice-table thead th {
        font-size: .95rem;
    }
}

@media (max-width: 480px) {
    .header-inner {
        padding: 0 15px;
    }


    .breadcrumb { text-align: center; }
    .breadcrumb-list { justify-content: center; }
    .breadcrumb-link {
        font-size: .7rem;
    }
    .breadcrumb-item.current span {
        font-size: .7rem;
    }
    .section-title { font-size: 1.6rem; }
    .section-desc {font-size: .9rem;}
    .error-code { font-size: 4rem; }

    .back-to-top {
        width: 30px;
        height: 30px;
    }
}

/* ============================================
   접근성
   ============================================ */
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ============================================
   관리자 로그인 상태 바 — 관리자 세션 유지 중 사용자 페이지 최상단 노출
   ============================================ */
.admin-view-bar {
    font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 10000;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: #1a1d24;
    color: #e8e8ec;
    font-size: 12.5px;
    letter-spacing: .02em;
}
.admin-view-bar i { color: #E4D2AB; margin-right: 5px; }
.admin-view-bar strong { color: #fff; font-weight: 600; }
.admin-view-bar-links { display: flex; align-items: center; gap: 14px; }
.admin-view-bar-links a {
    color: #fff;
    opacity: .8;
    text-decoration: none;
    transition: opacity .2s ease;
}
.admin-view-bar-links a:hover { opacity: 1; text-decoration: underline; }

/* 바 높이만큼 고정 헤더를 아래로 내림 (헤더 hide 시에도 바 뒤로 정확히 숨음) */
body.with-admin-bar .main-header { top: 34px; }

/* 모바일 메뉴 패널 닫기 버튼이 바에 가려지지 않도록 오프셋 */
body.with-admin-bar .mobile-nav-panel { top: 34px; height: calc(100% - 34px); }

@media (max-width: 480px) {
    .admin-view-bar { font-size: 11.5px; gap: 10px; padding: 0 10px; }
}

/* 모바일 메뉴 — 2차 목록은 2열로 짧게, 그룹(진료 클리닉)은 아코디언 */
.mobile-sub-menu:not(.has-groups),
.mobile-group-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 12px;
    padding: 0 20px;
}
/* 위아래 여백은 padding 이 아니라 내용(가상 요소)으로 — max-height:0 으로 접힌 상태에서 padding 만큼 배경 띠가 남지 않도록 */
.mobile-sub-menu:not(.has-groups)::before, .mobile-group-list::before { content: ''; grid-column: 1 / -1; height: 8px; }
.mobile-sub-menu:not(.has-groups)::after,  .mobile-group-list::after  { content: ''; grid-column: 1 / -1; height: 12px; }
.mobile-sub-menu:not(.has-groups) { display: grid; }
.mobile-sub-menu:not(.has-groups) .mobile-sub-link,
.mobile-group-list .mobile-sub-link {
    padding: 9px 10px;
    font-size: .86rem;
    border-radius: 8px;
    line-height: 1.35;
    letter-spacing: -0.03em;
}
/* 뼈대의 'li:first-child/last-child 링크에 15px 여백' 규칙이 그룹 목록(중첩 li)까지 잡아 좌우 열 높이가 어긋난다 → 같은 우선순위로 뒤에서 덮어씀 */
.mobile-sub-menu:not(.has-groups) li .mobile-sub-link,
.mobile-sub-menu .mobile-group-list li .mobile-sub-link { padding: 9px 10px; }
.mobile-sub-link.active { background: #fff; color: var(--primary); }
.mobile-sub-menu.has-groups { padding: 0; }
.mobile-sub-menu.has-groups::before { content: ''; display: block; height: 6px; }
.mobile-sub-menu.has-groups::after  { content: ''; display: block; height: 8px; }
.mobile-group { border-top: 1px solid rgba(0,0,0,.05); }
.mobile-group:first-child { border-top: 0; }
.mobile-group-toggle {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 12px 20px 12px 28px; text-align: left;
    font: inherit; font-size: .9rem; font-weight: 500; color: var(--text-dark);
}
.mobile-group-toggle em { font-style: normal; font-size: .72rem; color: var(--text-mid); opacity: .8; }
.mobile-group-toggle .bi { margin-left: auto; font-size: .8rem; color: var(--text-mid); transition: transform .25s; }
.mobile-group.open .mobile-group-toggle { color: var(--primary); }
.mobile-group.open .mobile-group-toggle .bi { transform: rotate(180deg); }
.mobile-group-list { display: none; padding: 0 16px 12px 20px; }
.mobile-group.open .mobile-group-list { display: grid; }
.mobile-search { padding: 12px 20px 4px; }
.mobile-search .mega-search-box { height: 44px; padding: 0 14px; }
.mobile-search .mega-search-input { font-size: .92rem; }

/* 참사랑: 배경 있는 헤더로 바뀐 뒤에는 아래로 스크롤해도 숨기지 않고 고정 (뼈대의 nav-hidden 동작 끔, 데스크톱·모바일 공통) */
.main-header.nav-hidden { transform: none; pointer-events: auto; }

/* ── 서브페이지 본문 서체: Pretendard (2026-09-16). 배너·헤더·푸터는 --font-sans 그대로 ── */
.subpage-content { font-family: var(--font-sub); }
