:root {
	--brand: #003682;
	--brand-600: #0a3f95;
	--accent: #1e40af;
	--bg: #ffffff;
	--surface: #ffffff;
	--surface-2: #f8fafc;
	--text: #0f172a;
	--muted: #475569;
	--line: #e5e7eb;
	--radius: 16px;
	--shadow: 0 8px 28px rgba(2, 6, 23, .08);
	--maxw: 1440px;
}
* {
	box-sizing: border-box
}
html, body {
	height: 100%
}
body {
	margin: 0;
	font-family: 'Noto Sans TC', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
	color: var(--text);
	background: var(--bg);
	line-height: 1.6;
	font-size:1rem;
}
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('../../assets/img/bg1.png') center/cover no-repeat;
    opacity: 0;
    transition: opacity 1s ease;
    z-index: -1; /* 在內容底下 */
  }
body.bg-show::before {
    opacity: 0.7;
  }

body.menu-open {
	overflow: hidden;
	/* 背景不動 */
}
body.menu-open .mobile-panel {
	overflow: hidden;
	/* 面板自己控制 */
}
a {
	color: inherit;
	text-decoration: none;
}
img {
	max-width: 100%;
	display: block
}
.container {
	width: 100%;
	max-width: var(--maxw);
	margin-inline: auto;
	padding-inline: 10px;
}
.p_container {
    background-color: #fff;
    }
.btn {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .8rem 1.2rem;
	border-radius: 4px;
	font-weight: 600;
	background: linear-gradient(140deg, var(--brand), var(--accent));
	color: #fff;
	border: 1px solid rgba(2, 6, 23, .06);
	box-shadow: var(--shadow);
	transition: .2s transform ease, .2s opacity ease, .2s filter ease
}
.btn:hover {
	transform: translateY(-1px);
	filter: saturate(1.1)
}
.btn.ghost {
	background: transparent;
	border-color: #c7d2fe;
	color: #1e3a8a
}
.btn.ghost:hover {
	background: #eef2ff
}
/* Topbar */

.topbar {
	background: var(--surface-2);
	border-bottom: 1px solid var(--line);
	font-size: .9rem;
	color: #334155
}
.topbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 0
}
.mini-info {
	opacity: .9
}
.lang-switch {
	display: flex;
	align-items: center;
	gap: .4rem
}
.globe {
	display: inline-flex;
	align-items: center;
	color: #334155
}
.lang-select {
	appearance: none;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 0;
	padding: .35rem .9rem;
	font-weight: 600;
	color: #0f172a
}
.lang-select:focus {
	outline: 2px solid #c7d2fe
}
/* Topbar search */

.topbar-search form {
	display: flex;
	align-items: center;
	gap: 6px;
}
.topbar-search input {
	padding: 6px 10px;
	border: 1px solid var(--line);
	border-radius: 0;
	/* 與全站直角一致 */
	font-size: 14px;
	min-width: 180px;
	background: #fff;
	color: #0f172a;
}
.topbar-search input::placeholder {
	color: #64748b;
}
.topbar-search button {
	border: 1px solid var(--line);
	background: #003682;
	color: #fff;
	padding: 6px 10px;
	border-radius: 4px;
	/* 與按鈕一致 */
	cursor: pointer;
}
.topbar-search button:hover {
	filter: saturate(1.05);
}
.topbar-left {
	flex: 1;
	padding: 0 10px;
}
/* 強制語言選單 + 搜尋框同一行 */

.topbar-right {
	margin-left: auto;
	/* 把整塊推到右邊 */
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: nowrap;
	/* 不允許換行 */
	padding: 0 10px;
}
.topbar-search {
	flex: 1;
	/* 讓搜尋框佔滿剩餘空間 */
	width: auto;
	/* 避免 100% 撐到換行 */
}
.topbar-search form {
	display: flex;
	width: 100%;
}
.topbar-search input {
	flex: 1;
	min-width: 0;
	/* 防止過小螢幕時被內容撐爆 */
}
/* 手機版：分成直排 */

@media (max-width: 640px) {
	.topbar-inner {
		flex-direction: column;
		/* 垂直排列 */
		align-items: flex-start;
		/* 從左側開始 */
		gap: 8px;
	}
	.topbar-left, .topbar-right, .topbar-search {
		width: 100%;
	}
	.topbar-right {
		flex-direction: column;
		/* 語言選單、搜尋框各自獨立一行 */
		align-items: flex-start;
		gap: 8px;
		margin-left: 0;
		/* 不再推到右邊 */
	}
	.topbar-search {
		margin-top: 0;
		/* 拿掉原本的 margin-top */
	}
	.topbar-search form {
		display: flex;
		width: 100%;
	}
	.topbar-search input {
		flex: 1;
		min-width: 0;
	}
	.topbar-search button {
		flex: 0 0 auto;
	}
}
/* header */

.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: #fff;
	border-bottom: 1px solid var(--line)
}
.nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	/*padding: 12px 0*/
}
.brand {
	display: flex;
	align-items: center;
	/*gap: 7.75rem;*/
}
.logo {
	width: 100px;
}
.brand-name {
	font-size: 1.15rem;
	letter-spacing: .5px;
	font-weight: 600;
	color: #003682;
	text-shadow: 1px 2px 1px #d5e5fe;
	line-height: 12pt;
}
.menu {
	display: flex;
	align-items: center;
	gap: .3rem
}
.menu-item>a, .sub-trigger {
  font-family:Arial;
	padding: .6rem .8rem;
	border-radius: 0;
	color: #0f172a;
	font-size: 1rem;
	/* 這裡調整字體大小，兩者一致 */
	line-height: 1.5;
}
.menu-item>a:hover, .sub-trigger:hover {
  font-family:Arial;
	background: #f1f5f9;
	font-size: 1rem;
	/* 這裡調整字體大小，兩者一致 */
	line-height: 1.5;
  border-bottom: solid 3px #003682;
}



.nav-cta {
	display: flex;
	gap: .6rem
}
/* dropdown */

