:root{
	--section-left: calc(clamp(0px, 7svw - 70px, 100px) + 300px);
	--purple: #310164;
	--space-right: clamp(50px, 10svw, 150px);
	--under-title-spacing: clamp(50px, 8svw, 150px);
}

html[lang='tc'] * {
	font-family: 'Noto Sans TC', sans-serif;
}
html[lang='sc'] * {
	font-family: 'Noto Sans SC', sans-serif;
}

html, body {
	position: relative;
	width: 100svw;
	height: 100svh;
	color-scheme: light only;
	margin: 0;

	overflow: hidden;
}


section{
	max-width: 100%;
	max-height: 100svh;
	width: 100%;
	height: 100svh;
	position: sticky;
	top: 0;
}

section:not(.active) {
	z-index: -1;
}

section:not(.active) .section-content{
	opacity: 0;
	z-index: -1;
}

.section-content{
	transition: opacity 0.5s ease;
	width: calc(100svw - var(--section-left) - var(--under-title-spacing) - var(--space-right));
	margin-left:  var(--section-left);
	padding-top: 235px;
	height: 100svh;
	min-height: 500px;
}

h2, h3, h4, h5 {
	color: var(--purple);
	margin: 0;
	font-size: 24px;
	font-weight: bold;
}

h3 {
	font-size: 18px;
}

h5 {
	font-size: 16px;
}

h5 + p {
	margin-top: 0;
}

p {
	color: var(--purple);
	text-align: justify;
}


ol.bracket-number{
	counter-reset: item 0;
}
ol.bracket-number li {
  	counter-increment: item;
}
ol.bracket-number li::marker{
	content: "（" counter(item) "）";
}
.image-centered{
	display: flex;
	align-items: center;
	justify-content: center;
	height: 250px;
	max-width: 100%;
}

.image-centered > img{
	height: 100%;
	width: auto;
	max-width: 100%;
	object-fit: contain;
}

.flex-row{
	display: flex;
	flex-direction: row;
}

.inline-image{
	display: inline-block;
}
.inline-image.left{
	float: left;
	margin-right: 10px;
}
.inline-image.right{
	float: right;
	margin-left: 10px;
}

.pop-up span{
	color: var(--purple);
}

.pop-up .line {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 2px;
}

.pop-up .line::before{
	content: '';
	width: calc(100% - 50px);
	height: 2px;
	background-color: var(--purple);
}


.pop-up .case-study,
.pop-up .table-container{
	border: 2px solid var(--purple);
	border-radius: 20px;
}

.pop-up .grid-table > div{
	display: grid;
	grid-template-columns: 1fr 1fr;
	padding: 20px 30px;
}

.pop-up .grid-table{
	border-radius: 20px;
    overflow: hidden;
}

.pop-up .grid-table > div{
	padding: 0px;
	width: calc(100%);
}
.pop-up .grid-table.striped > div:nth-child(even){
	background-color: white;
}
.pop-up .grid-table.striped > div:nth-child(odd){
	background-color: #e4d7f2;
}
.pop-up .grid-table.striped > div:first-child{
	background-color: white;
	height: 10px;
}
.pop-up .grid-table.striped > div:last-child{
	background-color: #e4d7f2;
	height: 10px;
}

.pop-up .grid-table.striped > div > div:first-child{
	padding: 3px 0px 3px 40px;
	font-weight: 300;
}
.pop-up .grid-table.striped > div > div:last-child{
	padding: 3px 20px;
	color: var(--purple);
	border-left: 2px solid var(--purple); 
	font-weight: bold;
}

ul.urls{
	list-style-type: none;
}
ul.urls > li::before{
	content: '';
	height: 18px;
	width: 18px;
	background-image: url(./assets/deco/url-arrow.png?v=5);
	display: inline-block;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: bottom;
}
ul.urls > li {
	margin-bottom: 4px;
}

ul.urls > li > a{
	margin-left: 20px;
	color: black;
	text-decoration: none;
}

ul.urls > li > a:hover{
	color: var(--purple);
}

.video-row{
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
  overflow: auto;
  width: 100%;
	column-gap: 20px;

}

.video-col {
	display: flex;
	flex-direction: column;
	align-items: center;
	row-gap: 20px;

	width: 100%;
	max-width: 350px;
	margin: 0 auto;
	overflow-x: hidden;
}

.video-col > a {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: var(--purple);
	align-items: center;
	font-weight: bold;

}

.video-col > a > img,
.video-accordion > img{
	width: 100%;
	margin-bottom: 6px;
}

.video-col > a > img + div{
	height: 44px; /* label height + border*/
	display: flex;
	align-items: center;
	justify-content: center;
}

.row-image{
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
    align-self: center;
}

.row-image:first-child{
	margin-right: 20px;
}
.row-image:last-child{
	margin-left: 20px;
}

img[src='']{
	height: 150px;
	aspect-ratio: 16 / 9;
	background-color: var(--purple);
}

