@import url("fonts.css");

:root {
  --brown: #605549;
  --gold: #c29968;
  --paper: #fbf8f4;
  --body-font: "Microsoft JhengHei", "PingFang TC", "Noto Serif TC", sans-serif;
  --serif: "Noto Serif TC", "Microsoft JhengHei", serif;
  color: #212529;
  font: 16px/1.5 var(--body-font);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 90px; }
body { margin: 0; }
body.dialog-open { overflow: hidden; }
button, a { font: inherit; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, dl, dd, figure, h1, h2, h3, p { margin: 0; padding: 0; }
ul { list-style: none; }
button { border: 0; background: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #93703f; outline-offset: 3px; }
.sr-only, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px; background: white; }
.container { width: 100%; max-width: 1100px; margin-inline: auto; padding-inline: 15px; }

/* Header and its two levels of navigation */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); }
.site-header.scrolled { box-shadow: 1px 2px 3px 1px rgb(0 0 0 / 20%); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1360px; min-height: 75px; margin: auto; padding: 10px 15px;
}
.brand { display: block; flex-shrink: 0; padding-block: 5px; }
.brand img { width: auto; height: 45px; }
.main-nav { padding: 8px; font-family: var(--serif); font-weight: 700; }
.nav-list { display: flex; align-items: center; }
.nav-group { position: relative; }
.nav-trigger { display: block; width: 100%; padding: 7.5px; color: var(--brown); font-size: 16.2px; line-height: 21px; font-weight: 700; white-space: nowrap; }
.nav-trigger::after {
  display: inline-block; content: ""; margin-left: 6px; vertical-align: .13em;
  border: .3em solid transparent; border-top-color: #181611; border-bottom: 0;
}
.dropdown {
  position: absolute; z-index: 1; top: 100%; left: 50%; transform: translateX(-50%);
  width: max-content; min-width: 210px; max-width: 300px; background: #fff;
  border: 1px solid rgb(0 0 0 / 14%); text-align: center;
}
.dropdown a, .dropdown .nav-trigger, .dropdown .menu-label {
  display: block; padding: 8px 16px; color: var(--brown); font-size: 16px;
  line-height: 1.4; letter-spacing: 0; white-space: normal;
}
.dropdown li + li { border-top: 1px solid #f0ece7; }
.dropdown a:hover, .dropdown a:focus-visible, .dropdown .nav-trigger[aria-expanded="true"] { color: white; background: var(--brown); }
.dropdown .nav-group-nested > .dropdown { top: -1px; left: 100%; transform: none; }
.nav-group-nested > .nav-trigger::after { transform: rotate(-90deg); }
.menu-toggle, .mobile-booking, .menu-shade { display: none; }

.announcement { overflow: hidden; padding: 12px 10px; color: white; background: var(--brown); font-size: 18px; font-weight: 700; line-height: 1.4; letter-spacing: .02em; }
.marquee { overflow: hidden; white-space: nowrap; }
.marquee span { display: block; width: max-content; animation: marquee var(--duration, 24s) linear infinite; }
.marquee:hover span { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(var(--start, 100vw)); }
  to { transform: translateX(calc(-100% - 4px)); }
}