.has-sub {
	position: relative
}
.sub-trigger {
	border: none;
	background: transparent;
	cursor: pointer;
}
.submenu {
	position: absolute;
	left: 0;
	top: calc(100%);
	display: grid;
	grid-auto-flow: column;
	gap: 16px;
	padding: 14px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 0;
	min-width: 660px;
	box-shadow: var(--shadow);
	opacity: 0;
	transform: translateY(-6px);
	pointer-events: none;
	transition: .15s
}
.submenu a {
	padding: .5rem .6rem;
	border-radius: 0;
	color: #0f172a;
	border-left: solid 3px #ffffff;
}
.submenu a:hover {
	background: #f1f5f9;
	border-left: solid 3px #003682;
}
.submenu-col {
	display: grid;
	gap: 6px
}
.submenu-title {
	color: #1e40af;
	font-weight: 700;
	margin: .2rem 0
}
.has-sub:hover .submenu {
	opacity: 1;
	transform: none;
	pointer-events: auto
}
/* hamburger + mobile */

.select_lang{
	display: none;
	flex-direction: column;
	gap: 5px;
	width: 40px;
	height: 40px;
	align-items: center;
	justify-content: center;
	
}
.topbar-search-mobile{display: none;}
.hamburger {
	display: none;
	flex-direction: column;
	gap: 5px;
	width: 40px;
	height: 40px;
	align-items: center;
	justify-content: center;
	border-radius: 0;
	border: 1px solid var(--line);
	background: #fff
}
.hamburger span {
	width: 20px;
	height: 2px;
	background: #0f172a;
	border-radius: 0
}
/* mobile panel */

/* 手機選單容器 */

.mobile-panel {
	position: fixed;
	/* 固定覆蓋整個螢幕 */
	inset: 0;
	/* top/left/right/bottom:0 */
	height: 100vh;
	background: #fff;
	z-index: 1200;
	transform: translateY(-8px);
	opacity: 0;
	pointer-events: none;
	transition: .2s;
	display: flex;
	flex-direction: column;
}
.mobile-panel.show {
	transform: none;
	opacity: 1;
	pointer-events: auto
}
/* 手機選單內容可捲動 */

.mobile-menu {
	flex: 1;
	/* 佔滿剩餘高度 */
	overflow-y: auto;
	/* 超出可垂直捲動 */
	-webkit-overflow-scrolling: touch;
	/* iOS 慣性滑動 */
	padding: 10px 20px;
	display: grid;
	gap: 6px;
}
.mobile-link {
	padding: 12px;
	border-radius: 0;
	color: #0f172a
}
.mobile-link:hover {
	background: #f1f5f9
}
.mobile-cta {
	margin-top: 8px;
	width: fit-content
}
/* hero carousel */

.hero {
	position: relative;
	padding:  0px;
	/*background: linear-gradient(180deg, #ffffff, #f8fbff 60%)*/
}
.carousel {
	position: relative;
	border: 1px solid var(--line);
	border-radius: 0;
	overflow: hidden;
	background: #fff
}
.slides {
	display: flex;
	transition: transform .5s ease
}
.slide {
	min-width: 100%;
	min-height: 480px;
	display: grid;
	place-items: center;
	position: relative
}
.slide::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(120deg, rgba(2, 132, 199, .10), rgba(29, 78, 216, .08))
}
.slide[data-hasimg="true"]::before {
	background: linear-gradient(180deg, rgba(0, 0, 0, .10), rgba(2, 6, 23, .25))
}
.slide-inner {
	position: relative;
	text-align: center;
	padding: 56px 20px;
	z-index: 1;
	color: #0f172a;
	max-width: 60%;
}
.slide h2 {
	/*color: #ffffff;*/
	font-size: clamp(28px, 5vw, 48px);
	line-height: 1.15;
	margin: 0 0 10px;
	font-weight: 900;
	text-shadow: 1px 2px 1px #505050;
}
.slide p {
	/*color: #F0F9FD;*/
	font-size: 1.15rem;/*1.05rem;*/
	margin: 0 0 18px;
	text-shadow: 1px 2px 1px #505050;
}
.car-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	border: 1px solid var(--line);
	background: #ffffffcc;
	color: #0f172a;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	cursor: pointer
}
.car-btn:hover {
	background: #fff
}
.car-btn.prev {
	left: 10px
}
.car-btn.next {
	right: 10px
}
.dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 10px;
	display: flex;
	gap: 6px;
	justify-content: center
}
.dots button {
	width: 10px;
	height: 10px;
	border-radius: 0;
	border: 1px solid #1e40af;
	background: transparent;
	cursor: pointer
}
.dots button[aria-current="true"] {
	background: #ffffff
}
/* sections */

.section {
	padding: 24px 0;
}
.section-title {
	font-size: clamp(22px, 3vw, 30px);
	margin: 0 0 12px;
	font-weight: 800;
	color: #0f172a
}
.grid {
	display: grid;
	gap: 16px
}
.grid.cols-4 {
	grid-template-columns: repeat(4, 1fr)
}
.card {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 0;
	padding: 8px;
	min-height: 140px;
	transition: .2s transform ease, .2s border-color ease, .2s box-shadow ease
}
.card:hover {
	transform: translateY(-2px);
	border-color: #cbd5e1;
	box-shadow: 0 6px 18px rgba(2, 6, 23, .06)
}
.card .tag {
	display: inline-block;
	font-size: .75rem;
	padding: .25rem .5rem;
	border: 1px solid #bfdbfe;
	border-radius: 0;
	color: #1e3a8a;
	background: #eff6ff
}
.card h4 {
	margin: .6rem 0 .4rem;
	font-size: 1.1rem;
	color: #0f172a
}
.card p {
	margin: 0;
	color: #475569
}
.advantages-card {
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
    padding: 20px;
    /* 預設給一點點暗度讓標題清楚，或者依靠文字陰影 */
}

/* 漸層遮罩，滑鼠滑入時變深 */
.advantages-card::before {
    content: '';
    position: absolute;
    inset: 0; /* 佔滿整個卡片 */
    background: rgba(0,0,0,0.2);
    transition: background 0.3s ease;
    z-index: 1;
}

.advantages-card:hover::before {
    background: rgba(0,0,0,0.6); /* 滑入時變暗，凸顯文字 */
}

.advantages-card h2 {
    position: relative;
    z-index: 2;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
    transition: transform 0.3s ease;
}

