@import url('https://fonts.googleapis.com/css2?family=Eagle+Lake&family=Emblema+One&family=Noto+Sans+SC:wght@100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=BJCree:wght@400;500;600;700&family=Cormorant+Upright:wght@300;400;500;600;700&family=Italianno&family=Noto+Serif+KR:wght@200..900&display=swap');

/* ============================================
   Custom Scrollbar
============================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--bookink2);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bookink1);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--bookink2) transparent;
}

/* ============================================
   Section Label (공통)
============================================ */
.section_label {
    display: inline-block;
    font-size: clamp(10px, 1vw, 13px);
    font-weight: 500;
    letter-spacing: 0.25em;
    color: var(--bookink1);
    text-transform: uppercase;
    position: relative;
    padding-left: clamp(15px, 2vw, 36px);
}

.section_label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: clamp(10px, 1.5vw, 20px);
    height: 1px;
    background: var(--bookink1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--main_font);
    background-repeat: no-repeat;
    background-position: center;
}

li{
    list-style: none;
}

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

img{
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

:root {
    --white: #fafafa;
    --black: #121212;
    --ink1: #888;
    --bookink2: #F0A065;
    --bookink1: #E87E47;
    --bookink3: #CB553D;
    --header-color: #121212;
    --main_font: "Roboto", sans-serif;
    --padding_default: clamp(20px, 3vw, 40px) clamp(16px, 12vw, 350px);
}

/* 중국어 모드: Noto Sans SC만 사용 (아이콘 폰트 제외)
   히어로 브랜드(.hero_logo)는 #main_intro 규칙으로 별도 유지 */
html.lang-zh *:not(i):not([class*="fa"]):not([class*="icon"]),
html[lang="zh-CN"] *:not(i):not([class*="fa"]):not([class*="icon"]),
html[lang="zh-TW"] *:not(i):not([class*="fa"]):not([class*="icon"]) {
    font-family: "Noto Sans SC", sans-serif !important;
}

section{
    width: 100%;
    height: auto;
}

section:not(:first-child){
    padding: clamp(50px, 10vw, 170px) clamp(16px, 12vw, 350px) 0;
}

section h2{
    width: 100%;
    text-align: start;
    font-size: clamp(16px, 4vw, 50px);
}

.hospital_language_badge {
    position: absolute;
    top: clamp(8px, 1vw, 14px);
    right: clamp(8px, 1vw, 14px);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: calc(100% - 16px);
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    background: rgba(18, 18, 18, 0.72);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    color: #fff;
    font-size: clamp(10px, 0.9vw, 12px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.03em;
    white-space: nowrap;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hospital_language_badge i {
    color: var(--bookink2);
    font-size: 0.95em;
}

.hospital_language_badge_dot {
    color: rgba(255, 255, 255, 0.6);
}

.hospital_language_badge_more {
    padding-left: 2px;
    color: var(--bookink2);
}

/* header */
header {
    --logo-h: clamp(44px, 4.5vw, 56px);
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    column-gap: clamp(12px, 2vw, 24px);
    padding: clamp(6px, 1.4vw, 14px) clamp(16px, 4vw, 50px);
    position: fixed;
    top: 0;
    left: 0;
    background: #fff;
    z-index: 1000;
    color: var(--header-color);
    overflow: visible;
    transition: background 0.25s ease, padding-bottom 0.25s ease;
}

header:has(.top_nav li.has_submenu:hover),
header:has(.top_nav li.has_submenu:focus-within),
header:has(.top_nav li.has_submenu.nav_active) {
    background: #fff;
    /* Sized for Support submenu (2 items) + gap under main label */
    padding-bottom: clamp(64px, 7vw, 90px);
}

header .logo {
    grid-column: 1;
    justify-self: start;
    max-width: min(520px, 100%);
    display: flex;
    align-items: center;
    min-height: var(--logo-h);
    flex-shrink: 0;
}

header .logo a {
    display: block;
    line-height: 0;
}

header .logo_img {
    display: block;
    height: var(--logo-h);
    width: auto;
    max-width: 100%;
    object-fit: contain;
    transition: filter 0.25s ease;
}

header[data-theme="dark"] .logo_img,
header:not([data-theme]) .logo_img,
header[data-theme="light"] .logo_img {
    filter: none;
}

header nav,
header .header_nav {
    grid-column: 2;
    justify-self: center;
    width: auto;
    max-width: 100%;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    z-index: 1100;
}

header .top_nav{
    padding-top: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: clamp(36px, 4vw, 64px);
}

header .top_nav li {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    flex: 0 0 auto;
    width: max-content;
    align-items: center;
}

header .top_nav li .main_menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--logo-h);
    box-sizing: border-box;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.2;
    transition: letter-spacing 0.3s ease;
    font-size: clamp(10px, 1.5vw, 16px);
}

header .top_nav li:hover .main_menu,
header .top_nav li.nav_active .main_menu {
    letter-spacing: 0.1em;
    font-size: 1.1em;
}

/* Clinics CTA — compact pill, vertically aligned with other main menus */
header .top_nav li:has(.clinics_btn) {
    min-height: var(--logo-h);
    justify-content: center;
}

header .top_nav li .main_menu.clinics_btn {
    padding: 0.45em 1.25em;
    min-height: auto;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(90deg, var(--bookink2) 0%, var(--bookink3) 100%);
    font-weight: 800;
    letter-spacing: 0.04em;
    white-space: nowrap;
    font-size: clamp(10px, 1.5vw, 16px);
    transform: scale(1);
    transition: filter 0.3s ease, transform 0.3s ease;
}

header .top_nav li:hover .main_menu.clinics_btn,
header .top_nav li.nav_active .main_menu.clinics_btn {
    letter-spacing: 0.04em;
    font-size: clamp(10px, 1.5vw, 16px);
    filter: brightness(1.06);
    transform: scale(1.08);
}

/* Booking submenu — absolute so long labels do not stretch nav gaps */
header .top_nav li.has_submenu {
    position: relative;
    min-height: var(--logo-h);
    justify-content: flex-start;
    align-items: center;
    padding-top: calc((var(--logo-h) - 1.2em) / 2);
    box-sizing: border-box;
}

header .top_nav li.has_submenu .main_menu {
    min-height: auto;
    padding: 0;
}

header .top_nav li.has_submenu .submenu_list {
    position: absolute;
    top: calc((var(--logo-h) - 1.2em) / 2 + 1.2em);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: max-content;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1101;
    transition:
        max-height 0.3s ease,
        opacity 0.25s ease,
        padding 0.25s ease,
        visibility 0.25s ease;
}

header .top_nav li.has_submenu:hover .submenu_list,
header .top_nav li.has_submenu.nav_active .submenu_list,
header .top_nav li.has_submenu:focus-within .submenu_list {
    max-height: 130px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    padding: 22px 0 2px;
}

header .top_nav li.has_submenu .submenu_list .sub_menu {
    display: block;
    padding: 2px 8px;
    white-space: nowrap;
    font-size: clamp(9px, 1.15vw, 12px);
    font-weight: 500;
    letter-spacing: 0.04em;
    line-height: 1.45;
    text-align: center;
}

.sub_menu.active {
    font-weight: 500;
    text-decoration: underline 1px solid var(--bookink2);
    text-underline-offset: 5px;
}

.header_weather {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    min-height: var(--logo-h);
    padding: 0 2px;
    margin: 0 clamp(20px, 3.2vw, 56px) 0 0;
    color: inherit;
    text-decoration: none;
    font-size: clamp(11px, 1.05vw, 13px);
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
    opacity: 0.96;
    transition: opacity 0.2s ease;
}

.header_weather:hover,
.header_weather:focus-visible {
    opacity: 1;
}

.header_weather_temp {
    font-size: clamp(17px, 1.7vw, 22px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
}

.header_weather_icon {
    width: clamp(15px, 1.45vw, 18px);
    height: clamp(15px, 1.45vw, 18px);
    flex-shrink: 0;
    color: #e8b48a;
    display: block;
}

header[data-theme="light"] .header_weather_icon {
    color: var(--bookink3);
}

.header_weather_when {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1px;
    line-height: 1.2;
}

.header_weather_date,
.header_weather_time {
    font-size: clamp(10px, 0.95vw, 12px);
    font-weight: 500;
    opacity: 0.92;
}

.visually_hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.header_end {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(10px, 1.4vw, 16px);
    margin-left: 0;
    flex-shrink: 0;
    min-width: max-content;
    min-height: var(--logo-h);
    z-index: 1200;
}

.locale_switcher {
    min-width: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: var(--logo-h);
    margin-top: 0;
    flex-shrink: 0;
}

.locale_switcher button {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
}

.locale_switcher_toggle {
    min-width: 58px;
    padding: 7px 10px;
    border: 1px solid currentColor !important;
    border-radius: 999px;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: none;
}

.locale_switcher_menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 132px;
    padding: 6px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
    color: var(--black);
}

.locale_switcher_menu button {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border-radius: 7px;
    text-align: left;
    font-size: 12px;
}

.locale_switcher_menu button:hover,
.locale_switcher_menu button:focus-visible {
    background: rgba(206, 120, 49, 0.12);
}
/* //header */

/* contact_btn */
.contact_btn_wrap {
    position: fixed;
    font-size: clamp(16px, 2vw, 28px);
    bottom: 5%; right: 2%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(8px, 1.5vw, 16px);
    z-index: 9989;
}

.contact_btn_wrap a,
.contact_btn_toggle {
    background: rgba(255, 255, 255, 0.116);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    width: clamp(40px, 5vw, 56px);
    height: clamp(40px, 5vw, 56px);
    border-radius: 50%;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: opacity 0.28s ease, transform 0.28s ease, box-shadow 0.2s ease;
}

.contact_btn_wrap a:hover,
.contact_btn_toggle:hover {
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18);
}

