:root {
	--kf-container: 1200px;
	--kf-header-bg: #04406d;
	--kf-footer-bg: #1f2933;
	--kf-footer-fg: #e4e7eb;
	--font-main-color: #1a4c80;
	--font-sub-color: #b48345;
	--font-en-color: #c8c9ca;
	--section-gap: 90px;
	--h2-size: 2.9rem;
	--h2-size-small: 2.5rem;
	--h3-size: 2rem;
	--h3-size-medium: 1.8rem;
	--h3-size-small: 1.6rem;
	--noto-serif: "Noto Serif TC", serif;
	--noto-sans: "Noto Sans TC", serif;
	--box-padding: 30px;
	--p-size-large:1.3rem;
	--p-size-medium:1.2rem;
	--p-size-small:1.1rem;
}
@media (max-width:1024px) {
	:root{
		--h2-size-small: 1.8rem;
		--h3-size-small: 1.1rem;
	}
}
@media (max-width:600px) {
	:root{
		--p-size-medium:1.1rem;
	}
}
@media (max-width:400px) {
	:root{
		--section-gap: 60px;
		--h2-size: 2.4rem;
		--h3-size:1.5rem;
	}
}
html{ 
	font-size: 100%; 
}
body{
	font-size: 1rem;
}
h1,h2,h3,h4,h5,h6,p,a{
	font-family: "Noto Serif TC", serif;
	margin: 0;
}

/* ---------- Header ---------- */

#site-header{
	display: none;
	background-color: var(--kf-header-bg);
	position: sticky;
	top: 0;
	z-index: 101;
	font-family: "Noto Serif TC", serif;
	font-size: 16px;
}
.kf-header__bar{
	display: flex;
	justify-content: space-between;
	padding: 15px var(--box-padding);
	align-items: center;
}
.kf-header__bar img{
	width: 65vw;
    display: block;
	max-width: 250px;
}
.kf-header__toggle {
    width: 30px;
    height: auto;
    gap: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    border: unset !important;
    background-color: transparent !important;
}
.kf-header__toggle span {
    width: 100%;
    height: 2px;
    background-color: white;
    transition-property: transform, opacity, background-color;
    transition-duration: .6s;
    transition-timing-function: cubic-bezier(.165, .84, .44, 1);
}
.kf-header__toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}
.kf-header__toggle.active span:nth-child(2) {
    opacity: 0;
}
.kf-header__toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}
#kf-primary-nav{
	/* display: none; */
	background: #0b4e80cc;
	max-height: 0;
	overflow-x: hidden;
    overflow-y: auto;
    transition-property: max-height;
    transition-duration: .6s;
    transition-timing-function:cubic-bezier(.4, 0, .2, 1);
}
#kf-primary-nav.active {
    max-height: 70dvh;
}
#kf-primary-nav ul{
	padding: 0;
	list-style: none;
}
#kf-primary-nav li{
	padding: 15px var(--box-padding);
	border-bottom: 1px solid #126aac;
	font-size: var(--p-size-medium);
	font-weight: 500;
}
#kf-primary-nav li a{
	color: white;
}



.top-menu-desk {
    position: sticky;
    top: 0;
	z-index: 101;
    background-color: var(--kf-header-bg);
    padding: 15px 25px;
    font-size: 16px;
	font-family: "Noto Serif TC", serif;
}
.top-menu-desk>div{
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0;
	width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}
.top-menu-logo img{
	display: block;
}
.top-menu-desk nav{
}
.top-menu-desk ul{
	display: flex;
    gap: 25px;
}
.top-menu-desk li{
	list-style: none;
}
.top-menu-desk a{
	text-decoration: unset;
    color: white;
    font-size: var(--p-size-medium);
	font-weight: 400;
}
.top-menu-logo{
	width: 300px;
}
@media (max-width:900px){
	.top-menu-logo{
		width: 27vw;
	}
	.top-menu-desk ul {
    	gap: 15px;
	}
}
@media (max-width:767px){
	.top-menu-desk{
		display: none;
	}
	#site-header{
		display: block;
	}
}

/* ---------- Footer ---------- */

