/* 台東民宿網 鄉鎮頁新版型（階段 4，比照宜蘭 Bootstrap 內頁）
   搭配 header/css/bootstrap.min.css、bootsnav.css、overwrite.css、style.css、css/township-seo.css
   本版型不載入 mob/css/main.css（它有全域 a{display:block}、h1/h2 隱藏等規則，會吃掉內文標題） */
html, body { overflow-x: hidden; }
body.twp { font-family: "Noto Sans TC", "微軟正黑體", "PingFang TC", Arial, sans-serif; color: #333; background: #fff; font-size: 15px; line-height: 1.7; }
.twp a { color: #333977; }
.twp a:hover { color: #c0392b; text-decoration: none; }
.twp img { max-width: 100%; height: auto; }

/* 預覽列 */
.twp-preview { background: #c00; color: #fff; text-align: center; font-size: 13px; padding: 6px 10px; }

/* 頁首：bootsnav */
/* 宜蘭的 style.css 把 nav 設成 position:fixed，會蓋住下方 banner；改 sticky：一樣跟著捲動，但佔版面高度 */
nav.navbar.bootsnav { background: #fff; border: 0; border-bottom: 1px solid #e6e6e6; margin-bottom: 0; position: -webkit-sticky !important; position: sticky !important; top: 0; z-index: 1000; width: 100%; }
nav.navbar.bootsnav .navbar-brand { height: auto; padding: 12px 15px; line-height: 1.2; }
/* 品牌列：與首頁相同的 logo 圖（images/logo.png） */
nav.navbar.bootsnav .navbar-brand img.twp-logo { display: block; height: 52px; width: auto; max-width: none; }
@media (max-width: 1023px) { nav.navbar.bootsnav .navbar-brand img.twp-logo { height: 42px; } }
.twp-brand { display: block; font-size: 22px; font-weight: 700; color: #333977; letter-spacing: 2px; }
.twp-brand-sub { display: block; font-size: 12px; color: #888; letter-spacing: 1px; }
nav.navbar.bootsnav ul.nav > li > a { color: #333; font-size: 15px; }
nav.navbar.bootsnav ul.nav > li > a .fa-chevron-right { display: none; }
nav.navbar.bootsnav ul.nav > li > a .fa-sort-down { margin-left: 4px; font-size: 12px; position: relative; top: -2px; }
nav.navbar.bootsnav ul.nav > li > a .navtt { margin-left: 5px; }
nav.navbar.bootsnav li.dropdown ul.dropdown-menu { border-top-color: #333977; min-width: 220px; }
nav.navbar.bootsnav li.dropdown ul.dropdown-menu > li > a { padding: 9px 15px; font-size: 14px; white-space: normal; }
nav.navbar.bootsnav li.dropdown ul.dropdown-menu > li > a:hover { color: #c0392b; background: #f7f7f4; }
nav.navbar.bootsnav .navbar-toggle { font-size: 22px; color: #333977; background: transparent; border: 0; margin-top: 14px; }
@media (min-width: 1024px) {
	nav.navbar.bootsnav ul.nav > li > a { padding: 14px 14px; text-align: center; }
}
.twp a, .twp-towns a, nav.navbar.bootsnav a { text-decoration: none; }
@media (max-width: 1023px) {
	/* 手機頁首：品牌在左、漢堡鈕在右，同一列 */
	nav.navbar.bootsnav .navbar-header { display: flex; align-items: center; justify-content: space-between; flex-direction: row-reverse; float: none; margin: 0; padding: 0 6px; }
	nav.navbar.bootsnav .navbar-brand { float: none; display: block; margin: 0; padding: 10px 8px; text-align: left; position: static; }
	nav.navbar.bootsnav .navbar-toggle { float: none; margin: 0; padding: 8px 10px; }
	nav.navbar.bootsnav { min-height: 0; }
	.twp-brand { font-size: 20px; }
	nav.navbar.bootsnav ul.nav > li > a { padding: 12px 15px; border-bottom: 1px solid #eee; }
	nav.navbar.bootsnav ul.nav > li > a .fa-sort-down { float: right; top: 4px; }
	nav.navbar.bootsnav .navbar-collapse { max-height: 75vh; overflow-y: auto; }
}

/* banner＋H1 */
.twp-banner { background: linear-gradient(135deg, #333977 0%, #1a7f8e 100%); color: #fff; padding: 34px 0 30px; }
.twp-banner h1 { position: static; opacity: 1; margin: 6px 0 8px; font-size: 32px; font-weight: 700; letter-spacing: 2px; color: #fff; }
.twp-banner .twp-crumb { margin: 0; font-size: 13px; opacity: .85; }
.twp-banner .twp-crumb a { color: #fff; text-decoration: underline; }
.twp-banner .twp-lead { margin: 0; font-size: 15px; opacity: .92; }

/* 15 鄉鎮切換 */
.twp-towns { background: #f4f5f2; border-bottom: 1px solid #e3e5df; padding: 10px 0; }
.twp-towns a { display: inline-block; margin: 3px 4px 3px 0; padding: 5px 12px; border: 1px solid #d6d9d0; border-radius: 20px; background: #fff; font-size: 14px; color: #444; }
.twp-towns a.on { background: #333977; border-color: #333977; color: #fff; }
.twp-towns a:hover { border-color: #333977; color: #333977; }
.twp-towns a.on:hover { color: #fff; }

/* 區塊 */
.twp-sec { padding: 26px 0 8px; }
.twp-h2 { position: static; opacity: 1; margin: 0 0 14px; padding-left: 12px; border-left: 5px solid #333977; font-size: 22px; font-weight: 700; color: #222; line-height: 1.3; }
.twp-h2 a { color: inherit; }
.twp-note { font-size: 14px; color: #777; margin: 0 0 12px; }
.twp-note img { vertical-align: middle; }

/* 推薦廣告（ad.hlcity 輸出 li；沿用舊頁 .pre／.bbimg 的排法） */
.twp .pre ul, .twp .bbimg ul { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.twp .pre ul li { float: left; width: 33.333%; padding: 4px; box-sizing: border-box; }
.twp .pre img { width: 100%; }
.twp .bbimg ul li { float: left; width: 16.666%; padding: 4px; box-sizing: border-box; text-align: center; font-size: 13px; }
.twp .bbimg img { width: 100%; }
.twp .animate_Flashing img:hover { opacity: .75; }

/* bnb26 卡片外層不要再縮排 */
.twp .bnb-wrapper { margin-top: 0; }

/* 手動名單片段（表格）：桌機照表格排，手機可橫向捲動 */
.twp-oklist { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #eceee8; border-radius: 8px; padding: 8px; background: #fcfcfa; }
.twp-oklist table { max-width: none; }
.twp-oklist td { padding: 3px 6px; font-size: 14px; }
.twp-oklist img { max-width: none; vertical-align: middle; }

/* SEO 區塊容器（內文樣式在 township-seo.css） */
.twp-seo h2, .twp-seo h3 { position: static; opacity: 1; }

/* 宿說、連結牆 */
.twp-story table { width: 100%; }
.twp-embed { overflow-x: auto; font-size: 14px; margin-bottom: 10px; }
.twp-embed table { max-width: 100%; }
.twp-embed a { display: inline; }

/* 回頂端 */
#gotop { position: fixed; right: 14px; bottom: 18px; z-index: 50; }
#gotop a { display: block; width: 40px; height: 40px; line-height: 40px; text-align: center; border-radius: 50%; background: #333977; color: #fff; opacity: .85; }
#gotop a:hover { opacity: 1; color: #fff; }

@media (max-width: 991px) {
	.twp .pre ul li { width: 50%; }
	.twp .bbimg ul li { width: 33.333%; }
}
@media (max-width: 600px) {
	.twp-banner { padding: 22px 0 20px; }
	.twp-banner h1 { font-size: 24px; }
	.twp-h2 { font-size: 19px; }
	.twp .pre ul li { width: 100%; }
	.twp .bbimg ul li { width: 50%; }
	.twp-sec { padding: 20px 0 6px; }
}

/* 主題住宿頁、民宿快搜 */
.twp-points { margin: 0 0 12px; padding-left: 1.3em; }
.twp-points li { margin: 4px 0; }
.twp-bytown { font-size: 14px; color: #555; margin: 0 0 6px; line-height: 2; }
.twp-bytown a, .twp-note a { text-decoration: underline; }
.fnd { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; padding: 16px; margin-bottom: 12px; background: #f7f8f5; border: 1px solid #e3e5df; border-radius: 10px; }
.fnd-f { display: block; margin: 0; font-size: 13px; font-weight: 600; color: #555; }
.fnd-f select, .fnd-f input { display: block; margin-top: 4px; min-width: 220px; height: 40px; padding: 6px 10px; font-size: 15px; font-weight: 400; color: #333; background: #fff; border: 1px solid #cfd3c8; border-radius: 6px; }
.fnd-tags { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 8px; }
.fnd-tag, .fnd-reset { padding: 6px 14px; font-size: 14px; color: #444; background: #fff; border: 1px solid #cfd3c8; border-radius: 20px; cursor: pointer; }
.fnd-tag span { color: #999; font-size: 12px; }
.fnd-tag.on { background: #333977; border-color: #333977; color: #fff; }
.fnd-tag.on span { color: #cfd3ea; }
.fnd-reset { border-style: dashed; color: #777; }
.fnd-count { flex: 1 1 100%; margin: 0; font-size: 15px; }
.fnd-count strong { color: #c0392b; font-size: 18px; }
.fnd-empty { padding: 30px 0; text-align: center; color: #777; }
@media (max-width: 600px) { .fnd-f, .fnd-f select, .fnd-f input { width: 100%; min-width: 0; } }

/* 合法民宿名冊 directory/ */
.dir-q { width: 100%; max-width: 420px; height: 40px; padding: 6px 12px; font-size: 15px; border: 1px solid #cfd3c8; border-radius: 6px; }
.dir-n { margin-left: 10px; font-size: 14px; color: #666; }
.dir-n strong { color: #c0392b; }
.dir-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #e3e5df; border-radius: 8px; }
.dir-table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.dir-table th { position: sticky; top: 0; padding: 10px 12px; background: #333977; color: #fff; font-weight: 600; text-align: left; white-space: nowrap; }
.dir-table td { padding: 9px 12px; border-top: 1px solid #eef0ea; vertical-align: top; line-height: 1.6; }
.dir-table tbody tr:nth-child(even) td { background: #fafbf8; }
.dir-table .dir-name { font-weight: 600; color: #222; min-width: 150px; }
.dir-table .dir-num, .dir-table .dir-tel { white-space: nowrap; }
.dir-table .dir-total td { font-weight: 700; background: #f1f3ee; }
.dir-our { display: inline-block; margin-left: 6px; padding: 1px 8px; font-size: 12px; font-weight: 400; color: #fff !important; background: #4f8a55; border-radius: 10px; text-decoration: none !important; }
.dir-q3 { position: static; opacity: 1; margin: 16px 0 6px; font-size: 17px; font-weight: 700; color: #333977; }
@media (max-width: 600px) { .dir-table { font-size: 13px; } .dir-table th, .dir-table td { padding: 8px; } }
