.hero {
	margin-top: 20px;
	text-align: center;
}

#heroImg {
	width: 520px;
}

.hero-title-image {
	display: block;
	margin-top: 32px;
	margin-left: auto;
	margin-right: auto;
	width: 240px;
	height: auto;
}

.hero p {
	margin-top: 12px;
	font-size: 14px;
	letter-spacing: 0.2em;
}

.category-nav {
	margin: 80px auto 120px;
	display: flex;
	justify-content: center;
}

.cat-track {
	display: flex;
	align-items: center;
	position: relative;
}

.cat-dot {
	display: inline-block;
	position: relative;
	width: 42px;
	height: 42px;
	cursor: pointer;
	background: #ccc;
	border-radius: 50%;
	transition: transform 0.25s ease, filter 0.25s ease;
}

.cat-dot::after {
	content: "";
	position: absolute;
	inset: 0;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.cat-dot[data-index="0"]::after {
	background-image: url("../assets/images/20260314/Frame1.png");
}

.cat-dot[data-index="1"]::after {
	background-image: url("../assets/images/20260314/Frame2.png");
}

.cat-dot[data-index="2"]::after {
	background-image: url("../assets/images/20260314/Frame3.png");
}

.cat-dot[data-index="3"]::after {
	background-image: url("../assets/images/20260314/Frame4.png");
}

.cat-dot.active {
	background: transparent;
	transform: scale(1.1);
	filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.18));
}

.cat-dot.active::after {
	opacity: 1;
}

.cat-line {
	width: 100px;
	height: 4px;
	background: #d6d6d6;
	/* 預設灰色 */
	margin: 0 13px;
	transition: background 0.3s ease;
}

/* 線條顏色由 JS inline style 控制 */

.cat-dot.bounce {
	animation: dotBounce 0.45s ease;
}

@keyframes dotBounce {
	0% {
		transform: scale(1);
	}

	30% {
		transform: scale(1.7);
	}

	55% {
		transform: scale(0.9);
	}

	100% {
		transform: scale(1.3);
	}
}

.works {
	max-width: 1368px;
	margin: 0 auto 160px;
	padding: 0 24px;
}

.works-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 60px;
}

.work-item {
	aspect-ratio: 1/1;
	cursor: pointer;
	overflow: hidden;
	position: relative;
	opacity: 0;
	transform: scale(0.96);
	animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.work-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.work-item::after {
	content: "View";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	opacity: 0;
	transition: 0.3s;
}

.work-item:hover::after {
	opacity: 1;
}

/* ---------- DETAIL ---------- */
.detail-overlay {
	position: fixed;
	inset: 0;
	background: rgba(255, 255, 255, 0.2);
	backdrop-filter: blur(18px);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: 0.4s;
	z-index: 15000;
}

.detail-overlay.active {
	opacity: 1;
	pointer-events: auto;
}

.detail-card {
	background: #fff;
	width: 70%;
	max-width: 900px;
	padding: 40px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	border-radius: 4px;
}

.detail-card--image-only {
	width: min(95vw, 1280px);
	max-width: 1280px;
	padding: 0;
	display: block;
	background: transparent;
}

.detail-mock-image {
	display: block;
	width: 100%;
	height: auto;
	max-height: 90vh;
	object-fit: contain;
}

.close-btn {
	position: absolute;
	top: 30px;
	right: 40px;
	font-size: 28px;
	cursor: pointer;
}