.kf-footer {
	--kf-footer-bg: #285484;
	--kf-footer-fg: #fff;
	--kf-footer-logo-bg: #efefef;
	--kf-footer-line: rgba(255, 255, 255, .4);
	--kf-footer-raise: 40px; /* logo 區塊高出藍底的距離 */
	padding-top: var(--kf-footer-raise);
	font-family: "Noto Serif TC", serif;
}

.kf-footer a {
	color: inherit;
	text-decoration: none;
	font-size: var(--p-size-medium);
}

.kf-footer a:hover {
	text-decoration: underline;
}

/* :where() 讓權重為 0，後面元件自己的 margin/padding 才蓋得過 */
:where(.kf-footer ul) {
	margin: 0;
	padding: 0;
	list-style: none;
}

.kf-footer__main {
	display: grid;
	grid-template-columns: minmax(260px, 30%) 1fr;
	background: var(--kf-footer-bg);
	color: var(--kf-footer-fg);
}

/* 左側 logo */
.kf-footer__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: calc(-1 * var(--kf-footer-raise));
	padding: 40px 24px;
	background: var(--kf-footer-logo-bg);
}
.kf-footer__logo>div{
	text-align: center;
	width: 100%;
	display: none;
}
.kf-footer__logo>div p{
	color: black;
	margin: 0;
	text-align: center;
	font-weight: 500;
	font-size: var(--p-size-medium);
}
.kf-footer__logo>div>p:first-child{
	margin-bottom: 10px;
}
.kf-footer__logo>div>a{
	margin: 0 auto;
	max-width: 320px;
	margin-bottom: 10px;
	width: 100%;
}
.kf-footer__logo>div span{
	color: black;
	margin: 0;
}

.kf-footer__tel-btn{
	display: flex;
	border: 1px solid black;
	padding: 10px 25px;
	gap: 15px;
	justify-content: center;
}
.kf-footer__logo .kf-footer__tel-btn img{
	width: 30px;
}
.kf-footer__logo .kf-footer__tel-btn p,
.kf-footer__logo .kf-footer__tel-btn span{
	text-align: left;
}
.kf-footer__logo .kf-footer__tel-btn p{
	font-size: 1.3em;
    font-weight: 700;
}
.kf-footer__logo .kf-footer__tel-btn>div{
	display: flex;
	flex-direction: column;
	align-self: flex-start;
}

.kf-footer__logo img {
	display: block;
	width: 270px;
	max-width: 100%;
	height: auto;
}

/* 右側內容：聯絡資訊 | 選單，底部版權 */
.kf-footer__body {
	display: grid;
	grid-template-columns: auto 1fr;
	align-content: space-between;
	padding: 60px;
}

.kf-footer__contact {
	display: flex;
	flex-direction: column;
	gap: 28px;
	padding: 20px 60px 20px 0;
	border-right: 1px solid var(--kf-footer-line);
}

.kf-footer__contact-item {
	display: grid;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 4px 14px;
	font-size: var(--p-size-medium);
}

.kf-footer__contact-item>p>span{
	border: 1px solid white;
    padding: 2px 20px;
    margin-left: 5px;
    font-size: 1rem;
}

.kf-footer__contact-label {
	font-weight: 700;
	letter-spacing: 1px;
}

.kf-footer__contact-value--phone {
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 1.125rem;
	font-weight: 600;
	letter-spacing: .02em;
}

.kf-footer__nav {
	padding: 20px 0 20px 60px;
}

/* 第一層排成兩欄，子選單接在父項目下方 */
.kf-footer__menu {
	display: grid;
	grid-template-columns: repeat(2, max-content);
	gap: 40px 120px;
}

.kf-footer__menu > li > a {
	font-weight: 700;
	letter-spacing: 1px;
	font-size: var(--p-size-medium);
}

.kf-footer__menu .sub-menu {
	line-height: 1.6;
}

.kf-footer__copyright,
.kf-footer__copyright__m{
	grid-column: 1 / -1;
	justify-self: end;
	margin: 60px 0 0;
	font-size: .85rem;
	letter-spacing: .05em;
}