/* 토글 버튼 (항상 보임) */
.contact_btn_toggle {
    cursor: pointer;
    border: none;
    font-size: clamp(16px, 2vw, 28px);
    order: 99;
    padding: 0;
}

/* 접힌 상태: 소셜 링크 숨김 */
.contact_btn_wrap.collapsed .contact_social {
    opacity: 0;
    transform: translateY(10px) scale(0.85);
    pointer-events: none;
    visibility: hidden;
}

/* 펼쳐진 상태 */
.contact_btn_wrap:not(.collapsed) .contact_social {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    visibility: visible;
}

/* 열림: + → × */
.contact_btn_wrap:not(.collapsed) .contact_btn_toggle {
    transform: rotate(45deg);
}
/* //contact_btn */

/* footer */
footer {
    margin-top: 120px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--black);
    font-family: var(--main_font);
}

.footer_inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: clamp(40px, 6vw, 200px);
    padding: clamp(20px, 5vw, 80px) clamp(20px, 8vw, 350px);
}

.footer_brand {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
}

.footer_logo {
    font-size: clamp(13px, 1.4vw, 18px);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer_tagline {
    font-size: clamp(10px, 1vw, 13px);
    font-weight: 300;
    letter-spacing: 0.05em;
    color: rgba(18, 18, 18, 0.45);
    text-transform: uppercase;
}

.footer_info {
    flex: 1;
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: clamp(12px, 2vw, 30px);
    row-gap: 8px;
    font-size: clamp(10px, 1vw, 13px);
    line-height: 1.5;
}

.footer_info p {
    display: contents;
}

.footer_info_label {
    font-weight: 600;
    color: var(--black);
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.footer_info_value {
    font-weight: 300;
    color: rgba(18, 18, 18, 0.55);
    font-size: clamp(8px, 0.9vw, 12px);
}

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

.footer_info_value a:hover {
    color: var(--black);
}

.footer_links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: clamp(10px, 1vw, 13px);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer_links {
    flex: 1;
}
.footer_links a {
    color: rgba(18, 18, 18, 0.5);
    transition: color 0.2s ease, letter-spacing 0.2s ease;
}

.footer_links a:hover {
    color: var(--black);
    letter-spacing: 0.1em;
}

.footer_bottom {
    padding: clamp(20px, 5vw, 80px) clamp(20px, 8vw, 350px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    font-size: clamp(9px, 0.9vw, 12px);
    font-weight: 300;
    color: rgba(18, 18, 18, 0.35);
    letter-spacing: 0.03em;
}
/* //footer */

/* ============================================
   Hamburger Button
============================================ */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: clamp(24px, 5vw, 40px);
    height: clamp(24px, 5vw, 40px);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--header-color, var(--black));
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease, background 0.3s ease;
    transform-origin: center;
}

/* X 모양 변환 */
.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
    width: 0;
}
.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   Mobile Nav Overlay
============================================ */
.mobile_nav_overlay {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 85vw);
    height: 100vh;
    background: rgba(250, 250, 250, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1050;
    padding: 90px 32px 40px;
    overflow-y: auto;
    transition: right 0.35s ease;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
}

