@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@700;900&display=swap");

/* ------------------------------------------------------------------
   宜蘭景點網 design tokens (shared by every page; home & guide reuse them)
   forest ink / moss green / rice-paper surface / clay accent / amber notice
   ------------------------------------------------------------------ */
:root {
    --ink: #11324d;
    --ink-soft: #1e4766;
    --text: #25313a;
    --muted: #4f5f6c;
    --green: #1d5f94;
    --green-strong: #164a75;
    --leaf: #e3eef8;
    --leaf-strong: #c9ddef;
    --surface: #f2f6fa;
    --paper: #fffffe;
    --line: #d5e0ea;
    --line-strong: #b6c8d8;
    --clay: #b0501d;
    --clay-strong: #8c3d13;
    --sea: #0f7486;
    --amber-bg: #fdf4e3;
    --amber-line: #ecd2a1;
    --amber-ink: #5f3c06;
    --olive: #4d6478;
    --amber: #9a5523;
    --blue: #0f7486;
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow-1: 0 1px 2px rgb(17 50 77 / 6%), 0 3px 10px rgb(17 50 77 / 6%);
    --shadow-2: 0 2px 6px rgb(17 50 77 / 8%), 0 14px 30px rgb(17 50 77 / 12%);
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --display: "Noto Serif TC", "Songti TC", "Source Han Serif TC", "PMingLiU", serif;
    --body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

/* browser surfaces */
::selection { background: #cbe0f3; color: var(--ink); }
html { scroll-padding-top: 84px; accent-color: var(--green); scrollbar-color: #9fb4c7 var(--surface); -webkit-tap-highlight-color: rgb(29 95 148 / 14%); }
body { caret-color: var(--green); }

@font-face { font-family: "Scenic Shell Icons"; src: url("/images/scenic-home/fontawesome-webfont.woff2") format("woff2"); font-display: block; }
.scenic-shell .fa { font: normal 1em/1 "Scenic Shell Icons"; }
.scenic-shell .fa-angle-down::before { content: "\f107"; }
.scenic-shell .fa-map-marker::before { content: "\f041"; }
.scenic-shell .fa-phone::before { content: "\f095"; }
.scenic-shell .fa-bars::before { content: "\f0c9"; }
.scenic-shell .fa-search::before { content: "\f002"; }
.scenic-shell, .scenic-shell * { box-sizing: border-box; }
.scenic-shell { color: var(--text); font: 15px/1.6 var(--body); text-align: start; }
.scenic-shell a, .scenic-shell a:visited { color: var(--ink); text-decoration: none; }
.scenic-shell a:hover { color: var(--green); text-decoration: none; }
.scenic-shell p { margin: 0; }
.scenic-shell .site-wrap { width: min(1320px, calc(100% - 56px)); margin-inline: auto; }
.scenic-shell nav { margin: 0; }
.scenic-shell :focus-visible, .scenic-town-cover a:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
.skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: absolute; z-index: 1100; top: .5rem; left: .5rem; padding: .6rem 1rem; color: white; background: var(--ink); border-radius: var(--radius-sm); }

/* ---------- header ---------- */
.scenic-shell.site-header { position: sticky; top: 0; z-index: 1050; margin: 0; padding: 0; background: var(--paper); box-shadow: 0 1px 0 var(--line), 0 6px 18px rgb(17 50 77 / 5%); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 20px; }
.site-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font: 900 23px/1.15 var(--display); letter-spacing: .02em; white-space: nowrap; }
.scenic-shell .site-brand img { display: block; width: 46px; height: 31px; max-width: 46px; object-fit: contain; }
.site-tagline { flex: 1; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
.header-nav { display: flex; align-items: center; gap: clamp(10px, 1.6vw, 26px); white-space: nowrap; font-size: 15px; font-weight: 700; }
.header-nav > a, .header-nav summary { display: flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 2px; border-bottom: 2px solid transparent; transition: border-color .2s var(--ease-out), color .2s var(--ease-out); }
.header-nav > a:hover, .header-nav summary:hover { border-color: var(--leaf-strong); }
.header-nav > a[aria-current] { color: var(--green); border-color: var(--green); }
.header-nav details { position: relative; }
.header-nav details[open] > summary { color: var(--green); border-color: var(--green); }
.header-nav details[open] > summary .fa-angle-down { transform: rotate(180deg); }
.header-nav summary .fa-angle-down { transition: transform .2s var(--ease-out); }
.header-nav summary { cursor: pointer; list-style: none; }
.header-nav summary::-webkit-details-marker { display: none; }
.nav-panel { position: absolute; z-index: 3; top: calc(100% + 6px); inset-inline-start: -.75rem; min-width: 13rem; list-style: none; margin: 0; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-2); }
.nav-panel a { display: block; padding: 9px 12px; border-radius: var(--radius-sm); font-weight: 600; }
.nav-panel a:hover { background: var(--leaf); color: var(--ink); }
.scenic-shell .nav-panel li a[aria-current] { background: var(--leaf); color: var(--green); font-weight: 800; }
.town-menu { display: grid; grid-template-columns: repeat(2, minmax(6rem, 1fr)); }
.header-cta, .scenic-shell .header-cta:visited { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--clay); color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap; box-shadow: 0 1px 2px rgb(140 61 19 / 25%); transition: background .2s var(--ease-out), transform .2s var(--ease-out); }
.scenic-shell .header-cta:hover { color: #fff; background: var(--clay-strong); }
.scenic-shell .header-cta:active { transform: translateY(1px); }

/* ---------- footer ---------- */
.scenic-shell.site-footer { margin: 56px 0 0; padding: 0; background: var(--ink); color: #d3e1ee; font-size: 15px; }
.scenic-shell.site-footer a, .scenic-shell.site-footer a:visited { color: #e8f0f7; }
.scenic-shell.site-footer a:hover { color: #fff; text-decoration: underline; text-decoration-color: rgb(255 255 255 / 45%); text-underline-offset: 4px; }
.footer-main { display: grid; grid-template-columns: minmax(260px, 1.5fr) minmax(0, 1.25fr) repeat(3, minmax(0, 1fr)); gap: 40px 36px; padding: 52px 0 44px; }
.footer-brand p { max-width: 30ch; margin-top: 14px; color: #b3c7d8; font-size: 14px; line-height: 1.75; }
.scenic-shell.site-footer .site-brand { color: #fff; font-size: 24px; }
.scenic-shell.site-footer .site-brand img { filter: brightness(0) invert(1); }
.footer-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.scenic-shell .footer-btn, .scenic-shell .footer-btn:visited { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 999px; background: var(--clay); color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; transition: background .2s var(--ease-out), transform .2s var(--ease-out); }
.scenic-shell .footer-btn:hover { background: var(--clay-strong); color: #fff; text-decoration: none; }
.scenic-shell .footer-btn:active { transform: translateY(1px); }
.scenic-shell .footer-btn.is-ghost { background: transparent; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 38%); }
.scenic-shell .footer-btn.is-ghost:hover { background: rgb(255 255 255 / 10%); }
.footer-heading { margin: 0 0 14px !important; padding-bottom: 10px; border-bottom: 1px solid rgb(255 255 255 / 14%); color: #fff; font: 700 16px/1.3 var(--display); letter-spacing: .06em; }
.footer-col ul { margin: 0; padding: 0; list-style: none; }
.footer-col li { margin: 0; color: #b3c7d8; font-size: 14px; line-height: 1.5; }
.footer-col li + li { margin-top: 2px; }
.footer-col li a { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; font-size: 14px; }
.footer-town-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.footer-town-list li + li { margin-top: 0; }
.footer-contact li:first-child { margin-bottom: 4px; color: #e8f0f7; font-weight: 700; }
.footer-bottom { border-top: 1px solid rgb(255 255 255 / 12%); background: rgb(0 0 0 / 14%); }
.footer-bottom .site-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-block: 16px; }
.footer-bottom p { margin: 0; color: #9fb6ca; font-size: 13px; }
.footer-bottom p:last-child { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.scenic-shell .footer-bottom a { color: #c6d6e4; font-size: 13px; }

/* ---------- town page cover ---------- */
.scenic-town { background: var(--surface); }
.scenic-town .scenic-town-main > .indexbg2.mt170 { margin-top: 0 !important; padding-top: 0 !important; }
.scenic-town .scenic-town-main > .indexbg2 { background: none; }
.scenic-town-cover { display: grid; align-items: end; min-height: clamp(320px, 40vw, 520px); isolation: isolate; position: relative; color: #fff; background: var(--ink); }
.town-cover-photo { position: absolute; inset: 0; z-index: -2; margin: 0; }
.town-cover-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 48%; }
.scenic-town-cover::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgb(8 28 46 / 92%), rgb(12 36 58 / 55%) 46%, rgb(10 32 52 / 8%) 84%); }
.town-cover-photo figcaption { position: absolute; z-index: 1; inset-inline-end: 20px; bottom: 14px; font-size: 13px; color: white; text-shadow: 0 1px 4px #0e2537; }
.town-cover-copy { width: min(1130px, calc(100% - 56px)); margin: 0 auto; padding: 28px 0 42px; text-align: start; }
.town-cover-copy nav { font-size: 14px; font-weight: 600; color: #e3edf6; }
.town-cover-copy a { color: #fff; }
.town-cover-copy h1 { margin: 10px 0 12px; color: #fff; font: 900 clamp(36px, 5.4vw, 64px)/1.12 var(--display); letter-spacing: .02em; text-wrap: balance; }
.town-cover-copy p { max-width: 52ch; color: #f1f6fa; margin: 0 0 20px; font: 17px/1.7 var(--body); }
.town-cover-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: #fff; color: var(--ink) !important; font-weight: 700; box-shadow: var(--shadow-1); transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out); }
.town-cover-link:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); color: var(--ink) !important; text-decoration: none; }
.scenic-town #services_banner { padding-top: 24px; }
.scenic-town #services_banner .routein2 { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding-block: 16px; }
.scenic-town #services_banner .routein2 img { max-height: 240px; width: auto; margin-inline: auto; }
.scenic-town #services_banner .routein2 .bannertext p { color: var(--text); font-size: 16px; line-height: 1.85; }
.scenic-town #town-highlights { scroll-margin-top: 80px; }
.scenic-town .sceniclbox h2, .scenic-town .scenict h2 { color: var(--ink); font-family: var(--display); font-weight: 700; }
.scenic-town .spot-more { margin: 10px 0 4px; }
.scenic-town .spot-more a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--green); color: #fff !important; font-size: 14px; font-weight: 700; text-decoration: none !important; transition: background .2s var(--ease-out); }
.scenic-town .spot-more a:hover { background: var(--green-strong); }
.scenic-town [id^="sceno"] { scroll-margin-top: 80px; }
.scenic-news .scenic-town-main { min-height: 45vh; }

/* ---------- article shell (static pages) ---------- */
.scenic-article { width: min(1000px, calc(100% - 32px)); }
.scenic-article h1 { color: var(--ink); font: 900 clamp(30px, 4.4vw, 50px)/1.2 var(--display); letter-spacing: .01em; margin: .5em 0 .45em; text-wrap: balance; }
.scenic-article-photo { position: relative; margin: 16px 0 24px; overflow: hidden; border-radius: var(--radius-lg); background: var(--leaf); color: #fff; }
.scenic-article-photo img { display: block; width: 100%; height: auto; aspect-ratio: 2.32; object-fit: cover; }
.scenic-article-photo figcaption { position: absolute; inset-inline-end: 0; bottom: 0; padding: 6px 12px; color: #fff; background: rgb(12 34 54 / 78%); font-size: 13px; border-top-left-radius: var(--radius-sm); }

@media (max-width: 1080px) {
    .scenic-shell .site-tagline { display: none; }
    .footer-main { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .footer-brand { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 32px; }
    .footer-brand p { max-width: 46ch; margin-top: 0; }
    .footer-actions { grid-column: 1 / -1; margin-top: 4px; }
    .footer-towns { grid-column: 1 / -1; }
    .footer-town-list { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .scenic-shell .site-wrap { width: calc(100% - 32px); }
    .town-cover-copy { width: calc(100% - 32px); }
    .footer-main { grid-template-columns: 1fr 1fr; gap: 36px 28px; padding: 40px 0 32px; }
    .footer-brand, .footer-towns { grid-column: 1 / -1; }
    .footer-town-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .footer-town-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .footer-brand { display: block; }
    .footer-brand p { margin-top: 14px; }
    .footer-actions { margin-top: 18px; }
    .footer-bottom .site-wrap { flex-direction: column; align-items: flex-start; }
    .town-cover-photo img { object-position: center; }
    .town-cover-copy { padding-bottom: 34px; }
    .town-cover-copy p { font-size: 15px; }
    .town-cover-photo figcaption { bottom: 6px; inset-inline-end: 12px; }
    .scenic-town #services_banner .routein2 img { max-height: 170px; }
    .scenic-article-photo { border-radius: var(--radius); }
    .scenic-article-photo img { aspect-ratio: 1.6; }
}
@media (max-width: 365px) {
    .scenic-shell .site-wrap { width: calc(100% - 22px); }
    .scenic-shell .site-brand { font-size: 20px; }
}

/* ---------- mobile menu ---------- */
.scenic-shell [hidden] { display: none !important; }
.scenic-mobile-toggle, .scenic-shell .mobile-search { display: none; }
@media (max-width: 860px) {
    .scenic-shell .header-inner { flex-wrap: wrap; min-height: 58px; gap: 0 12px; padding-block: 7px; }
    .scenic-shell .header-inner > .header-cta { display: none; }
    .scenic-shell .scenic-mobile-toggle { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink); background: var(--paper); font-size: 15px; font-weight: 700; cursor: pointer; }
    .scenic-shell .scenic-mobile-toggle[aria-expanded="true"] { background: var(--leaf); border-color: var(--green); color: var(--green); }
    .scenic-shell .header-nav { order: 3; display: grid; grid-template-columns: 1fr; align-items: stretch; width: 100%; max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); overflow-y: auto; overscroll-behavior: contain; gap: 0; padding: 6px 0 12px; border-top: 1px solid var(--line); font-size: 16px; white-space: normal; }
    .scenic-shell .header-nav > a, .scenic-shell .header-nav summary { justify-content: space-between; min-height: 50px; padding-inline: 6px; border-bottom: 1px solid var(--line); }
    .scenic-shell .header-nav > a:hover, .scenic-shell .header-nav summary:hover { border-color: var(--line); }
    .scenic-shell .header-nav > a[aria-current], .scenic-shell .header-nav details[open] > summary { border-color: var(--line); color: var(--green); }
    .scenic-shell .header-nav details { position: static; }
    .scenic-shell .nav-panel { position: static; padding: 6px; margin: 4px 0 8px; border: 0; border-radius: var(--radius); background: var(--surface); box-shadow: none; }
    .scenic-shell .nav-panel a { min-height: 46px; display: flex; align-items: center; white-space: normal; }
    .scenic-shell .town-menu { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .scenic-shell .header-nav .mobile-search { display: inline-flex; justify-content: center; gap: 10px; margin-top: 12px; min-height: 48px; border: 0; border-radius: 999px; background: var(--clay); color: #fff; }
}
@media (prefers-reduced-motion: reduce) {
    .scenic-shell *, .town-cover-link { transition: none !important; }
}
