/* Layout for the existing index.asp header and Bootstrap menu. */
:root {
  --clinic-frame: min(1200px, calc(100% - 64px));
  --clinic-info-height: 116px;
  --clinic-menu-height: 63px;
  --clinic-header: calc(var(--clinic-info-height) + var(--clinic-menu-height));
}
html { scroll-padding-top: var(--clinic-header); }
html.header-compact { scroll-padding-top: var(--clinic-menu-height); }
.header-compact #top { transform: translateY(calc(0px - var(--clinic-info-height))); }
@media (prefers-reduced-motion: no-preference) {
  :root {
    --header-motion-duration: .36s;
    --header-motion-easing: cubic-bezier(.33, 0, .25, 1);
  }
  #top { transition: transform var(--header-motion-duration) var(--header-motion-easing); }
  html { scroll-behavior: smooth; }
}
body { font-family: "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif; color: #242424; word-break: keep-all; }
#wrapper img, #wrapper picture { display: block; max-width: 100%; height: auto; }
#wrapper picture img { margin-inline: auto; }
#wrapper .frame { width: var(--clinic-frame); margin-inline: auto; }
.full { max-width: 1920px; margin-inline: auto; }
.art { line-height: 0; }
.art img { width: 100%; }
#wrapper [data-aos]:not(.aos-animate) { transition-duration: 0s; }
#wrapper [data-aos="fade-up"]:not(.aos-animate) { transform: translateY(22px); }
#wrapper [data-aos="fade-right"]:not(.aos-animate) { transform: translateX(-24px); }
#wrapper [data-aos="fade-left"]:not(.aos-animate) { transform: translateX(24px); }
#wrapper [data-aos="zoom-in"]:not(.aos-animate) { transform: scale(.975); }
@media (max-width: 991.98px), (prefers-reduced-motion: reduce), print {
  #wrapper [data-aos], #wrapper [data-aos]:not(.aos-animate) { opacity: 1; transform: none; transition: none; }
}
#wrapper a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #2867b6; outline-offset: 2px; }

#top { top: 0; height: auto; box-shadow: none; }
#top_info { height: var(--clinic-info-height); }
#top_info .rows { height: 100%; width: var(--clinic-frame); margin: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
#top_info .rows > div:empty { display: none; }
#top_info .rows > [id] { float: none; width: auto; height: auto; margin: 0; padding: 0; }
#top_info_left { justify-self: start; }
#top_info_right { justify-self: end; }
#top_info_center img { width: 258px; }
#top_menu { height: var(--clinic-menu-height); border-block: 1px solid #ececec; background: white; }
#top_menu > div { width: var(--clinic-frame); float: none; margin: auto; padding: 0; }
#top_menu ul { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
#top_menu .menu { display: grid; place-items: center; height: 61px; padding: 0 4px; font-size: clamp(15px, 1.1vw, 18px); font-weight: 700; letter-spacing: -.06em; color: #242424; }
#top_menu .menu_on, #top_menu a:hover .menu { color: #24538b; background: #f7f9fc; }
/* Keep the header space on the content wrapper so resizing it doesn't trigger scroll anchoring. */
#wrapper { padding-top: var(--clinic-header); }
#subject, #clinicTime, #location, #interior { padding: 0; height: auto; background: none; }
#wrapper > #clinicTime { width: var(--clinic-frame); margin-inline: auto; }
#doctors.doctor-section { padding-block: clamp(52px, 6vw, 112px) clamp(48px, 5.3vw, 100px); }
.doctor-profile { margin-top: clamp(42px, 4.6vw, 87px); }
.sedation-band { background: linear-gradient(to bottom, #1a1a1a 78%, white 78%); }
.nonsleep-band { background: #1a1a1a; }
.monitoring { margin-top: clamp(48px, 5.3vw, 100px); }
.certificate { width: min(761px, calc(100% - 64px)); margin: clamp(90px, 11vw, 209px) auto 0; }
.treatment-steps { margin-top: clamp(68px, 8.1vw, 155px); }
.indications { margin-top: clamp(74px, 9vw, 172px); }
.implant-treatment { padding-top: clamp(82px, 9.6vw, 184px); }
.implant-brands { margin-top: clamp(32px, 4.2vw, 80px); }
.wisdom-treatment { padding-top: clamp(60px, 7.1vw, 135px); }
.wisdom-indications { margin-top: clamp(50px, 6vw, 115px); }
.root-treatment { padding-block: clamp(82px, 9.7vw, 185px) clamp(100px, 13.1vw, 250px); }
@media (min-width: 801px) {
  #wrapper .root-treatment > .frame { width: min(1237px, calc(100% - 64px)); }
}
.root-art { width: 100%; }
.nonsleep-methods { margin-top: clamp(58px, 7.2vw, 138px); }
.equipment-section { margin-top: clamp(84px, 10.5vw, 201px); }
.equipment-title { width: 100%; }
.equipment-sheet { margin: clamp(32px, 3.6vw, 68px) auto 0; }
@media (min-width: 801px) {
  .equipment-cards { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

.visit-section { margin-top: clamp(94px, 12.3vw, 236px); }
.visit-map { display: block; margin: clamp(36px, 4.4vw, 84px) auto 0; }
.visit-map img { width: 100%; }
.visit-address { margin-top: clamp(22px, 2.3vw, 43px); }
.visit-actions { display: flex; justify-content: flex-end; gap: 10px; align-items: stretch; }
.visit-actions a { display: block; width: min(191px, 32%); border-radius: 8px; }
.visit-actions img { width: 100%; }
.visit-actions a:hover { box-shadow: 0 0 0 1px #b4c0d0; }
.map-actions { margin-top: clamp(16px, 1.5vw, 28px); }
#clinicTime { margin-top: clamp(42px, 4.6vw, 87px); }
.contact-row { margin-top: clamp(28px, 3.2vw, 60px); display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.contact-title { width: 18%; }
.contact-actions { width: min(100%, 794px); }
.tour-section { margin-top: clamp(100px, 13.2vw, 253px); }
#interior .contents { padding: 0; }
#interior .contents img { margin-inline: auto; }
#interior .tour-gallery { float: none; padding: 0; margin: clamp(36px, 4.4vw, 83px) auto 0; }
.equipment-cards li { float: none; }
.equipment-cards h3, .equipment-cards p { margin: 0; }
.faq-section { margin-top: clamp(64px, 7.3vw, 139px); }
.faq-title { container-type: inline-size; font-family: var(--pretendard-font); text-align: center; }
/* Keep the decorative top of the original banner and render its lettering as text. */
.faq-title::before { content: ""; display: block; aspect-ratio: 1200 / 115; background: url("../images/faq-title.png") center top / 100% auto no-repeat; }
.faq-title span { display: block; color: #777; font-size: 1.83cqi; line-height: 1; }
.faq-title h2 { margin: 2.75% 0 0; color: #191919; font-size: 4.33cqi; font-weight: 400; line-height: 1.08; letter-spacing: -.055em; }
.faq-title strong { font-weight: 800; }
#bottom { display: block; padding: clamp(80px, 9.7vw, 186px) 16px 125px; background: white; color: #777; line-height: 1.9; font-size: 16px; letter-spacing: -.05em; }
#faq ~ #bottom { padding-top: 0; }
#bottom img { margin: 0 auto; }
#bottom .gray_color { display: inline-block; margin-top: 10px; color: #888; }
#bottom .fee-link { background: none; border: none; text-decoration: underline; font-size: 13px; }
#quickScrollMenu { visibility: hidden; position: fixed; top: auto; bottom: 66px; right: 20px; width: clamp(58px, 8vh, 80px); max-height: calc(100vh - 80px); overflow-y: auto; background: white; color: #333; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }
#quickScrollMenu.is-visible { visibility: visible; }
#quickScrollMenu summary, #quickScrollMenu .quick-top { display: block; padding: 7px 0; cursor: pointer; text-align: center; background: #254777; color: white; }
#quickScrollMenu a { display: block; }
#quickScrollMenu li img { display: block; width: 100%; height: auto; }
#quickScrollMenu a:focus-visible { outline: 2px solid #254777; outline-offset: -2px; }
#quickScrollMenu li { float: none; }
#quickScrollMenu > details > ul { border-top: 1px solid #eee; }
#kakaoPop .modal-body p + p { margin-top: 12px; }
#kakaoPop .modal-body a { color: #195d9f; text-decoration: underline; }

@media (max-width: 800px) {
  .faq-title::before { aspect-ratio: 980 / 143; background-image: url("../images/m-faq-title.png"); }
  .faq-title span { font-size: 3cqi; }
  .faq-title h2 { margin-top: 4.25%; font-size: 6.1cqi; }
  :root { --clinic-frame: 100%; }
  .certificate { width: 100%; }
  #doctors.doctor-section { padding-block: 50px 48px; }
  .doctor-profile { margin-top: 30px; }
  .certificate, .treatment-steps, .indications, .nonsleep-methods { margin-top: 54px; }
  .monitoring, .implant-brands, .wisdom-indications { margin-top: 35px; }
  .implant-treatment, .wisdom-treatment, .root-treatment { padding-top: 65px; }
  .root-treatment { padding-bottom: 75px; }
  .root-art { width: 100%; }
  .equipment-section, .visit-section, .tour-section, .faq-section { margin-top: 78px; }
  #equipment .equipment-title { height: clamp(94px, 23vw, 162px); object-fit: cover; }
  #equipment .equipment-sheet { display: none; }
  .equipment-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 26px 16px 0; border-top: 1px solid #e5e5e5; border-left: 1px solid #e5e5e5; }
  .equipment-cards li { padding: 14px; border-right: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5; }
  .equipment-cards h3 { margin: 12px 0 8px; font-size: 15px; letter-spacing: -.055em; }
  .equipment-cards p { font-size: 13px; line-height: 1.55; color: #656565; }
  .equipment-photo { display: block; aspect-ratio: 320 / 244; background: url("../images/equipment.jpg") var(--photo-x, 4.7%) var(--photo-y, 6%) / 374.375% 426.23% no-repeat; }
  .equipment-cards li:nth-child(3n+2) { --photo-x: 50%; }
  .equipment-cards li:nth-child(3n) { --photo-x: 95.5%; }
  .equipment-cards li:nth-child(n+4) { --photo-y: 71.4%; }
  .visit-map, #interior .tour-gallery { width: calc(100% - 32px); margin-top: 28px; }
  .visit-address { margin-top: 24px; }
  .visit-actions { gap: 6px; }
  .map-actions { margin: 12px 16px 0; justify-content: center; }
  .visit-actions a { width: auto; flex: 1; }
  #clinicTime { margin-top: 42px; }
  .contact-row { display: block; margin: 38px 16px 0; }
  .contact-title { width: min(45%, 190px); }
  .contact-actions { margin: 18px auto 0; width: 100%; }
  .contact-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-actions a { width: 100%; }
  #bottom { padding: 74px 16px 42px; font-size: 12px; }
  #bottom img { width: 180px; }
}

/* Bootstrap's xs header, drawer and bottom shortcuts share the same breakpoint. */
@media (max-width: 767px) {
  :root { --clinic-info-height: 64px; --clinic-menu-height: 72px; --clinic-header: var(--clinic-info-height); }
  #top_info { border-bottom: 1px solid #eee; }
  #top_info .rows { width: 100%; padding: 0 12px; }
  #top_info_center img { width: clamp(150px, 42vw, 210px); height: auto; max-height: none; }
  #mobile_top_info_left { justify-self: start; }
  #mobile_top_info_right { justify-self: end; }
  #mobile_top_info_left li, #mobile_top_info_right li { height: auto; }
  #btnMobileMenu, #top .mobile-phone { display: grid; place-items: center; width: 44px; height: 44px; background: none; border: 0; color: #254777; font-size: 21px; }
  #top_menu { display: block; height: 0; overflow: hidden; visibility: hidden; border: 0; box-shadow: inset 0 -1px #ececec; }
  .header-compact #top_menu { height: var(--clinic-menu-height); visibility: visible; }
  #top_menu ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #top_menu .menu { height: 36px; font-size: 14px; }
  #coverLayer { top: var(--clinic-header); bottom: 0; height: auto; }
  #mobileMenu { margin: 0; top: var(--clinic-header); left: 0; max-height: calc(100vh - 128px); overflow-y: auto; background: white; box-shadow: 2px 8px 18px #0002; }
  .mobileMenu_title a { padding: 13px 22px; font-size: 16px; }
  .mobileMenu_title a:hover { background-color: #254777; }
  #mobile_bottom_menu { inset: auto 0 0; width: 100%; background: white; z-index: 900; }
  #mobile_bottom_icon { display: flex; justify-content: center; }
  #mobile_bottom_icon li { width: min(14.2857%, 60px); }
  #mobile_bottom_icon img { display: block; width: 100%; }
  #bottom_space { height: min(14.2857vw, 60px); }
}
@media (max-width: 767px) and (prefers-reduced-motion: no-preference) {
  #top_menu {
    transition: height var(--header-motion-duration) var(--header-motion-easing),
                visibility 0s linear var(--header-motion-duration);
  }
  .header-compact #top_menu { transition-delay: 0s; }
}
@media (min-width: 768px) {
  #wrapper.compact-header-space { padding-top: var(--clinic-menu-height); }
  #top_menu { display: block; }
  #top_info_left, #top_info_right { display: flex !important; }
  #top_info img { height: auto; max-height: none; }
  #top_info .rows { width: min(1200px, calc(100% - 48px)); }
}
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
  #wrapper { transition: padding-top var(--header-motion-duration) var(--header-motion-easing); }
}