.kf-footer__copyright__m{
	text-align: center;
	justify-self: center;
	text-align: center;
	font-size: 1rem;
	display: none;
	margin: 40px auto;
	line-height: 1.7em;
}

@media (max-width: 1199px) {
	.kf-footer__contact {
		padding-right: 48px;
	}

	.kf-footer__nav {
		padding-left: 48px;
	}

	.kf-footer__menu {
		column-gap: 64px;
	}
	.kf-footer__copyright{
		font-size: .7rem;
	}
}


/* 平板：logo 移到上方 */
@media (max-width: 1000px) {
	.kf-footer__logo>div{
		display: block;
	}
	.kf-footer {
		padding-top: 0;
	}

	.kf-footer__main {
		grid-template-columns: 1fr;
		background: unset;
		position: relative;
	}

	.kf-footer__main::before{
		content: "";
		position: absolute;
		width: 100%;
		height: calc(100% - 40px);
		bottom: 0;
		left: 0;
		background: var(--kf-footer-bg);
		z-index: -1;
	}

	.kf-footer__logo {
		padding: 45px 20px;
		width: calc(100% - 60px);
		margin: 0 auto;
		flex-direction: column;
	}
	.kf-footer__logo>div{
		margin-top: 40px;
	}

	.kf-footer__body {
		padding: 32px 40px 20px;
	}
	.kf-footer__contact,
	.kf-footer__nav{
		display: none;
	}
	.kf-footer__copyright{
		margin-top: 0px;
	}
	.kf-footer__copyright__m{
		display: block;
	}
	.kf-footer__copyright{
		display: none;
	}
}

/* 手機：全部直排，分隔線改為橫線 */
@media (max-width: 767px) {
	.kf-footer__body {
		grid-template-columns: 1fr;
		padding: 28px var(--box-padding) 20px;
	}

	.kf-footer__contact {
		gap: 16px;
		padding: 0 0 24px;
		border-right: 0;
		border-bottom: 1px solid var(--kf-footer-line);
	}

	.kf-footer__nav {
		padding: 24px 0 0;
	}

	.kf-footer__menu {
		column-gap: 48px;
	}

	.kf-footer__copyright{
		justify-self: start;
		margin-top: 32px;
	}
}

@media (max-width: 450px){
	.kf-footer__copyright__m{
		font-size: 13px;
	}
}


.noto__sans{
	font-family: "Noto Sans TC", serif;
}


