@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@300;600&display=swap');

.cs::-webkit-scrollbar{
	height:14px;
}
.cs::-webkit-scrollbar-thumb{
	border:4px solid transparent;
	border-radius:10px;
	background-color: #677081;
	background-clip: content-box;
}
.cs::-webkit-scrollbar-thumb:hover{
	background-color: #999;
}

.themeEventContainer{
	font-family:'Josefin Sans', 微軟正黑體, sans-serif;
	font-size:clamp(12px, 1.08vw, 13px);
	margin-top:5%;
	aspect-ratio:2.18;
	background: url(../images/bg.jpg) no-repeat center/cover;
	padding-top:3em;
}

/*********************************** 標題 start ******************************************/
.themeEventContainer h2{
	font-weight: 600;
	font-size: 2.8em;
	color:#687081;
}
/*********************************** 標題 end ******************************************/

.allStory{
	padding:3.5% 0;
	overflow: hidden;
}

.ulWrapper{
	display: flex;
	width:590%;
}

.ulWrapper ul{
	width:50%;
	display: flex;
}
.ulWrapper li{
	width:7.34%;
	margin-left:2.65%;
	perspective: 2000px;
}
.ulWrapper li:nth-child(odd){ transform: rotate(-4.5deg);}
.ulWrapper li:nth-child(even){ transform: rotate(4.5deg);}

.ulWrapper li:nth-child(1){ --c1:#9bb39d; --c2:#677c6b; --c3:#b3bfb5; --c4:#546459;}
.ulWrapper li:nth-child(2){ --c1:#b1bac3; --c2:#7a8394; --c3:#b6bfce; --c4:#6b7284;}
.ulWrapper li:nth-child(3){ --c1:#c6b1b0; --c2:#936160; --c3:#c6b1b0; --c4:#7d4d4d;}
.ulWrapper li:nth-child(4){ --c1:#90acaf; --c2:#637575; --c3:#bed0d2; --c4:#4f6364;}
.ulWrapper li:nth-child(5){ --c1:#ce9987; --c2:#856451; --c3:#d8c4bd; --c4:#856451;}
.ulWrapper li:nth-child(6){ --c1:#cbae86; --c2:#8c7156; --c3:#dcc2a7; --c4:#8d7257;}
.ulWrapper li:nth-child(7){ --c1:#92a9b7; --c2:#66818a; --c3:#b9ccd2; --c4:#4f7077;}
.ulWrapper li:nth-child(8){ --c1:#a48c9a; --c2:#6b5c63; --c3:#d7cad3; --c4:#6b5c63;}
.ulWrapper li:nth-child(9){ --c1:#a8ae8c; --c2:#808463; --c3:#caccb7; --c4:#767757;}
.ulWrapper li:nth-child(10){ --c1:#a79d91; --c2:#72685c; --c3:#cec7c1; --c4:#5a5044;}

/************** 牌面 start ******************/
.cardWrapper{
	position: relative;
	aspect-ratio:0.68;
	transform-style: preserve-3d;
	transition: transform 0.5s;
}

.card{
	position: absolute;
	left:0;
	top:0;
	width:100%;
	height:100%;
	backface-visibility: hidden;
	background: #F60;
	border-radius:0.5em;
	overflow: hidden;
}
.card.back{
	transform: rotateY(180deg);
}

.card img{
	display: block;
}

/****** 正 start ******/
.card.front{
	background: var(--c1);
	padding:0.9em;
}
.card.front .major{
	height:85%;
	background: var(--c2);
	color:#FFF;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0 1em 1em;
}
.card.front .major h3{
	position: relative;
	font-size: 3em;
	font-weight: 300;
	line-height: 1em;
	width:100%;
	text-align: center;
}
.card.front .major h3:before{
	position: absolute;
	content: "";
	display: block;
	left:50%;
	top:50%;
	width:50%;
	aspect-ratio:1;
	transform: translate(-50%, -70%);
	background: var(--c1);
	border-radius:50%;
}
.card.front .major h3 span{
	position: relative;
}
.card.front .major p{
	line-height: 1.8em;
	margin:14% 0 0;
}
.card.front > p{
	font-weight: bold;
	font-size: 1.1em;
	margin:0.8em 0 0;
	text-align: center;
	line-height: 1.4em;
}

.card.front img{
	width:80%;
	margin-top: 0.25em;
}
/****** 正 end ******/

/****** 背 start ******/
.card.back{
	background: var(--c3);
	border:1em solid var(--c4);
	padding:0.8em 1.2em 1em;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.card.back img{
	width:65%;
	border-radius:50%;
}
.card.back h3{
	font-size: 1.2em;
	line-height: 1em;
	margin:1em 0 0;
}
.card.back p{
	font-size: 1.1em;
	margin:0.6em 0 0;
	line-height: 1.5em;
}
.card.back a{
	background: var(--c4);
	color:#FFF;
	margin-top:0.8em;
	padding:0.7em 1.5em 0.4em;
	font-size: 1.1em;
	line-height: 1em;
	border-radius:2em;
	transition: background 0.2s;
}
.card.back a:hover{
	background: var(--c2);
}
/****** 背 end ******/
/************** 牌面 end ******************/


@media (min-width:1024px){
	
	.ulWrapper{
		animation:moveStory 120s linear infinite;
	}
	@keyframes moveStory{
		to{
			transform:translateX(-50%);
		}
	}
	
	.allStory:hover .ulWrapper{
		animation-play-state:paused;
	}
	
	/************** 牌面 start ******************/
	.ulWrapper li:hover .cardWrapper{
		transform:rotateY(180deg);
	}
	/************** 牌面 end ******************/
	
}


@media screen and (max-width:1023px){
	
	.mainContainer > section.themeEventContainer{
		font-size:3.4vw;
		margin-top:10%;
		padding-bottom: 2.5%;
		aspect-ratio:auto;
	}
	
	/*********************************** 標題 start ******************************************/
	.mainContainer > section.themeEventContainer > h2{
		font-size: 2em;
	}
	/*********************************** 標題 end ******************************************/
	
	.allStory{
		padding:10% 0;
		overflow: auto;
	}

	.ulWrapper{
		width:1000%;
	}

	.ulWrapper ul{
		width:100%;
	}
	.ulWrapper ul+ul{
		display: none;
	}
	.ulWrapper li{
		font-size: 1.1em;
		width:7.5%;
		margin:0 1.25%;
	}
	
	/************** 牌面 start ******************/
	.ulWrapper li.flip .cardWrapper{
		transform:rotateY(180deg);
	}
	
	/****** 背 start ******/
	.card.back{
		padding-top:1em;
	}
	/****** 背 end ******/
	/************** 牌面 end ******************/
	
	/**************** 滑動提示 start *************/
	.hint{
		width:20px;
		aspect-ratio:1;
		margin:0 auto;
		display: block;
		background: url(../images/icon_drag_hint.svg) no-repeat center/contain;
		animation:hint 2s ease-in-out infinite;
	}
	@keyframes hint{
		0%{
			opacity:0;
		}
		30%{
			opacity:1;
		}
		100%{
			opacity:0;
			transform: translateX(-180%);
		}
	}
	/**************** 滑動提示 end *************/
	
}