.advantages-card b {
    position: relative;
    z-index: 2;
    color: #ddd;
    font-weight: normal;
    font-size: 0.9rem;
    
    /* 隱藏設定 */
    max-height: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

/* Hover 行為 */
.advantages-card:hover h2 {
    transform: translateY(-5px); /* 標題稍微上移 */
}

.advantages-card:hover b {
    max-height: 100px; /* 給予足夠高度展開 */
    opacity: 1;
    margin-top: 10px;
    transform: translateY(0);
}
.product-thumb {
	aspect-ratio: 4/3;
	border-radius: 0;
	overflow: hidden;
	border: 1px solid var(--line);
	margin-bottom: 10px;
	background: linear-gradient(120deg, #eef2ff, #f8fafc)
}
.news {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 16px
}
.news-list {
	display: grid;
	gap: 10px
}
.news-item {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	padding: 12px;
	border-radius: 0;
	border: 1px solid var(--line);
	background: #fff;
	position: relative;
	min-height: 190px;
}
/* 右下角閱讀按鈕 */
.news-read{
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: .5rem .9rem;
  font-size: .95rem;
}
.news-date {
	font-size: .8rem;
	color: #1e40af
}
.news-item:hover {
	background: #f8fafc
}

/* 日期 + 標籤同一行 */
.news-meta{
  display: flex;
  align-items: center;
  justify-content: space-between; /* 左右分散 */
  margin-bottom: 4px;
}

.news-meta .news-date{
  font-size: .85rem;
  color: #1e40af;
}

.news-meta .tag{
  font-size: .75rem;
  padding: .2rem .5rem;
  border: 1px solid #bfdbfe;
  border-radius: 0;
  color: #1e3a8a;
  background: #eff6ff;
}




.contact {
	display: grid;
	grid-template-columns: 1.1fr .9fr;
	gap: 16px
}
input, textarea {
	width: 100%;
	padding: 12px 14px;
	border-radius: 0;
	border: 1px solid var(--line);
	background: #fff;
	color: #0f172a
}
textarea {
	min-height: 120px;
	resize: vertical
}
.map {
	border-radius: 0;
	border: 1px solid var(--line);
	overflow: hidden;
	min-height: 260px
}
/* footer */

.site-footer {
	background: #fff;
	border-top: 1px solid var(--line)
}
.foot {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 16px;
	padding: 26px 0
}
.link-col {
	display: grid;
	gap: 6px
}
.copyright {
	padding: 4px 0;
	text-align: right;
	border-top: 1px solid var(--line);
	color: #F0F9FD;
	font-size: .7rem
}
.backtop {
  position: fixed;
  right: 16px;
  bottom: 16px;
  border: none;
  background: var(--brand);
  color: #fff;
  opacity: 0;                /* 預設隱藏 */
  pointer-events: none;      /* 預設不可點擊 */
  transform: translateY(20px); /* 預設往下位移一點 */
  transition: opacity .35s ease, transform .35s ease;
  z-index: 1500;padding: 0.3rem 0.3rem;
	border-radius: 24px;
}
.backtop a {
  
}
.backtop.show {
  opacity: 0.8;
  pointer-events: auto;
  transform: translateY(0);  /* 出現時往上浮 */
}
.backtop:hover {
  background: var(--accent);
  transform: translateY(-4px); /* 滑鼠 hover 再微微往上 */
}

/* RWD */

@media (max-width:1024px) {
	.news {
		grid-template-columns: 1fr
	}
	.contact {
		grid-template-columns: 1fr
	}
	.grid.cols-4 {
		grid-template-columns: repeat(2, 1fr)
	}
}
@media (max-width:768px) {
	.menu {
		display: none
	}
	.hamburger {
		display: flex
	}
	.mobile-panel {
		display: block
	}
	.mobile-menu {
		display: grid;
		padding: 10px
	}
	.mobile-link {
	  border: 1px solid var(--line);
		padding: 12px;
		border-radius: 0;
		color: #0f172a;
		padding: 12px 16px;
	}
	.mobile-link:hover {
		background: #f1f5f9
	}
	.mobile-cta {
		margin-top: 8px;
		width: fit-content
	}
	.nav-cta {
		display: none
	}
	.grid.cols-4 {
		grid-template-columns: 1fr
	}
}
/* mobile accordion */

.mobile-acc{
	border: 1px solid var(--line);
	border-radius: 0;
	/*margin: 6px 0;*/
	background: #fff
}
.mobile-acc>summary {
	cursor: pointer;
	list-style: none;
	padding: 12px 16px;
	border-radius: 0;
	line-height: 1.4;
	min-height: 48px;
	/* 固定最小高度 */
	display: flex;
	align-items: center;
	/* 文字垂直置中 */
}
.mobile-acc>summary::-webkit-details-marker {
	display: none
}
.mobile-acc-body {
	display: grid;
	padding: 8px 12px 12px 12px
}
.mobile-acc-body a {
	padding: 8px;
	border-radius: 0;
	color: #0f172a
}
.mobile-acc-title {
	color: #1e40af;
	font-size: .9rem;
	margin: 6px 0
}
/* Footer custom color */

.site-footer, footer {
	background: #003682;
	color: #ffffff;
}
.site-footer a, footer a {
	color: #dbeafe;
}
/* Footer 版面：桌機 50% / 25% / 25%，手機直排 */

.container.foot {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	/* 50% / 25% / 25% */
	gap: 20px;
	align-items: start;
}
.container.foot>div {
	padding-left: 20px;
	min-width: 0;
	/* 防止內容把欄位撐爆而換行 */
}
@media (max-width: 768px) {
	.container.foot {
		grid-template-columns: 1fr;
		/* 手機直排 */
	}
}
/* 內容保護：圖片不超過欄寬、連結可斷行 */

.container.foot img {
	max-width: 100%;
	height: auto;
}
.container.foot a {
	word-break: break-word;
}
.container.foot i {

	margin-right: 6px;
	/* 圖示和文字之間加空隙 */
	color: #ffff;
	/* 也可以統一改成品牌藍色 */
}
/* 若 icon 在行內多個時，避免太緊 */

.container.foot br+i {
	margin-top: 4px;
	/* 換行後的 icon 和文字之間多一點距離 */
}
.lang-select-wrapper {
	position: relative;
	display: inline-block;
}
.lang-select-wrapper i {
	position: absolute;
	left: 10px;
	top: 50%;
	transform: translateY(-50%);
	color: #334155;
	pointer-events: none;
}
.lang-select {
	padding-left: 32px;
	/* 給 icon 留空間 */
	appearance: none;
	border: 1px solid var(--line);
	border-radius: 0;
	font-weight: 600;
	color: #0f172a;
	background: #fff;
}
/* 手機版隱藏原本 topbar */

@media (max-width:768px) {
	.topbar {
		display: none;
	}
	.mobile-topbar {
		display: grid;
		gap: 10px;
	}
	.mobile-topbar .mini-info {
		font-size: .9rem;
		color: #334155;
	}
	.mobile-topbar .lang-switch, .mobile-topbar .topbar-search {
		width: 100%;
	}
	.mobile-topbar .topbar-search form {
		display: flex;
		gap: 6px;
	}
	.mobile-topbar .topbar-search input {
		flex: 1;
	}
}

/* RWD：手機直排時，按鈕移到內容下方靠右 */
@media (max-width: 768px){
  .select_lang{display: flex;flex-direction: row;}
  .topbar-search-mobile{display: block;}
  .lang-select{padding: 0.35rem .9rem;padding-left: 18px;}
  .news-item{ flex-direction: column; }
  .news-body{ padding-right: 0; }
  .news-read{
    position: static;
    margin-top: 10px;
    margin-left: auto;   /* 讓按鈕靠右 */
  }
  .footer_text { font-size:.7rem}
  .link-col a { font-size:.7rem }
}


/* 麵包屑 */

.breadcrumb-hero {
	position: relative;
	background-image: url("../img/hero-3.png");
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	border-bottom: 1px solid var(--line);
}
.breadcrumb-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(2, 6, 23, .35), rgba(2, 6, 23, .55));
}
.breadcrumb-hero .inner {
	position: relative;
	padding: 48px 0;
	color: #fff;
	text-align: center;
}
.page-title {
	margin: 0;
	font-weight: 800;
	font-size: clamp(26px, 4vw, 40px);
}
.page-meta {
	margin-top: 8px;
	opacity: .9;
}
@media (max-width:640px) {
	.breadcrumb-hero .inner {
		padding: 28px 0;
	}
}
/* 文字版麵包屑 */