.mobile_nav_overlay.open {
    right: 0;
}

.mobile_nav_list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile_nav_list > li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.mobile_nav_list > li > a,
.mobile_nav_list > li > span {
    display: block;
    padding: 16px 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--black);
}

.mobile_sub_list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile_sub_list.open {
    max-height: 300px;
}

.mobile_nav_list > li.has_submenu:hover .mobile_sub_list,
.mobile_nav_list > li.has_submenu:focus-within .mobile_sub_list {
    max-height: 300px;
}

.mobile_nav_list > li > a.clinics_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 12px 0;
    padding: 10px 28px;
    width: fit-content;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(90deg, #f5a65b 0%, #d97824 100%);
    font-weight: 800;
    letter-spacing: 0.06em;
}

.mobile_sub_list a {
    display: block;
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(18, 18, 18, 0.55);
    transition: color 0.2s ease;
}

.mobile_sub_list a:hover {
    color: var(--bookink3);
}

/* 모바일 메뉴 열렸을 때 뒤 배경 스크롤 방지 */
body.mobile_nav_open {
    overflow: hidden;
}

.empty_msg { text-align: start; color: #999; padding: 40px 0; font-size: 1rem; }
/* ============================================
   Responsive – Header
============================================ */
@media (max-width: 1024px) {
    header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        column-gap: 0;
    }

    header .logo {
        grid-column: auto;
        padding-bottom: 0;
    }

    header .header_nav {
        display: none;
    }

    .header_end {
        grid-column: auto;
        margin-left: auto;
    }

    .hamburger {
        display: flex;
    }

    .mobile_nav_overlay {
        display: block;
    }

    .header_weather {
        margin: 0 clamp(10px, 2vw, 20px) 0 0;
        gap: 8px;
    }

    .header_weather_temp {
        font-size: 16px;
    }

    .header_weather_icon {
        font-size: 14px;
    }

    .header_weather_date,
    .header_weather_time {
        font-size: 10px;
    }

    .locale_switcher {
        margin: 0;
        min-width: auto;
    }
}