.m-btn {
    display: flex;
    align-items: center;
}
.m-btn .line {
    height: 1px;
}
.m-btn .ring {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.m-btn .dot {
    border-radius: 50%;
}





.m-btn .line {
  clip-path: polygon(0% 0%, 0% 0%, 0% 100%, 0% 100%);
  animation: m-line 2.3s infinite;
}
.m-btn .ring {
  transform: scale(0);
  opacity: 0;
  animation: m-ring 2.3s infinite;
}

@keyframes m-line {
  0%, 21.74% {
    clip-path: polygon(0% 0%, 0% 0%, 0% 100%, 0% 100%);
    animation-timing-function: cubic-bezier(0.455, 0.03, 0.515, 0.955);
  }
  60.87% {
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    animation-timing-function: cubic-bezier(0.455, 0.03, 0.515, 0.955);
  }
  100% {
    clip-path: polygon(100% 0%, 100% 0%, 100% 100%, 100% 100%);
  }
}

@keyframes m-ring {
  0%, 21.74% {
    transform: scale(0); opacity: 0;
    animation-timing-function: cubic-bezier(0.455, 0.03, 0.515, 0.955);
  }
  60.87% {
    transform: scale(1); opacity: 1;
    animation-timing-function: cubic-bezier(0.455, 0.03, 0.515, 0.955);
  }
  100% {
    transform: scale(1.6); opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .m-btn .line, .m-btn .ring { animation: none; }
  .m-btn .line { clip-path: none; }
  .m-btn .ring { transform: none; opacity: 1; }
}


.m-btn.is-v {
  flex-direction: column;   /* 假設 .m-btn 本身是 flex，線在上、圈在下 */
  align-items: center;
}
.m-btn.is-v .line {
  clip-path: inset(0 0 100% 0);
  animation-name: m-line-v;
}

@keyframes m-line-v {
  0%, 21.74% {
    clip-path: inset(0 0 100% 0);   /* 底部裁掉 100% → 看不到 */
    animation-timing-function: cubic-bezier(0.455, 0.03, 0.515, 0.955);
  }
  60.87% {
    clip-path: inset(0);            /* 完整顯示 */
    animation-timing-function: cubic-bezier(0.455, 0.03, 0.515, 0.955);
  }
  100% {
    clip-path: inset(100% 0 0 0);   /* 改從頂部裁掉 → 由上往下消失 */
  }
}
/* 尺寸：寬高對調、margin 換方向 */
.m-btn.is-v.template .line {
  width: 1px;          /* 依你原本 .line 的線粗調整 */
  height: 10em;
  margin-right: 0;
  margin-bottom: -1.2em;
}

/* reduced-motion 要補上，否則會被上面較高權重的選擇器蓋掉 */
@media (prefers-reduced-motion: reduce) {
  .m-btn.is-v .line { animation: none; clip-path: none; }
}


.m-btn.template{ 
  font-size: 1.2vw;
}
.m-btn.template .line{
  background: #182987;
  width: 10em;
  margin-right: -1.2em;
}
.m-btn.template .ring{
  border:1px solid #1a4c80;
  width: 2.9em;
  height: 2.9em;
}
.m-btn.template .dot{
  background: #224f7e;
  width: 0.4em;
  height: 0.4em;
}
@media (max-width:1024px){
  .m-btn.template{
    font-size: 1.8vw;
  }
}
@media (max-width:500px){
  .m-btn.template{
    font-size: 4vw;
  }
}


.global-btn-white,
.global-btn-blue{
  display: flex;
  align-items: center;
  gap: 20px;
  text-decoration: unset !important;
  color: black !important;
  border: 1px solid var(--font-main-color);
  padding: 10px 50px;
  justify-content: center;
  width: 100%;
  max-width: max-content;
  transition: all .3s ease-in-out;
}
.global-btn-white span,
.global-btn-blue span{
  font-size: var(--p-size-medium);
  font-weight: 500;
}
.global-btn-white div,
.global-btn-blue div{
	width: 1.8rem;
    aspect-ratio: 1 / 1;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 100%;
    padding: 0.4rem;
	padding-left: 0.6rem;
	overflow: hidden;
	transition: all .3s ease-in-out;
}
.global-btn-blue svg,
.global-btn-white svg{
	height: 100%;
	animation: arrow-loop 1.6s ease-in-out infinite;
}

.global-btn-blue{
  color: white !important;
  background-color: var(--font-main-color);
}
.global-btn-white{
  color: var(--font-main-color) !important;
  background-color: white;
}
.global-btn-blue div{
	background-color: white;
}
.global-btn-white div{
	background-color: var(--font-main-color);
}
.global-btn-blue svg path{
	fill: var(--font-main-color)
}
.global-btn-white svg path{
	fill: white;
	transition: all .3s ease-in-out;
}

.global-btn-white:hover{
	color: white !important;
	background-color: var(--font-sub-color);
}
.global-btn-white:hover div{
	background-color: white;
}
.global-btn-white:hover svg path{
	fill: var(--font-sub-color);
}


.global-btn-blue:hover{
	color: white !important;
	background-color: var(--font-sub-color);
}
.global-btn-blue:hover div{
	background-color: white;
}
.global-btn-blue:hover svg path{
	fill: var(--font-sub-color);
}

@keyframes arrow-loop {
  0%       { transform: translateX(0);     opacity: 1; }
  40%      { transform: translateX(200%);  opacity: 1; }
  41%      { transform: translateX(200%);  opacity: 0; }
  42%      { transform: translateX(-200%); opacity: 0; }
  45%      { transform: translateX(-200%); opacity: 1; }
  80%, 100%{ transform: translateX(0);     opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .global-btn-white svg { animation: none; }
}