.pop-up .tab{
	display: grid;
	grid-template-areas: 
	"l1 l2 l3 l4 l5 l6"
	"tc tc tc tc tc tc";
	margin-top: 20px;
}

.pop-up .tab.E1{
	grid-template-areas: 
	"l1 l2 l3 l4 l5"
	"tc tc tc tc tc";
}

.pop-up .tab > label{
	height: 60px;
	background-color: #eee;
	color: var(--purple);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	cursor: pointer;
	border-bottom: 2px solid var(--purple);
	position: sticky;
	top: 0;
}

.pop-up .tab > label::before{
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: #eee;
	z-index: -1;
}

.pop-up .tab > label > input,
.video-accordion label > input{
	height: 0;
	width: 0;
	margin:0;
	overflow: hidden;
}

.pop-up .tab > label:has(input:checked){
	color: white;
}

.pop-up .tab > label:has(input:checked)::before{
	background-color: var(--purple);
	color: white;
	border-top-left-radius: 20px;
	border-top-right-radius: 20px;
}

.pop-up .tab > label:has(input:checked) > span{
	color: white !important;
}

.pop-up .tab > label:nth-of-type(1){
	grid-area: l1;
}
.pop-up .tab > label:nth-of-type(2){
	grid-area: l2;
}
.pop-up .tab > label:nth-of-type(3){
	grid-area: l3;
}
.pop-up .tab > label:nth-of-type(4){
	grid-area: l4;
}
.pop-up .tab > label:nth-of-type(5){
	grid-area: l5;
}
.pop-up .tab > label:nth-of-type(6){
	grid-area: l6;
}

.pop-up .tab > label + .tab-content{
	grid-area: tc;
	padding: 20px 10px;
	display: none;
}

.pop-up .tab > label:has(input:checked) + .tab-content{
	display: block;
}

.pop-up .modal-content:has(iframe){
	position: relative;
	max-height: 100%;
	display: flex;
	align-items: center;
}

.pop-up .iframe-wrapper{
	width: 100%;
	max-height: calc(100svh - 180px - 120px - 40px);
    overflow: hidden;
	display: flex;
	justify-content: center;
}

.pop-up iframe{
	border: none;
	max-width: 100%;
	height: calc(100svh - 180px - 120px - 40px);
	aspect-ratio: 16 / 9;
}

span.w-light{
	font-weight: 300;
}

span.name-xl{
	font-size: 22px;
}

.mw-250{
	max-width: 250px;

	img{
		width: 100%;
	}
}

.video-col > .video-accordion{
	display: flex;
	flex-direction: column;
}

.video-accordion label{
	width: calc(100% - 4px);
	height: 40px;

	border: 2px solid var(--purple);
	color: var(--purple);

	display: flex;
	align-items: center;
	justify-content: center;

	position: relative;
}

.video-accordion > label:has(input:checked){
	color: white;
	background-color: var(--purple);
}

.video-accordion > label + ul{
	list-style-type: none;
	padding: 0;
	width: 100%;
	flex-direction: column;
	display: none;
	background-color: #e2d0ea;
	margin: 0;
}

.video-accordion > label > .expand-icon {
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	justify-self: end;
	position: absolute;
	right: 10px;
	transition: all 0.5s ease;
}

.video-accordion > label:has(input:checked) > .expand-icon{
	transform: rotate(90deg);
}

.pop-up .modal-content .video-accordion > label + ul li{
	width: 100%;
	height: 40px;
	padding-left: 10px;
	display: flex;
	align-items: center;
	color: var(--purple) !important;
	font-weight: bold !important;
	user-select: none;
	cursor: pointer;
}

.video-accordion > label + ul li:hover{
	background-color: #d9ade2;
}

.video-accordion > label:has(input:checked) + ul{
	display: flex;
}

.src-text{
	color: #b6b6b6;
	font-size: 14px;
	text-align: right;
}

@media (max-aspect-ratio: 9 / 12) or (max-width: 968px) {
	:root{
		--section-left: 0px;
		--space-right: 40px;
		--under-title-spacing: 90px;
	}

	.section-content{
		padding-top: 120px;
	}


	.pop-up .tab{
		grid-template-areas: 
		"l1 l2 l3" 
		"l4 l5 l6"
		"tc tc tc";
		margin-top: 20px;
	}

	.pop-up .tab.E1{
		grid-template-areas: 
		"l1 l2 l3" 
		"l4 l5 l5"
		"tc tc tc";
	}

	.pop-up .tab > label:nth-of-type(4),
	.pop-up .tab > label:nth-of-type(5),
	.pop-up .tab > label:nth-of-type(6){
		top: 62px;
	}

	.pop-up .tab > label + .tab-content{
		padding: 20px 0px;
	}

}


@media (max-width: 576px) {
	:root{
		--under-title-spacing: 40px;
	}
	.pop-up .tab > label + .tab-content .inline-image{
		display: block;
		float: unset;
	}
}