.breadcrumb-text {
	font-size: .9rem;
	color: #475569;
	margin: 16px 0;
}
.breadcrumb-text a {
	color: #1e40af;
	text-decoration: underline;
}
.breadcrumb-text .sep {
	margin: 0 6px;
	color: #94a3b8;
}
/* Map cards (符合官網直角、線框、品牌色) */

.map-card {
	padding: 0;
}
.map-head {
	padding: 12px 14px;
	border-bottom: 1px solid var(--line);
	background: #fff;
	font-weight: 800;
	color: var(--brand);
}
.map-pin {
	margin-right: 6px;
}
.map-media {
	position: relative;
	border-bottom: 1px solid var(--line);
	/* 16:9 比例，讓地圖 RWD */
	aspect-ratio: 16 / 9;
	background: linear-gradient(120deg, #eef2ff, #f8fafc);
}
.map-media iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
.map-foot {
	display: grid;
	gap: 8px;
	padding: 12px 14px;
	background: #fff;
}
.map-addr {
	color: #0f172a;
}
/* RWD：3 -> 2 -> 1 欄 */

@media (max-width:1024px) {
	#locations .grid.cols-4 {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}
@media (max-width:768px) {
	#locations .grid.cols-4 {
		grid-template-columns: 1fr !important;
	}
}
/* ===== Contact / Locations rows ===== */

#contact-locations .loc-row {
	display: grid;
	grid-template-columns: 1fr 2fr;
	/* 左資訊 / 右地圖 */
	gap: 24px;
	align-items: start;
	margin-bottom: 20px;
}
#contact-locations .contact-info {
	padding: 16px;
}
#contact-locations .contact-title {
	margin: 0 0 8px;
	color: var(--brand);
	font-weight: 800;
}
#contact-locations .loc-body {
	color: #0f172a;
	display: grid;
	gap: 6px;
}
#contact-locations .loc-actions {
	margin-top: 12px;
}
#contact-locations .map-card {
	padding: 0;
	overflow: hidden;
}
#contact-locations .map-media {
	aspect-ratio: 16/9;
	background: linear-gradient(120deg, #eef2ff, #f8fafc);
}
#contact-locations .map-media iframe {
	width: 100%;
	height: 100%;
	border: 0;
}
/* RWD：窄螢幕改直排 */

@media (max-width: 768px) {
	#contact-locations .loc-row {
		grid-template-columns: 1fr;
	}
}
/* ===== Content Blocks (公用樣式) ===== */

.content {
	display: grid;
	gap: 32px;
}
.content-intro {}
.content-title {
	margin: 0 0 8px;
	font-weight: 800;
	color: var(--brand);
}
.content-lead {
	margin: 0;
	color: #475569;
	line-height: 1.7;
}
/* 基本：左右二欄（圖片 + 文字） */

.content-block {
	display: grid;
	grid-template-columns: 1fr 1fr;
	/* 左右各半 */
	gap: 24px;
	align-items: center;
}
.content-media {
	width: 100%;
}
.content-media img, .content-media picture, .content-media video {
	width: 100%;
	height: auto;
	display: block;
	border: 1px solid var(--line);
}
.content-body h2 {
	margin: 0 0 12px;
	color: var(--brand);
	font-weight: 800;
	font-size: 1.4rem;
}
.content-body p {
	margin: 0 0 10px;
	color: #475569;
	line-height: 1.7;
}
/* 交錯排版：加上 .reverse 讓圖片/文字互換位置（比 direction:rtl 更穩定） */

.content-block.reverse .content-media {
	order: 2;
}
.content-block.reverse .content-body {
	order: 1;
}
/* 全寬媒體段落（可放大圖或橫幅） */

