/* ─────────────────────────────────────────────
   base.css — CSS Variables, Reset, Typography, Layout
   ───────────────────────────────────────────── */

:root {
    color-scheme: light;     /* 다크모드 강제 적용 방지 — 브라우저 색반전 차단 */
    --main-brand: #ea5400;
    --main-dark: #cc4900;
    --main-light: #ff7b33;
    /* 보조 — 의료 신뢰감을 위한 딥네이비 */
    --navy:       #102b4d;
    --navy-light: #1a3a6d;
    --navy-soft:  #eef2f8;
    --navy-line:  #cfd8e8;
    --accent-color: #333;
    --dark-gray: #1a1a1a;
    --text-gray: #555;
    --bg-light-gray: #f8f9fa;
    --bg-light-orange: #fff5f0;
    /* 모바일 툴바 보정 — JS로 실제 innerHeight 기반 갱신 (fallback 1vh) */
    --vh: 1vh;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body, html {
    height: 100%;
    font-family: 'Asta Sans', 'Pretendard', sans-serif;
    color: #333;
}
h1, h2, h3, h4, h5, h6, .title, .gnb > li > a {
    font-family: 'Pretendard', sans-serif !important;
}

ul, li { list-style: none; }
a { text-decoration: none; color: inherit; }

/* Scroll Base */
.fullpage-container {
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    display: flex;
    flex-direction: column;
}
.fp-wrapper {
    width: 100%;
    height: 100%;
}
.fp-section { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; position: relative; }
.fullpage-container::-webkit-scrollbar { display: none; }

/* Subpage specific layout control */
.subpage-container {
    padding-top: 65px;
}

/* Utility Container — clamp: 1920px 이하 유지, 4K까지 선형 확장 */
.container { width: 100%; max-width: clamp(1100px, calc(200px + 46.875vw), 2000px); margin: 0 auto; padding: 0 40px; position: relative; }
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    /* 좁은 표 — 한국어 단어 단위로 예쁘게 줄바꿈 (음절 중간 끊김 방지) */
    table th, table td {
        word-break: keep-all;
        overflow-wrap: anywhere;
    }
    /* 텍스트 많은 데이터 표 — 행이 세로로 길어지는 문제 해소.
       표 폭 유지 + 가로 스크롤 → 행 높이 컴팩트하게 유지 */
    .nb-table, .compare-table,
    .cert-table, .be-table, .status-table, .menu-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    .nb-table th, .nb-table td,
    .compare-table th, .compare-table td,
    .cert-table th, .cert-table td,
    .be-table th, .be-table td,
    .status-table th, .status-table td,
    .menu-table th, .menu-table td {
        white-space: nowrap;
    }
    /* 진료일정 표(요일 그리드) — 스크롤 대신 화면 폭에 꽉 맞춰 균등 배치 */
    .schedule-table, .mini-schedule {
        width: 100% !important;
        table-layout: fixed;
    }
    .schedule-table th, .schedule-table td,
    .mini-schedule th, .mini-schedule td {
        word-break: keep-all;
        overflow-wrap: anywhere;
        padding-left: 2px; padding-right: 2px;
    }
}

/* 넓은 표 수동 래퍼 — <div class="table-scroll"> 로 감싸면 가로 스크롤 */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-scroll > table { min-width: 520px; }
