/* 客人選定的上方版面（只給螢幕用，media="screen"）：頁首融入照片、往下滑白色半透明、LOGO 紅、搜尋列融入照片、內頁頁首放主題照片。
   html 的 is-scrolled（往下滑）與 head-on（頁首變白）由 main.js 控制；body 的 mt-photo／mt-photo-lg 由 inc/helpers.php 加。 */
html:root { --hh: 62px; }
@media (max-width: 1023px) { html:root { --hh: 58px; } }

/* 頁首 */
html:root .site-header { --fg: var(--text); position: fixed; top: 0; left: 0; right: 0; background: none; border: 0; box-shadow: none; }
html:root .single-mt_tour .site-header { position: absolute; }
html:root .site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #fff; opacity: 0; transition: opacity .25s; }
html:root.head-on .site-header::before { opacity: 1; background: rgba(255, 255, 255, .74); box-shadow: 0 1px 0 rgba(40, 30, 22, .08), 0 6px 20px rgba(40, 30, 22, .06); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
html:root.nav-open .site-header::before { background: #fff; }
html:root .home .site-header, html:root .mt-photo .site-header { --fg: #fff; }
html:root.head-on body .site-header { --fg: var(--text); }
html:root .site-header :is(.brand__name, .brand__sub), html:root .nav-toggle { color: var(--fg); transition: color .25s; }
html:root.head-on .site-header .brand__sub { color: var(--brand); }
html:root:not(.head-on) :is(.home, .mt-photo) .site-header :is(.brand__name, .brand__sub, .nav-toggle) { text-shadow: 0 1px 10px rgba(0, 0, 0, .55); }
html:root .site-header :is(.site-header__brand, .brand) { display: flex; align-items: center; }
html:root .site-header .brand { min-height: 0; gap: .625rem; }
html:root .site-header .brand > * { display: flex; }
html:root .site-header .brand__txt { flex-direction: column; justify-content: center; }
html:root .site-header .custom-logo { display: block; width: auto; height: 42px; }
html:root:not(.head-on) :is(.home, .mt-photo) .site-header .custom-logo { background: linear-gradient(#fff, #fff) center / 90% 90% no-repeat; }
html:root .site-header__in { min-height: var(--hh); }
html:root .site-header .site-nav { background: none; }
html:root .mt-tel a { gap: .375rem; }
@media (min-width: 783px) { html:root .admin-bar .site-header { margin-top: 32px; } }
@media (max-width: 782px) { html:root:not(.is-scrolled) .admin-bar .site-header { margin-top: 46px; } }

@media (min-width: 1024px) {
	html:root .site-header .brand__name { font-size: 1.4375rem; line-height: 1.2; }
	html:root .site-header .brand__sub { font-size: .75rem; line-height: 1.2; }
	html:root .nav-list > li > :is(a, .sub-toggle) { color: var(--fg); transition: color .25s; }
	html:root .nav-list > li > a::after { bottom: 8px; background: currentColor; }
	html:root.head-on .site-header .nav-list > li > a::after { background: var(--brand); }
	html:root:not(.head-on) :is(.home, .mt-photo) .site-header .nav-list > li > a { text-shadow: 0 1px 10px rgba(0, 0, 0, .55); }
	html:root .sub-menu { border-color: transparent; }
	html:root .site-header .site-nav__line { display: none; }
	html:root .mt-tel { margin-left: .25rem; padding-left: .75rem; }
	html:root .mt-tel::before { content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: 18px; margin-top: -9px; background: currentColor; opacity: .45; color: var(--fg); }
	html:root .nav-list > .mt-tel > a::after { display: none; }
	html:root .nav-list > li:has(+ .mt-tel) > .sub-menu { left: auto; right: -1rem; }
}
@media (max-width: 1023px) {
	html:root .site-header .custom-logo { height: 38px; }
	html:root .site-header .site-nav { background: #fff; }
	html:root:not(.js) .site-header { position: static; }
}

/* 內容第一塊讓出頁首高度 */
html:root .site-main > :where(:first-child:not(.hero)) { border-top: var(--hh) solid transparent; background-origin: border-box; }
html:root .hero--empty { padding-top: var(--hh); }

/* 輪播：上方壓暗，不另外分色塊；文字底用中性黑 */
html:root .hero { --shade: 0, 0, 0; }
html:root .hero::before { content: ""; position: absolute; z-index: 3; left: 0; right: 0; top: 0; height: 250px; background: linear-gradient(rgba(0, 0, 0, .66), rgba(0, 0, 0, .46) 46%, rgba(0, 0, 0, 0)); pointer-events: none; }
@media (min-width: 1024px) {
	html:root .hero__slides { height: clamp(460px, calc(37.5vw + 70px), 1030px); max-height: max(600px, calc(100vh - 60px)); }
}
@media (max-width: 767px) {
	html:root .hero__slides { aspect-ratio: 4 / 3.3; }
	html:root .hero--text .hero__slides { aspect-ratio: 1 / 1.12; max-height: 540px; }
	html:root .hero::before { height: 150px; }
}

/* 搜尋列融入照片（手機的搜尋列在照片下方，維持白底） */
@media (min-width: 768px) {
	html:root .filter--hero { background: rgba(20, 16, 12, .34); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .42); }
	html:root .filter--hero :is(.filter__field, .filter__field > .icon, .filter__chev, select, input) { color: #fff; }
	html:root .filter--hero input::placeholder { color: #fff; }
	html:root .filter--hero select option { color: #3A332C; background: #fff; }
	html:root .filter--hero .filter__field + .filter__field::before { background: rgba(255, 255, 255, .42); }
	html:root .filter--hero .filter__field:focus-within { outline-color: #fff; }
	html:root .filter--hero .filter__btn { background: var(--brand); box-shadow: none; color: #fff; }
	html:root .filter--hero .filter__btn:hover { background: var(--brand-dark); }
}

/* 內頁頁首：主題照片。直式＝右邊放照片、往左淡出到單一深色（取自照片左側）；橫式＝鋪滿 */
html:root :is(.page-head, .tour-head) .mountains { display: none; }
.mt-ph { position: absolute; z-index: 0; inset: 0; overflow: hidden; background: rgb(var(--ph, 43, 36, 29)); pointer-events: none; }
.mt-ph .p { position: absolute; right: 0; top: 0; width: 64%; max-width: none; height: 100%; object-fit: cover; object-position: 50% 36%; -webkit-mask-image: linear-gradient(to right, transparent 0, rgba(0, 0, 0, .03) 8%, rgba(0, 0, 0, .12) 18%, rgba(0, 0, 0, .3) 30%, rgba(0, 0, 0, .54) 42%, rgba(0, 0, 0, .78) 54%, rgba(0, 0, 0, .94) 66%, #000 78%); mask-image: linear-gradient(to right, transparent 0, rgba(0, 0, 0, .03) 8%, rgba(0, 0, 0, .12) 18%, rgba(0, 0, 0, .3) 30%, rgba(0, 0, 0, .54) 42%, rgba(0, 0, 0, .78) 54%, rgba(0, 0, 0, .94) 66%, #000 78%); }
.mt-ph--wide .p { width: 100%; object-position: 50% 55%; -webkit-mask-image: none; mask-image: none; }
.mt-ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0, 0, 0, .42), rgba(0, 0, 0, .12) 45%, rgba(0, 0, 0, 0)); }
.mt-ph--wide::after { background: linear-gradient(rgba(0, 0, 0, .58), rgba(0, 0, 0, .2) 45%, rgba(0, 0, 0, .1)), linear-gradient(to right, rgba(0, 0, 0, .58), rgba(0, 0, 0, .34) 42%, rgba(0, 0, 0, 0) 78%); }
@media (max-width: 767px) { .mt-ph:not(.mt-ph--wide) .p { width: 100%; opacity: .75; } }
html:root body.mt-photo .page-head { border-top: 0; padding-top: var(--hh); background: #2b241d; }
html:root body.mt-photo .page-head .page-head__in { position: relative; z-index: 1; min-height: clamp(190px, 22vw, 330px); display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 2.25rem; }
html:root body.mt-photo .page-head--region .page-head__in { align-items: flex-start; }
html:root body.mt-photo .page-head :is(.page-head__title, .page-head__lede, .page-head__eyebrow, .crumbs) { color: #fff; text-shadow: 0 1px 10px rgba(0, 0, 0, .6); }
html:root body.mt-photo .page-head :is(.crumbs, .page-head__eyebrow) * { color: #fff; }
html:root body.mt-photo .page-head__title { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 3rem); }
html:root body.mt-photo .page-head__title::after { background: #fff; }

/* 行程頁：電腦版墊同色深底（手機本來就有大封面，不墊） */
.mt-ph--tone::after { background: linear-gradient(100deg, rgba(0, 0, 0, .18), rgba(255, 255, 255, 0) 45%, rgba(255, 255, 255, .22)); }
@media (max-width: 899px) { .mt-ph--tone { display: none; } }
@media (min-width: 900px) {
	html:root .mt-photo-lg .site-header { --fg: #fff; }
	html:root:not(.head-on) .mt-photo-lg .site-header :is(.brand__name, .brand__sub, .nav-toggle, .nav-list > li > a) { text-shadow: 0 1px 10px rgba(0, 0, 0, .55); }
	html:root:not(.head-on) .mt-photo-lg .site-header .custom-logo { background: linear-gradient(#fff, #fff) center / 90% 90% no-repeat; }
	html:root body.mt-photo-lg .site-main > .tour-head { border-top: 0; padding-top: var(--hh); background: #2b241d; }
	html:root .mt-photo-lg .tour-head .tour-head__in { position: relative; z-index: 1; }
	html:root .mt-photo-lg .tour-head :is(.tour-head__title, .tour-head__sub, .page-head__eyebrow, .crumbs) { color: #fff; text-shadow: 0 1px 10px rgba(0, 0, 0, .6); }
	html:root .mt-photo-lg .tour-head :is(.crumbs, .page-head__eyebrow) * { color: #fff; }
	html:root .mt-photo-lg .tour-head .facts li { background: rgba(255, 255, 255, .92); }
}
html:root .tour-nav { background: rgba(255, 255, 255, .55); }
html:root .tour-nav.is-stuck { background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