.content-wide {
	grid-column: 1 / -1;
	padding: 0;
	overflow: hidden;
}
.content-wide .content-media img, .content-wide .content-media picture, .content-wide .content-media video {
	border: 1px solid var(--line);
}
/* 小元件：圖說、清單、重點標示 */

.figure-caption {
	font-size: .9rem;
	color: #64748b;
	margin-top: 6px;
}
.content-body ul {
	margin: 0 0 10px 1.2rem;
}
.content-body li {
	margin: 4px 0;
}
.highlight {
	background: #fff7ed;
	border: 1px solid #fed7aa;
	padding: 8px 10px;
}
/* RWD：手機單欄排列 */

@media (max-width: 768px) {
	.content-block {
		grid-template-columns: 1fr;
	}
	.content-block.reverse .content-media, .content-block.reverse .content-body {
		order: initial;
		/* 手機直接走直排順序 */
	}
}
/* 版面：左新聞 / 右側欄 */

.news-wrap {
	display: grid;
	grid-template-columns: 2fr 1fr;
	/* 左大右小 */
	gap: 16px;
	align-items: start;
}
/* 右側欄可黏住頂端（可移除） */

.aside-col .side-download {
	position: sticky;
	top: 16px;
	background: url(../../assets/img/bg1.png) center / cover no-repeat;
}
/* 清單：左圖右文（與 news.php 一致） */

.news-list {
	display: grid;
	gap: 16px;
}
.news-item {
	overflow: hidden;
	background: url(../../assets/img/bg1.png) center / cover no-repeat;
}
.news-link {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	color: inherit;
	text-decoration: none;

}
.news-thumb {
	flex: 0 0 200px;
}
.news-thumb img {
	width: 100%;
	height: auto;
	display: block;
	border: 1px solid var(--line);
}
.news-body {
	flex: 1;
}
.news-date {
	font-size: .85rem;
	color: #1e40af;
	margin-bottom: 4px;
}
.news-title {
	font-size: 1.1rem;
	font-weight: 700;
	margin: 0 0 6px;
}
.news-excerpt {
	margin: 0;
	color: #475569;
	line-height: 1.6;
}
/* RWD：手機改直排，側欄移到下方 */

@media (max-width: 1024px) {
	.news-wrap {
		grid-template-columns: 1fr;
	}
	.aside-col .side-download {
		position: static;
	}
}
@media (max-width: 768px) {
	.news-link {
		flex-direction: column;
	}
	.news-thumb {
		flex: none;
		width: 100%;
	}
}
/* 時間軸樣式 */

.year-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px
}
.timeline {
	position: relative;
	margin-top: 16px;
	border-left: 2px solid var(--line);
	margin-left: 14px;
	padding-left: 22px
}
.milestone {
	position: relative;
	list-style: none;
	margin: 0 0 26px
}
.milestone:last-child {
	margin-bottom: 0
}
.milestone time {
	display: inline-block;
	font-weight: 700;
	color: var(--brand)
}
.milestone-card {
	background: #dbeafe;
	border: 1px solid var(--line);
	border-radius: 0;
	padding: 14px 16px;
	box-shadow: var(--shadow);
	opacity: 1;
	transform: translateY(10px);
	transition: opacity .5s ease, transform .5s ease
}
.milestone-card.inview {
	opacity: 1;
	transform: none
}
.milestone-card h3 {
	margin: .2rem 0 .25rem;
	font-size: 18px;
	color: #0ea5e9;
}
.milestone-card p {
	margin: .25rem 0 0;
	color: var(--muted)
}
.milestone::before {
	content: "";
	position: absolute;
	left: -32px;
	top: .1rem;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--brand);
	outline: 6px solid #fff;
	border: 2px solid var(--accent)
}
@media (min-width:900px) {
	.timeline {
		border-left: none;
		margin-left: 0;
		padding-left: 0
	}
	.timeline::before {
		content: "";
		position: absolute;
		inset: 0 auto 0 50%;
		width: 2px;
		background: var(--line);
		transform: translateX(-1px)
	}
	.milestone {
		width: 50%;
		margin: 0;
		padding: 24px 0;
		min-height: 64px
	}
	.milestone:nth-child(odd) {
		padding-right: 28px;
		text-align: right;
		margin-right: 50%
	}
	.milestone:nth-child(even) {
		padding-left: 28px;
		margin-left: 50%
	}
	.milestone::before {
		left: calc(50% + 0px)
	}
	.milestone-card {
		display: inline-block;
		max-width: 520px
	}
	.milestone:nth-child(odd) .milestone-card {
		transform: translate(-6px, 8px)
	}
	.milestone:nth-child(even) .milestone-card {
		transform: translate(6px, 8px)
	}
	.milestone:nth-child(odd) .milestone-card.inview, .milestone:nth-child(even) .milestone-card.inview {
		transform: none
	}
}
/* ===== Content Blocks (公用樣式) ===== */

/* 基本容器 */

.content-block {
	display: grid;
	gap: 24px;
	align-items: center;
}
/* 雙欄 (預設：左右並排) */

.content-block.cols-2 {
	grid-template-columns: 1fr 1fr;
}
/* 單欄 (上下排列) */

.content-block.cols-1 {
	grid-template-columns: 1fr;
}
/* 媒體區域 */

.content-media img, .content-media picture, .content-media video {
	width: 100%;
	height: auto;
	display: block;
	border: 1px solid var(--line);
}
/* 文字區域 */

.content-body h2 {
	margin: 0 0 12px;
	color: var(--brand);
	font-weight: 800;
	font-size: 1.4rem;
}
.content-body p {
	margin: 0 0 10px;
	color: #475569;
	line-height: 1.7;
}
/* 交錯排版 (讓圖片在右、文字在左) */

.content-block.reverse.cols-2 .content-media {
	order: 2;
}
.content-block.reverse.cols-2 .content-body {
	order: 1;
}
/* RWD：小螢幕自動單欄 */

@media (max-width: 768px) {
	.content-block.cols-2 {
		grid-template-columns: 1fr;
	}
	.content-block.reverse.cols-2 .content-media, .content-block.reverse.cols-2 .content-body {
		order: initial;
	}
}
/* 雙欄：1/1（原本各半） */

