﻿/* 英文首頁 Bootstrap 5 相容：補回 Unify / BS3 會用到、但 5.3 拿掉的樣式 */

/* 對齊 BS3 字型，避免 Segoe UI 把字重 500 落到 regular */
:root {
	--bs-font-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif;
	--bs-body-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
body {
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* BS3 .container 寬度（BS5 在 1200px 只有 1140，區塊會看起來偏小） */
@media (min-width: 768px) {
	.container {
		width: 750px;
		max-width: 750px;
	}
}
@media (min-width: 992px) {
	.container {
		width: 970px;
		max-width: 970px;
	}
}
@media (min-width: 1200px) {
	.container {
		width: 1170px;
		max-width: 1170px;
	}
}

/* BS3 thumbnail / caption，下方連結卡片才不會扁掉 */
.caption {
	padding: 9px;
	color: #333;
}
.thumbnail {
	display: block;
	padding: 4px;
	margin-bottom: 20px;
	line-height: 1.42857143;
	background-color: #fff;
	border: 1px solid #ddd;
}

/* 桌機選單：Unify 用 .collapse 但不加 .show，BS5 會整欄藏起來 */
@media (min-width: 1201px) {
	.header-v6 .navbar-collapse.collapse {
		display: block !important;
		height: auto !important;
		overflow: visible !important;
	}
}

/* 手機選單：Unify 認 .in，BS5 認 .show */
@media (max-width: 1200px) {
	.header-v6 .navbar-collapse.collapse.show,
	.header-v6 .navbar-collapse.collapse.in {
		display: block !important;
		overflow-y: auto !important;
		width: 100%;
	}
}

/* 不要讓 BS5 .navbar / .nav 的 flex 打掉 Unify 排版 */
.header-v6 .navbar {
	display: block !important;
	flex-wrap: unset !important;
}
.header-v6 .navbar > .container {
	display: block !important;
	flex-wrap: unset !important;
	align-items: unset !important;
}
.header-v6 .navbar > .container:after,
.header-v6 .navbar-collapse:after,
.header-v6 .menu-container:after {
	content: "";
	display: table;
	clear: both;
}
.header-v6 .nav.navbar-nav,
.header-v6 .navbar-nav {
	display: block !important;
	flex-direction: unset !important;
	flex-wrap: unset !important;
}
.header-v6 .dropdown-toggle::after {
	display: none;
}
.header-v6 .navbar-nav .open > .dropdown-menu,
.header-v6 .navbar-nav .dropdown-menu.show {
	display: block;
}

/* BS3 的 .dropdown-menu > li > a 是 block；5 只認 .dropdown-item。
   inline + padding 的 hover 背景會凸出去蓋住下一項 */
.header-v6 .dropdown-menu > li {
	float: none;
	display: block;
	width: 100%;
}
.header-v6 .dropdown-menu > li > a {
	display: block;
	padding: 10px 25px;
	line-height: 1.5;
	white-space: nowrap;
	box-sizing: border-box;
}
.header-v6 .dropdown-menu > li > a:hover,
.header-v6 .dropdown-menu > li > a:focus {
	background-color: #F3F3F3;
}

/* 桌機：logo 左、選單右同一列，避免選單掉到 banner 上、li 寬度算成 0 疊字 */
@media (min-width: 1201px) {
	.header-v6 .navbar-brand {
		float: left;
	}
	.header-v6 .navbar > .container > .menu-container {
		float: left;
		width: 190px;
	}
	.header-v6 .navbar-collapse.collapse {
		float: left;
		width: calc(100% - 190px);
		display: block !important;
		height: auto !important;
		overflow: visible !important;
	}
	.header-v6 .collapse .menu-container {
		float: none !important;
		width: 100% !important;
	}
	.header-v6 .navbar-nav {
		float: none !important;
		width: 100% !important;
		margin: 0;
	}
	.header-v6 .navbar-nav > li {
		position: relative !important;
		display: block;
		float: left;
		flex: none;
		width: calc(100% / 9);
	}
	.header-v6 .navbar-nav > li > a,
	.header-v6 .navbar-nav > li > a.dropdown-toggle {
		white-space: normal !important;
		flex-wrap: wrap;
	}
	.header-v6 .navbar-nav > li > a strong {
		white-space: normal;
		width: 100%;
		flex: 1 1 100%;
	}
	/* 關掉 Popper 位移，下拉要貼在該選單項下面；寬度不要被 li 的 1/9 卡住 */
	.header-v6 .navbar-nav > li > .dropdown-menu {
		position: absolute !important;
		inset: auto !important;
		left: 0 !important;
		right: auto !important;
		top: 100% !important;
		bottom: auto !important;
		transform: none !important;
		margin: 0 !important;
		float: none;
		min-width: 230px !important;
		width: max-content;
		max-width: none !important;
		padding: 15px 0;
	}
}

@media (max-width: 1200px) {
	.header-v6 .navbar > .container > .menu-container {
		float: none;
		width: auto;
	}
	.header-v6 .navbar-nav {
		float: none !important;
	}
	.header-v6 .navbar-nav > li {
		float: none;
		width: 100%;
		display: block;
	}
	.header-v6 .navbar-nav .dropdown-menu {
		position: static;
		float: none;
	}
}

/* 漢堡鈕：沒有 BS3 時桌機要藏，Unify 只在 ≤1200 設 display:block */
.navbar-toggle .icon-bar {
	display: block;
}
@media (min-width: 1201px) {
	.header-v6 .navbar-toggle {
		display: none;
	}
}

/* BS3 工具 class */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.sr-only-focusable:active,
.sr-only-focusable:focus {
	position: static;
	width: auto;
	height: auto;
	margin: 0;
	overflow: visible;
	clip: auto;
	white-space: normal;
}
.img-responsive {
	display: block;
	max-width: 100%;
	height: auto;
}
.list-inline {
	padding-left: 0;
	list-style: none;
	margin-left: -5px;
}
.list-inline > li {
	display: inline-block;
	padding-right: 5px;
	padding-left: 5px;
}
.pull-left { float: left !important; }
.pull-right { float: right !important; }
.hidden-xs { display: none !important; }
@media (min-width: 768px) {
	.hidden-xs { display: block !important; }
}
.col-xs-6 {
	flex: 0 0 auto;
	width: 50%;
}
.col-xs-12 {
	flex: 0 0 auto;
	width: 100%;
}

/* footer：BS5 把沒 href 的 <a> 設成 inherit，會吃到 li { color:#000 } 變成黑字 */
.footer-v1 .footer a,
.footer-v1 .footer li a {
	color: #eee;
}
.footer-v1 .footer a:hover,
.footer-v1 .footer li a:hover {
	color: #72c02c;
}

/* footer：BS3 col-md-3 是 ≥992px 才四欄，BS5 的 md 提前到 768 */
@media (min-width: 768px) and (max-width: 991px) {
	.footer-v1 .col-md-3 {
		flex: 0 0 auto;
		width: 100%;
		max-width: 100%;
	}
}

/* Glyphicons（輪播按鈕），字型沿用舊 bootstrap fonts，不載入 3.4.1 CSS */
@font-face {
	font-family: "Glyphicons Halflings";
	src: url("../../resource/web/unify199/assets/plugins/bootstrap/fonts/glyphicons-halflings-regular.eot");
	src: url("../../resource/web/unify199/assets/plugins/bootstrap/fonts/glyphicons-halflings-regular.eot?#iefix") format("embedded-opentype"),
		url("../../resource/web/unify199/assets/plugins/bootstrap/fonts/glyphicons-halflings-regular.woff2") format("woff2"),
		url("../../resource/web/unify199/assets/plugins/bootstrap/fonts/glyphicons-halflings-regular.woff") format("woff"),
		url("../../resource/web/unify199/assets/plugins/bootstrap/fonts/glyphicons-halflings-regular.ttf") format("truetype"),
		url("../../resource/web/unify199/assets/plugins/bootstrap/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular") format("svg");
}
.glyphicon {
	position: relative;
	top: 1px;
	display: inline-block;
	font-family: "Glyphicons Halflings";
	font-style: normal;
	font-weight: normal;
	line-height: 1;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
.glyphicon-play:before { content: "\e072"; }
.glyphicon-pause:before { content: "\e073"; }
.glyphicon-chevron-left:before { content: "\e079"; }
.glyphicon-chevron-right:before { content: "\e080"; }

/* BS3 carousel 控制列／指示點（BS5 只認 carousel-control-prev/next） */
.carousel {
	position: relative;
}
.carousel-inner {
	position: relative;
	width: 100%;
	overflow: hidden;
}
.carousel-inner > .item,
.carousel-inner > .carousel-item {
	display: none;
	position: relative;
}
.carousel-inner > .item > img,
.carousel-inner > .item > a > img,
.carousel-inner > .carousel-item > img,
.carousel-inner > .carousel-item > a > img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	line-height: 1;
}
.carousel-inner > .active {
	display: block;
}
.carousel-control {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 15%;
	font-size: 20px;
	color: #fff;
	text-align: center;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
	background-color: rgba(0, 0, 0, 0);
	opacity: 0.5;
	text-decoration: none;
}
.carousel-control:hover,
.carousel-control:focus {
	color: #fff;
	opacity: 0.9;
	text-decoration: none;
}
.carousel-control.left {
	background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0, rgba(0, 0, 0, 0.0001) 100%);
}
.carousel-control.right {
	right: 0;
	left: auto;
	background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0, rgba(0, 0, 0, 0.5) 100%);
}
.carousel-control .glyphicon-chevron-left,
.carousel-control .glyphicon-chevron-right,
.carousel-control .glyphicon-pause,
.carousel-control .glyphicon-play {
	position: absolute;
	top: 50%;
	z-index: 5;
	display: inline-block;
	margin-top: -10px;
}
.carousel-control .glyphicon-chevron-left {
	left: 50%;
	margin-left: -10px;
}
.carousel-control .glyphicon-chevron-right {
	right: 50%;
	margin-right: -10px;
}
.carousel-indicators {
	position: absolute;
	bottom: 10px;
	left: 50%;
	z-index: 15;
	width: 60%;
	padding-left: 0;
	margin-left: -30%;
	text-align: center;
	list-style: none;
}
.carousel-indicators li {
	display: inline-block;
	width: 10px;
	height: 10px;
	margin: 1px;
	text-indent: -999px;
	cursor: pointer;
	background-color: transparent;
	border: 1px solid #fff;
	border-radius: 10px;
}
.carousel-indicators .active {
	width: 12px;
	height: 12px;
	margin: 0;
	background-color: #fff;
}