/* Both carousels share a track. The hero uses separately composed mobile art. */
.carousel { --visible: 1; position: relative; }
.carousel-window { overflow: hidden; touch-action: pan-y pinch-zoom; }
.carousel-track { display: flex; width: 100%; will-change: transform; }
.slide { flex: 0 0 calc(100% / var(--visible)); min-width: 0; }
.carousel img { -webkit-user-drag: none; }
.hero { overflow: hidden; background: #f5f4f2; }
.hero picture { display: block; aspect-ratio: 100 / 38; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.carousel-arrow { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); padding: 0; opacity: .5; }
.carousel-arrow:hover, .carousel-arrow:focus-visible { opacity: 1; }
.hero .carousel-arrow {
  width: 50px; height: 80px; background: url("assets/main_controls2.png") no-repeat;
}
.hero .previous { left: 15px; }
.hero .next { right: 15px; background-position: -50px 0; }
.dots { display: flex; align-items: center; justify-content: center; gap: 3px; }
.hero .dots { position: absolute; right: 0; bottom: 20px; left: 0; }
.dots button { position: relative; width: 20px; height: 20px; padding: 0; }
.dots button::before { content: ""; display: block; width: 12px; height: 12px; margin: auto; border-radius: 50%; background: #fff; box-shadow: 0 0 3px rgb(0 0 0 / 25%); }
.dots button[aria-current="true"]::before { background: var(--brown); }

/* Introduction */
.intro { padding: 54px 0 34px; overflow: hidden; background: #f8f7f4 url("assets/s1-bg01.webp") right top 30px / 340px auto no-repeat; }
.intro-layout { display: grid; grid-template-columns: 5fr 1fr 6fr; align-items: center; padding: 0; }
.intro-picture { position: relative; margin-inline: 15px; padding: 28px 0 24px 34px; }
.intro-picture::before { position: absolute; top: 0; left: 0; width: calc(100% - 40px); height: calc(100% - 50px); content: ""; border: 2px solid #d9bc9a; border-radius: 20px; }
.intro-picture img { position: relative; width: 100%; height: auto; border-radius: 18px; }
.intro-copy { grid-column: 3; margin-inline: 15px; padding: 48px 0 44px; }
.intro-copy h2 { position: relative; margin-bottom: 34px; padding-bottom: 20px; color: var(--brown); font: 700 34px/1.35 var(--serif); letter-spacing: .08em; }
.intro-copy h2::after { content: ""; position: absolute; bottom: 0; left: 24px; width: 26px; height: 2px; background: var(--gold); }
.intro-copy > p { max-width: 470px; margin-bottom: 24px; color: #7c6f66; font-size: 15px; line-height: 2.1; letter-spacing: .08em; }
.features { display: grid; grid-template-columns: 1fr 1fr; margin: 0 -15px 26px; }
.features li { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding-inline: 15px; color: #68615a; font-size: 15px; line-height: 1.45; letter-spacing: .04em; }
.features li::before { display: grid; place-items: center; flex: 0 0 14px; height: 14px; content: "✓"; border-radius: 50%; color: white; background: var(--gold); font: 700 10px/1 sans-serif; }
.consult { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 7.5px 30px; border-radius: 30px; color: #fff; background: var(--gold); font-size: 15px; font-weight: 700; line-height: 1.35; letter-spacing: .08em; transition: .25s; }
.consult:hover { transform: translateY(-3px); background: #b58e5e; box-shadow: 0 8px 16px rgb(96 85 73 / 16%); }

.section-title { margin-bottom: 35px; text-align: center; }
.section-title h2 { margin: 0 0 6px; color: var(--brown); font: 700 34px/1.35 var(--serif); letter-spacing: .22em; }
.section-title p { color: #a58e83; font-size: 15px; line-height: 1.7; letter-spacing: .08em; }
.services { overflow: hidden; padding: 56px 0 62px; background: #f3f2ef url("assets/s2-bg01.webp") left 48px top 70px / 300px auto no-repeat; }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 30px; padding-bottom: 18px; }
.service-card { display: flex; align-items: center; gap: 18px; min-height: 88px; padding: 25px; border-radius: 8px; background: #fff; box-shadow: 0 8px 18px rgb(96 85 73 / 4%); }
.service-card img { flex: 0 0 88px; width: 88px; height: auto; }
.service-card h3, .doctor-card h3 { font-size: 22px; line-height: 32px; }
.service-card h3 { margin-bottom: 7px; color: #1d1d1d; letter-spacing: .04em; }
.service-card p { color: #2f2f2f; font-size: 15px; line-height: 1.65; letter-spacing: .03em; }

.team { padding: 110px 0; background: url("assets/s2-bg01.webp") left 60px / 30% auto no-repeat, url("assets/s3-bg02.webp") right 120px / 16% auto no-repeat, url("assets/s3-bg03.webp") left bottom / 14% auto no-repeat; }
.doctors { --visible: 4; }
.doctors .slide { padding: 7.5px; }
.doctor-card { display: block; padding: 15px; border-radius: 15px; color: #666; background: #f9f8f6; box-shadow: 2px 2px 3px 3px rgb(0 0 0 / 10%); }
.portrait { overflow: hidden; aspect-ratio: 1; margin-bottom: 10px; border-radius: 15px; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.doctor-profile { min-height: 230px; }
.doctor-card h3 { margin: 0 0 10px; color: #695842; font-family: var(--serif); letter-spacing: 1.5px; }
.doctor-card ul { padding-left: 20px; font-size: 15px; line-height: 1.5; }
.doctor-card li { margin-bottom: 10px; list-style: disc; }
.doctor-card li:last-child { margin-bottom: 0; }
.doctors .carousel-arrow { width: 42px; height: 62px; background-size: cover; }
.doctors .previous { left: -20px; background-image: url("assets/s2_left.png"); }
.doctors .next { right: -20px; background-image: url("assets/s2_right.png"); }
.doctors .dots { position: absolute; right: 0; bottom: -50px; left: 0; }

/* Each clinic has its own accessible tab and complete, locally stored schedule. */
.locations { overflow: hidden; padding: 110px 0; background: url("assets/s5-bg01.webp") -70px 150px / 25% auto no-repeat, #faf9f7 url("assets/s5-bg02.webp") right bottom / 18% auto no-repeat; }
.location-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 30px; margin: 0 -15px 50px; padding: 0 15px 14px; }
.location-tabs button { padding: .55rem 1.5rem; border: 1px solid var(--brown); border-radius: 25px; background: #fff; color: var(--brown); line-height: 1.5; }
.location-tabs button:hover, .location-tabs button[aria-selected="true"] { color: #fff; background: var(--brown); }
.clinic-panel { display: grid; grid-template-columns: 5fr 7fr; align-items: center; margin: 0 -15px; padding-bottom: 30px; }
.clinic-details { padding: 0 30px; color: #858585; font-family: var(--serif); }
.clinic-details h3 { padding: 20px 0; color: #776956; font-size: 20px; line-height: 32px; letter-spacing: 1.5px; border-bottom: 2px solid #e8e4df; }
.clinic-details dl > div { display: grid; grid-template-columns: 1fr 3fr; align-items: center; min-height: 71px; padding: 15px 0; font-size: 18px; line-height: 1.5; letter-spacing: 1.5px; }
.clinic-details dt { color: #d5a96f; font-weight: 600; }
.clinic-details dd { padding-left: 8px; }
.clinic-details dd ul { list-style: none; }
.schedule { margin: 0 15px; overflow: hidden; border-radius: 15px; aspect-ratio: 5 / 4; }
.schedule img { width: 100%; height: 100%; object-fit: contain; }
.contact-banner { padding: 200px 0; background: #6d6658 url("assets/bg-contactus.webp") left top / cover no-repeat; text-align: center; }
.contact-banner h2 { margin: 0 0 8px; color: white; font: 500 36px/44px var(--serif); letter-spacing: 5px; text-shadow: 2px 2px 5px #333; }

.quick-links { position: fixed; right: 10px; bottom: 100px; z-index: 35; display: flex; flex-direction: column; align-items: flex-start; gap: 15px; width: 40px; height: 246px; opacity: .8; }
.quick-links > * { display: block; flex: 0 0 45px; width: 45px; height: 45px; padding: 0; overflow: hidden; border-radius: 50%; background: #fff; }
.quick-links img { width: 100%; height: 100%; object-fit: contain; }
.quick-links:hover, .quick-links:focus-within { opacity: 1; }
.to-top { visibility: hidden; }
.to-top.visible { visibility: visible; }
.contact-dialog { width: min(500px, calc(100% - 28px)); max-height: 90dvh; margin: auto; padding: 0; overflow-y: auto; border: 1px solid rgb(0 0 0 / 15%); border-radius: 5px; color: var(--brown); background: #faf5e9; }
.contact-dialog::backdrop { background: rgb(0 0 0 / 50%); }
.dialog-head, .dialog-foot { display: flex; justify-content: flex-end; align-items: center; padding: 12px 16px; }
.dialog-head button { color: #5a5449; font: 700 26px/1 sans-serif; }
.contact-options { display: grid; gap: 10px; padding: 12px 30px 18px; }
.contact-option { display: flex; align-items: center; gap: 10px; min-height: 78px; padding: 14px 16px; border: 1px solid #e6d7bb; border-radius: 8px; color: #1f1408; background: #fffefb; }
.contact-option:hover { box-shadow: 2px 2px 3px 3px rgb(0 0 0 / 10%); }
.contact-option img { border-radius: 50%; }
.contact-option strong { display: block; font-size: 18px; line-height: 1.35; }
.dialog-foot { border-top: 1px solid #dedbd6; }
.dialog-foot button { padding: 6px 14px; border-radius: 4px; color: white; background: #6c757d; }
.purchase-warning { border-top: 4px solid var(--gold); }
.purchase-warning-copy { padding: 24px; }
.purchase-warning-copy h2 { margin-bottom: 12px; font: 700 24px/1.4 var(--serif); }
.purchase-warning-copy p { color: #40362c; font-size: 17px; line-height: 1.85; }
.purchase-warning .dialog-foot button { min-height: 44px; padding-inline: 20px; background: var(--brown); }

@media (min-width: 992px) and (max-width: 1310px) {
  .brand img { max-width: 15.5vw; height: auto; }
  .main-nav { padding-inline: 0; }
  .nav-trigger { padding-inline: clamp(3px, .42vw, 6px); font-size: clamp(12px, 1.15vw, 15px); }
  .nav-trigger::after { margin-left: 3px; }
  .nav-list > :last-child > .dropdown { right: 0; left: auto; transform: none; }
}
@media (max-width: 1120px) {
  .doctors .previous { left: -12px; }
  .doctors .next { right: -12px; }
}
@media (max-width: 991px) {
  .header-inner { min-height: 65px; padding-block: 5px; }
  .menu-toggle { position: absolute; top: calc(50% - 19px); right: 15px; z-index: 3; display: grid; gap: 4px; width: 46px; height: 38px; place-content: center; border-radius: 4px; background: var(--brown); }
  .menu-toggle span { width: 22px; height: 2px; border-radius: 2px; background: white; transition: transform .2s, opacity .2s; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-6px) rotate(-45deg); }
  .main-nav { position: fixed; z-index: 2; top: 0; right: 0; width: 75%; height: 100dvh; padding: 90px 20px 30px; overflow-y: auto; overscroll-behavior: contain; background: #f5f4f2; visibility: hidden; pointer-events: none; transform: translateX(100%); transition: transform .3s ease, visibility .3s; }
  .main-nav.open { visibility: visible; pointer-events: auto; transform: translateX(0); }
  .menu-shade:not([hidden]) { position: fixed; z-index: 1; inset: 0; display: block; background: rgb(0 0 0 / 35%); }
  body.menu-open { overflow: hidden; }
  .nav-list { display: block; }
  .nav-list > .nav-group + .nav-group { border-top: 1px dashed #d9d7d4; }
  .nav-trigger { padding: 10px 15px; color: #13110e; font-size: 18px; line-height: 27px; text-align: left; }
  .mobile-booking { display: block; margin-bottom: 20px; }
  .mobile-booking a { display: inline-block; padding: 6px 15px; color: white; background: var(--brown); font-size: 18px; }
  .dropdown, .dropdown .nav-group-nested > .dropdown { position: static; width: 100%; min-width: 0; max-width: none; padding-left: 9px; border: 0; transform: none; background: transparent; text-align: left; }
  .dropdown a, .dropdown .nav-trigger, .dropdown .menu-label { padding: 8px 15px; color: #343029; font-size: 15px; }
  .nav-group-nested > .nav-trigger::after { transform: none; }
  .intro { padding: 48px 0 52px; background-position: right bottom 100px; background-size: 100px auto; }
  .intro-layout { display: block; padding-inline: 15px; }
  .intro-picture { max-width: 360px; margin: 0 auto 34px; padding: 22px 0 18px 26px; }
  .intro-picture::before { width: calc(100% - 26px); height: calc(100% - 22px); border-radius: 18px; }
  .intro-copy { margin: 0; padding: 24px 0 0; }
  .intro-copy h2 { margin-bottom: 24px; padding-bottom: 16px; font-size: 28px; line-height: 1.45; }
  .intro-copy > p { max-width: none; font-size: 14px; line-height: 1.9; letter-spacing: .04em; }
  .features { margin-bottom: 22px; }
  .section-title h2 { font-size: 28px; }
  .services { padding: 48px 0 52px; background-position: left top 10px; background-size: 135px auto; }
  .services .section-title { margin-bottom: 26px; }
  .services .section-title p { font-size: 13px; }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 680px; }
  .service-card { gap: 20px; min-height: 84px; padding: 20px; }
  .service-card img { flex-basis: 75px; width: 75px; }
  .service-card h3, .doctor-card h3 { font-size: 20px; line-height: 30px; }
  .service-card p { font-size: 12px; line-height: 1.55; }
  .doctors { --visible: 1; }
  .doctors .carousel-arrow { display: none; }
  .clinic-panel { grid-template-columns: 1fr; gap: 30px; }
  .contact-banner h2 { font-size: 28px; line-height: 40px; }
  .quick-links { right: 5px; }
}
@media (max-width: 768px) {
  .hero picture { aspect-ratio: 5 / 6; }
  .hero .dots { display: none; }
  .hero .carousel-arrow { width: 26px; height: 44px; opacity: 0; background: url("assets/main2_controls.png") left center / 37px 27px no-repeat; }
  .hero .previous { left: 2px; }
  .hero .next { right: 2px; background-position: right center; }
  .hero .carousel-arrow:focus-visible { opacity: 1; }
}
@media (max-width: 767px) {
  .announcement { padding-block: 10px; font-size: 18px; }
  .service-grid { grid-template-columns: 1fr; }
}
@media (max-width: 575px) {
  .features { grid-template-columns: 1fr; }
  .clinic-details { padding-inline: 15px; }
  .clinic-details h3 { padding: 18px 0 20px; font-size: 16px; line-height: 30px; letter-spacing: 1px; }
  .clinic-details dl > div { min-height: 62px; padding: 16px 0; font-size: 15px; letter-spacing: .5px; }
  .clinic-details dd { padding-left: 6px; }
  .location-tabs { margin-inline: 0; column-gap: 30px; }
}
@media (max-height: 560px) { .quick-links { bottom: 8px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; }
  .marquee span { animation: none; }
}