.content-block.cols-2 {
	grid-template-columns: 1fr 1fr;
}
/* 雙欄：1/3 + 2/3 */

.content-block.cols-1-2 {
	grid-template-columns: 1fr 2fr;
}
/* 若要反向（右圖左文） */

.content-block.reverse.cols-1-2 .content-media {
	order: 2;
}
.content-block.reverse.cols-1-2 .content-body {
	order: 1;
}
/* RWD：手機一律直排 */

@media (max-width: 768px) {
	.content-block.cols-2, .content-block.cols-1-2 {
		grid-template-columns: 1fr;
	}
	.content-block.reverse.cols-1-2 .content-media, .content-block.reverse.cols-1-2 .content-body {
		order: initial;
	}
}
/* ===== 公司基本資料（官網版） ===== */

.company-basic .section-title small {
	font-size: .9rem;
	color: #64748b;
	margin-left: .5rem;
}
/* 卡片標題（直角、色系一致） */

.info-card {
	padding: 0;
	overflow: hidden;
}
.info-heading {
	margin: 0;
	padding: 12px 14px;
	border-bottom: 1px solid var(--line);
	font-size: 1.2rem;
	font-weight: 800;
	color: var(--brand);
	background: #fff;
}
/* 表格 */

.info-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 0;
	margin-top: 25px;
	/* 全站直角 */
}
.info-table th, .info-table td {
	padding: .85rem 1rem;
	vertical-align: top;
	border-bottom: 1px solid var(--line);
}
.info-table tr:last-child th, .info-table tr:last-child td {
	border-bottom: none;
}
.info-table th {
	width: 200px;
	background: #f8fafc;
	color: #334155;
	font-weight: 700;
}
.info-table td {
	color: var(--text);
}
.info-table a {
	color: var(--brand-600);
	text-decoration: none;
}
.info-table a:hover {
	text-decoration: underline;
}
/* 內文語系元素 */

.company-basic address {
	font-style: normal;
}
/* RWD：小螢幕縮小欄寬與內距 */

@media (max-width: 768px) {
	.info-table th {
		width: 40%;
	}
	.info-table th, .info-table td {
		padding: .75rem .8rem;
	}
}
/* ===== 專利資料（官網版樣式） ===== */

.patents .section-title small {
	font-size: .9rem;
	color: #64748b;
	margin-left: .5rem;
}
.patent-card {
	padding: 0;
	overflow: hidden;
}
/* 滑動容器，避免桌機表格太擠 */

.table-scroll {
	width: 100%;
	overflow-x: auto;
}
.patent-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 0;
	/* 全站直角 */
	font-variant-numeric: tabular-nums;
}
.patent-table thead th {
	background: #f8fafc;
	color: #334155;
	font-weight: 700;
	font-size: .95rem;
	text-align: left;
}
.patent-table th, .patent-table td {
	padding: .7rem .9rem;
	border-bottom: 1px solid var(--line);
	vertical-align: top;
	color: var(--text);
}
.patent-table tbody tr:last-child td {
	border-bottom: none;
}
/* 欄寬限制 */

.patent-table td:nth-child(1) {
	width: 56px;
	text-align: center;
}
.patent-table td:nth-child(4) {
	width: 70px;
	text-align: center;
}
.patent-table td:nth-child(5) {
	width: 120px;
}
@media (max-width:768px) {
	.patent-table th, .patent-table td {
		padding: .55rem .65rem;
		font-size: .9rem;
	}
	.patent-table td:nth-child(1) {
		width: 44px;
	}
	.patent-table td:nth-child(4) {
		width: 64px;
	}
	.patent-table td:nth-child(5) {
		width: 110px;
	}
	
	.patent-table th:nth-child(2),
  .patent-table td:nth-child(2),
  .patent-table th:nth-child(4),
  .patent-table td:nth-child(4) {
    display: none;
  }
	
}
@media (max-width: 1024px) {
	:root {
		--header-h: 88px;
		/* 手動設定 header 高度，依實際調整 */
	}
	.mobile-panel {
		position: fixed !important;
		top: var(--header-h);
		left: 0;
		right: 0;
		height: calc(100dvh - var(--header-h));
		background: #fff;
		z-index: 1100;
		/* 比 header 低，讓漢堡鈕永遠在上層 */
		display: flex !important;
		flex-direction: column;
		overflow: hidden;
		transform: translateY(-8px);
		opacity: 0;
		pointer-events: none;
		transition: .2s;
	}
	.mobile-panel.show {
		transform: none;
		opacity: 1;
		pointer-events: auto;
	}
	.mobile-menu {
		flex: 1;
		min-height: 0;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		padding: 10px 20px;
		display: grid;
		gap: 6px;
	}
}
/* ===== Pagination (分頁樣式) ===== */

.pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid var(--line);
	flex-wrap: wrap;
	/* 手機可換行 */
}
.pagination .page-btn, .pagination .page-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 38px;
	padding: 0 12px;
	border: 1px solid var(--line);
	background: #fff;
	color: var(--text);
	border-radius: 0;
	/* 全站直角一致 */
	font-weight: 600;
	text-decoration: none;
	transition: .15s ease;
}
.pagination .page-btn:hover, .pagination .page-num:hover {
	background: #f1f5f9;
}
.pagination .page-num.is-active, .pagination .page-num[aria-current="page"] {
	background: linear-gradient(140deg, var(--brand), var(--accent));
	color: #fff;
	border-color: transparent;
}
.pagination .page-btn.is-disabled, .pagination .page-btn[aria-disabled="true"] {
	opacity: .4;
	pointer-events: none;
	cursor: default;
}
.pagination .page-ellipsis {
	padding: 0 6px;
	color: #94a3b8;
	font-size: .95rem;
}
/* 手機版：縮小按鈕尺寸 */

@media (max-width: 640px) {
	.pagination .page-btn, .pagination .page-num {
		min-width: 36px;
		height: 34px;
		padding: 0 8px;
		font-size: .9rem;
	}
}
/* ===== 麵包屑 ===== */

.breadcrumb-text a {
	color: var(--brand-600);
	text-decoration: none;
	/* 拿掉底線 */
	font-weight: 600;
	transition: color .2s ease;
}
.breadcrumb-text a:hover {
	color: var(--brand);
	/* 滑過換色 */
}
.breadcrumb-text .sep {
	margin: 0 6px;
	color: #94a3b8;
	/* 分隔符淡灰色 */
}