/* ============================================
   Responsive – Footer
============================================ */
@media (max-width: 900px) {
    section:not(:first-child) {
        padding: clamp(30px, 7vw, 80px) clamp(12px, 5vw, 48px) 0;
    }
}

@media (max-width: 768px) {
    .footer_inner {
        flex-direction: column;
        gap: 28px;
    }
}

@media (max-width: 480px) {
    section:not(:first-child) {
        padding-left: 12px;
        padding-right: 12px;
    }

    .footer_inner {
        padding: 20px 19px 10px;
    }

    .footer_bottom {
        padding: 14px 20px;
    }
}

/* ============================================
   Searchable Select (.ss-*)
============================================ */
.ss-wrap {
    position: relative;
    width: 100%;
    font-family: var(--main_font);
}

.ss-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(7px, 1vw, 12px) clamp(8px, 1vw, 12px);
    border: 1.5px solid #ddd;
    border-radius: 8px;
    background: #ffffff60;
    cursor: pointer;
    font-size: clamp(0.8rem, 1.5vw, 0.95rem);
    text-align: left;
    transition: border-color 0.15s;
}

.ss-trigger:hover,
.ss-open .ss-trigger {
    border-color: var(--bookink3);
}

.ss-label {
    color: #333;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ss-label.ss-placeholder {
    color: #888;
    font-weight: 400;
}

.ss-arrow {
    color: var(--bookink1);
    font-size: 1.5em;
    margin-left: 8px;
    transition: transform 0.15s;
}

.ss-open .ss-arrow {
    transform: rotate(180deg);
}

.ss-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(87, 122, 115, 0.12);
    z-index: 100;
    overflow: hidden;
}

.ss-search {
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-bottom: 1px solid #eee;
    font-size: clamp(0.78rem, 1.4vw, 0.9rem);
    outline: none;
    background: #fafafa;
}

.ss-list {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px 0;
}

.ss-list li {
    padding: 8px 12px;
    cursor: pointer;
    font-size: clamp(0.78rem, 1.4vw, 0.9rem);
    color: #333;
    transition: background 0.1s;
}

.ss-list li:hover {
    background: #f0f5f4;
}

.ss-list li.ss-selected {
    color: var(--bookink3);
    font-weight: 600;
}