/* summary 右側箭頭指示 */
.mobile-acc > summary {
  position: relative;
  padding-right: 28px; /* 給箭頭留空間 */
}
.mobile-acc > summary::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-50%) rotate(-45deg); /* 向下箭頭 */
  transition: transform .2s ease;
  opacity: .7;
}
.mobile-acc[open] > summary::after {
  transform: translateY(-50%) rotate(45deg); /* 向上箭頭 */
}

/* 關鍵字膠囊 */
.pill-list{display:grid;gap:10px;list-style:none;padding:0;margin:0}
.pill-list.cols-4{grid-template-columns:repeat(4,1fr)}
.pill{
  text-align:center; padding:.6rem .8rem;
  background:#fff; border:1px solid var(--line);
  font-weight:700; color:var(--brand);
}
.pill:hover{background:#f8fafc}
@media (max-width:1024px){ .pill-list.cols-4{grid-template-columns:repeat(3,1fr)} }
@media (max-width:768px){ .pill-list.cols-4{grid-template-columns:repeat(2,1fr)} }

/* 經營理念卡片 */
.philo .philo-body{display:grid;gap:6px;color:var(--text);line-height:1.9}
.philo .philo-body p{margin:0}
.philo .signature{
  margin-top:14px; text-align:right; color:#334155;
}
.philo .sig-title{font-size:.95rem}
.philo .sig-name{font-weight:800;color:var(--brand);font-size:1.05rem}


ul.logo-list{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(120px,1fr));
    gap:16px;
    list-style:none;
    padding:0;
    margin:0;
  }
  li.mk_logo{
    display:flex;
    align-items:center;      /* 垂直置中 */
    justify-content:center;  /* 水平置中 */
    min-height:80px;
    border:1px solid #e5e7eb;
    border-radius:12px;
    background:#fff;
    transition:background .2s;
  }
  li.mk_logo:hover{background:#f8fafc}
  li.mk_logo a{display:inline-flex;align-items:center;justify-content:center;padding:8px}
  img.logo{max-width:100%;max-height:60px;object-fit:contain;display:block;margin:auto; transition:transform .4s cubic-bezier(.34,1.56,.64,1); /* 彈跳效果 */ /* 加入動畫 */}
  /* 滑鼠移到 logo 時放大 */
  li.mk_logo:hover img.logo{
    transform:scale(1.45);   /* 放大 15%，可調整 */
  }
  
  /* ===== Full-bleed Carousel (滿版輪播) ===== */
.hero.hero-full{ padding:0; background:#000; }

/* 讓容器失效，真正佔滿視窗寬 */
.hero.hero-full .container{ max-width:none; padding:0; }

/* 輪播滿版＋置中，避免受父層內距影響 */
.hero.hero-full .carousel{
  width:100vw;
  margin-left:50%;
  transform:translateX(-50%);
  border:none;            /* 去邊框 */
  border-radius:0;        /* 去圓角 */
  background:#000;
}

/* 幻燈片高度：桌機接近視窗高，手機略矮 */
.hero.hero-full .slide{
  min-height: clamp(480px, 72vh, 820px);
}

/* 若有放 <img> 當背景，讓它 cover 滿版 */
.hero.hero-full .slide .hero-bg{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover;
  z-index:0;
}

/* 文字區塊保留白色，置於最上層 */
.hero.hero-full .slide-inner{
  position:relative;
  z-index:2;
}

/* 既有的遮罩保留（若想加強可自行調整透明度） */
.hero.hero-full .slide::before{
  background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(2,6,23,.45));
}

/* 導覽點與左右按鈕位置微調（避免貼邊） */
.hero.hero-full .dots{ bottom: 16px; }
.hero.hero-full .car-btn{ top: 50%; }



/* 手機高度調整 */
@media (max-width:768px){
  .hero.hero-full .slide{ min-height: 56vh; }
}

/* ===== Tabs Nav ===== */
    .tabs-nav{
      display:flex;
      gap:8px;
      border-bottom:1px solid var(--line);
      margin-bottom:-1px;
      flex-wrap:wrap;
    }
    .tabs-nav button{
      background:#fff;
      border:1px solid var(--line);
      border-bottom:none;
      padding:.6rem 1rem;
      font-weight:600;
      color:var(--text);
      cursor:pointer;
      transition:.2s;
    }
    .tabs-nav button:hover{
      background:#f1f5f9;
    }
    .tabs-nav button.active{
      background:#fff;
      color:var(--brand);
      border-color:var(--brand);
      border-bottom:2px solid #fff;
      position:relative;
      top:1px;
    }
    /* ===== Tabs Content ===== */
    .tabs-content .tab-pane{
      display:none;
      border:1px solid var(--line);
      padding:10px;
      background:#fff;
    }
    .tabs-content .tab-pane.active{
      display:block;
    }
    
    /* ===== Video Grid (沿用官網直角+線框風格) ===== */
    .video-grid{display:grid;gap:16px;grid-template-columns:repeat(4,1fr)}
    @media (max-width:1024px){ .video-grid{grid-template-columns:repeat(2,1fr)} }
    @media (max-width:768px){ .video-grid{grid-template-columns:1fr} }

    .video-card{padding:0; overflow:hidden}
    .video-thumb{position:relative; aspect-ratio:16/9; background:#000; border-bottom:1px solid var(--line)}
    .video-thumb img{width:100%;height:100%;object-fit:cover;display:block}
    .video-play{
      position:absolute; inset:auto auto 10px 10px;
      display:inline-flex; align-items:center; gap:8px;
      background: #ffffffee; color:#0f172a; border:1px solid var(--line);
      padding:.45rem .7rem; font-weight:700; cursor:pointer; transition:.2s;
    }
    .video-play i{color:var(--brand)}
    .video-play:hover{background:#fff}
    .video-time{
      position:absolute; right:10px; bottom:10px;
      background:#0f172acc; color:#fff; font-size:.8rem;
      padding:.2rem .45rem; border-radius:2px;
    }
    .video-body{padding:12px 14px; background:#fff}
    .video-title{margin:.2rem 0 .3rem; font-weight:800; color:var(--text)}
    .video-meta{font-size:.85rem; color:#64748b; display:flex; gap:8px; align-items:center}
    .video-tag{display:inline-block; font-size:.75rem; padding:.2rem .45rem; border:1px solid #bfdbfe; background:#eff6ff; color:#1e3a8a}

    /* ===== Lightbox / Modal ===== */
    .video-modal{position:fixed; inset:0; background:rgba(2,6,23,.72); display:none; align-items:center; justify-content:center; z-index:1600; padding:20px}
    .video-modal.show{display:flex}
    .video-dialog{width:min(100%, 1080px); aspect-ratio:16/9; background:#000; position:relative; box-shadow:var(--shadow)}
    .video-frame, .video-html5{position:absolute; inset:0; width:100%; height:100%; border:0; display:block}
    .video-close{
      position:absolute; top:-44px; right:0;
      background:#ffffffee; color:#0f172a; border:1px solid var(--line);
      padding:.4rem .75rem; font-weight:800; cursor:pointer;
    }
    @media (max-width:768px){
      .video-close{top:8px; right:8px; z-index:2}
    }
    body.modal-open{overflow:hidden}
    
/*圖文環繞 選片跟文字要放在同一個DIV*/
.float-left {
  float: left;
  margin: 0 16px 12px 0;
  max-width: 250px;
  height: auto;
}

.float-right {
  float: right;
  margin: 0 0 12px 16px;
  max-width: 250px;
  height: auto;
}

/* 手機版：圖片自動置頂，文字在下方 */
@media (max-width: 768px) {
  .float-left,
  .float-right {
    float: none;         /* 取消環繞 */
    display: block;      /* 單獨一行 */
    margin: 0 auto 16px; /* 置中 + 下方留間距 */
    max-width: 100%;     /* 讓圖片在小螢幕可自適應 */
  }
}


.img-top{
align-self: flex-start; /* 單獨讓圖片靠上 */
}

/* 斑馬紋 + hover 高亮（專利/展覽表通用） */
.patent-table tbody tr:nth-child(odd)  { background: #fff; }
.patent-table tbody tr:nth-child(even) { background: #f8fafc; }

.patent-table tbody tr {
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.patent-table tbody tr:hover {
  background: #e8f0ff;           /* 淺藍高亮 */
}
.patent-table tbody tr:hover td {
  /* 若要文字也更醒目 */
  /* color: var(--text); */
}

/* 若表內有連結，hover 時一併調整可讀性（可留可拿掉） */
.patent-table tbody tr:hover a {
  color: var(--brand-600);
  text-decoration: underline;
}

/* 無效連結 (禁用 hover 效果) */
.menu .submenu a.is-disabled {
  pointer-events: none;     /* 禁用點擊 */
  color: #cbd5e1;           /* 顯示灰字 */
  background: transparent;  /* 無背景 */
  cursor: default;          /* 游標改回箭頭 */
}

.menu .submenu a.is-disabled:hover {
  background: transparent;  /* hover 不變色 */
  border-left: none;        /* 移除左框 */
  color: #cbd5e1;           /* 保持灰字 */
}


/* ===== Product gallery (大圖 + 縮圖) ===== */
.product-gallery{display:grid;gap:10px}
.pg-main{
  position:relative;
  border:1px solid var(--line);
  background:#fff;
  padding:8px;
  overflow: hidden;
  min-height: 410px;
}
.pg-main img{
  width:100%;
  height:auto;
  display:block;
  transition: transform 0.3s ease;
  transform-origin: center center; /* 預設縮放中心 */
}

/* Hover 放大效果 */
.pg-main:hover img {
  transform: scale(1.8); /* 放大倍率，可調 1.5–2 */
  cursor: zoom-in;
  
}

.pg-main .figure-caption{margin:.4rem 0 0;color:#64748b;font-size:.9rem}

/* 縮圖列：置中、間距更小 */
.pg-thumbs {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}
/* 縮圖按鈕：縮小尺寸，方形比例 */
.pg-thumb {
  width: 64px;
  height: 64px;
  padding: 2px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  transition: .15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pg-thumb:hover{background:#f1f5f9}
.pg-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.pg-thumb.is-active{
  border-color:var(--brand);
  outline:2px solid var(--brand);
  background:#eef2ff;
}

/* RWD：縮圖列 5→4→3→2 欄，手機可橫向滾動 */
@media (max-width:1024px){ .pg-thumbs{ grid-template-columns:repeat(4,1fr);} }
@media (max-width: 768px) {
  .pg-thumb {
    width: 48px;
    height: 48px;
  }
}

/* Fullscreen Search Overlay */
.search-overlay[hidden] { display: none !important; }
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background:  rgba(15, 23, 42, 0.85); /*深色半透明 */
}

.search-box {
  position: relative;
  width: min(600px, 92vw);
  background: #fff;

  border-radius: 8px;
  display: flex;
  align-items: center;
  box-shadow: 0 8px 28px rgba(2, 6, 23, .15);
}

.search-box input[name="q"] {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--line);
  font-size: 1rem;
  border-radius: 6px 0px 0px 6px;
  outline: none;
}
.search-box input[name="q"]:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(0, 54, 130, 0.15);
}

.search-box button.btn {
  padding: 10px 16px;
  font-size: 1rem;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 0 6px 6px 0px;
  cursor: pointer;
}
.search-box button.btn:hover {
  background: var(--brand-600);
}

.search-close {
  position: fixed;
  top: 0px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

.search-close:hover {
  color: #ccc;
}

.f_select{
    width: 100%;
    height: 45px;
    border: 1px solid var(--line);
    text-align: center;
}


.p_select {
    width: 100%;
    height: 40px;
    border: 1px solid var(--line);
    text-align: left;
    background-color: #fff;
}
/* --- Google 翻譯隱藏設定 --- */
#google_translate_element {
    position: absolute;
    top: -9999px;
    left: -9999px;
    width: 0;
    height: 0;
    overflow: hidden;
    visibility: hidden;
}

/* 隱藏 Google 翻譯產生的頂部橫幅 */
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}
body {
    top: 0px !important;
}
