/* 影音探索頁 */
.videos-page {
	--video-accent: #c8a063;
	--video-accent-dark: #a8864f;
	--video-ink: #1a1a1a;
	--video-muted: #6b6b6b;
	--video-line: #e8e4dc;
	--video-surface: #fff;
	--video-bg: #eceae5;
	--video-radius: 0;
	--video-shadow: 0 8px 28px rgba(26, 26, 26, 0.06);
	--video-shadow-hover: 0 16px 40px rgba(26, 26, 26, 0.1);
}

.videos-page {
	background-color: var(--video-bg);
}

.videos-page .portfolio-wrap {
	padding-top: 8px;
}

/* 頂部分類／搜尋（沿用原本樣式） */
.videos-page .works_category {
	border: 1px solid #d1d1d1;
	padding: 3px 5px;
	color: inherit;
	text-decoration: none;
}

.videos-page .works_category.active {
	background-color: #c8a063;
	color: #fff;
}

.videos-page .search-btn {
	background-color: #c8a063;
	border: 0;
	padding: 8px 10px;
	color: #fff;
	cursor: pointer;
}

/* 篩選側欄（≤1024px 抽屜；≥1025px 僅顯示頂部 title_box） */
.videos-page .videos-sidebar-panel {
	background: var(--video-surface);
	box-shadow: var(--video-shadow);
}

.videos-page .videos-sidebar__section {
	margin-bottom: 26px;
}

.videos-page .videos-sidebar__section:last-child {
	margin-bottom: 0;
}

.videos-page .videos-sidebar__heading {
	position: relative;
	margin: 0 0 14px;
	padding-left: 12px;
	font-size: 15px;
	font-weight: 700;
	color: var(--video-ink);
	letter-spacing: 0.04em;
}

.videos-page .videos-sidebar__heading::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.15em;
	bottom: 0.15em;
	width: 3px;
	background: var(--video-accent);
}

.videos-page .videos-sidebar__categories {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	font-size: 14px;
}

.videos-page .videos-sidebar-search-input {
	display: block;
	width: 100%;
	height: 36px;
	padding: 6px 12px;
	box-sizing: border-box;
	border: 1px solid var(--video-line);
	background: #fff;
	font-size: 14px;
	line-height: 1.4;
}

.videos-page .videos-sidebar-search-input:focus {
	border-color: var(--video-accent);
	box-shadow: 0 0 0 3px rgba(200, 160, 99, 0.2);
	outline: 0;
}

.videos-page .videos-sidebar__search-btn {
	display: block;
	width: 100%;
	margin-top: 10px;
	padding: 10px 16px;
	border: 0;
	background: var(--video-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.videos-page .videos-sidebar__search-btn:hover {
	background: var(--video-accent-dark);
}

@media (min-width: 1025px) {
	.videos-page .videos-filters-bar {
		display: block;
	}

	.videos-page .videos-sidebar,
	.videos-page .videos-sidebar-backdrop,
	.videos-page .videos-sidebar-toggle,
	.videos-page .videos-sidebar-close {
		display: none !important;
	}
}

@media (max-width: 1024px) {
	.videos-page .videos-filters-bar {
		display: none !important;
	}

	.videos-page .videos-sidebar {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		z-index: 1001;
		width: min(300px, 88vw);
		height: 100vh;
		height: 100dvh;
		max-height: 100dvh;
		margin: 0;
		padding: 0;
		transform: translateX(-100%);
		transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
		overflow: hidden;
		display: flex;
		flex-direction: column;
		background: var(--video-surface);
		box-shadow: 4px 0 24px rgba(0, 0, 0, 0.14);
		pointer-events: none;
	}

	.videos-page .videos-sidebar.is-open {
		transform: translateX(0);
		pointer-events: auto;
	}

	.videos-page .videos-sidebar-scroll {
		flex: 1 1 auto;
		min-height: 0;
		overflow-x: hidden;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		background: var(--video-surface);
	}

	.videos-page .videos-sidebar .videos-sidebar-panel {
		min-height: 100%;
		margin: 0;
		box-shadow: none;
		padding: 56px 22px 28px;
		background: var(--video-surface);
	}

	.videos-page .videos-sidebar-backdrop {
		position: fixed;
		inset: 0;
		z-index: 1000;
		background: rgba(0, 0, 0, 0.45);
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
			visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	}

	.videos-page .videos-sidebar-backdrop.is-visible {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
	}

	.videos-page .videos-sidebar-toggle {
		position: fixed;
		left: 25px;
		bottom: 25px;
		z-index: 999;
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		min-width: 48px;
		height: 48px;
		padding: 0 14px;
		border: 0;
		background: #555;
		color: #fff;
		font-size: 14px;
		font-weight: 600;
		cursor: pointer;
		box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
		transition: background-color 0.3s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	}

	.videos-page .videos-sidebar-toggle:hover {
		background: var(--video-accent);
	}

	.videos-page .videos-sidebar-toggle svg {
		display: block;
		width: 20px;
		height: 20px;
		flex-shrink: 0;
	}

	.videos-page .videos-sidebar-close {
		display: flex;
		align-items: center;
		justify-content: center;
		position: absolute;
		top: 12px;
		right: 20px;
		width: 36px;
		height: 36px;
		padding: 0;
		border: 0;
		background: rgba(0, 0, 0, 0.06);
		color: #333;
		cursor: pointer;
		z-index: 2;
	}

	.videos-page .videos-sidebar-close:hover {
		background: rgba(200, 160, 99, 0.35);
	}
}

body.videos-sidebar-open {
	overflow: hidden;
}

/* 影音卡片網格 */
.videos-page .videos-grid {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -12px;
}

.videos-page .videos-grid-col {
	box-sizing: border-box;
	padding: 0 12px 28px;
	flex: 0 0 100%;
	max-width: 100%;
}

@media (min-width: 576px) {
	.videos-page .videos-grid-col {
		flex: 0 0 50%;
		max-width: 50%;
	}
}

@media (min-width: 992px) {
	.videos-page .videos-grid-col {
		flex: 0 0 33.333333%;
		max-width: 33.333333%;
	}
}

@media (min-width: 1281px) {
	.videos-page .videos-grid-col {
		flex: 0 0 25%;
		max-width: 25%;
	}
}

.videos-page .video-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--video-surface);
	border-radius: var(--video-radius);
	overflow: hidden;
	box-shadow: var(--video-shadow);
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
		box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.videos-page .video-card:hover {
	transform: translateY(-6px);
	box-shadow: var(--video-shadow-hover);
}

.videos-page .video-card__media {
	display: block;
	position: relative;
	aspect-ratio: 5 / 3;
	overflow: hidden;
	background: #1a1a1a;
}

.videos-page .video-card__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 50%, rgba(26, 26, 26, 0.22) 100%);
	opacity: 0;
	transition: opacity 0.35s ease;
	pointer-events: none;
}

.videos-page .video-card:hover .video-card__media::after {
	opacity: 1;
}

.videos-page .video-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.videos-page .video-card:hover .video-card__media img {
	transform: scale(1.06);
}

.videos-page .video-card__play {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 52px;
	height: 52px;
	margin: -26px 0 0 -26px;
	background: rgba(255, 255, 255, 0.92);
	pointer-events: none;
	transition: transform 0.3s ease, background-color 0.3s ease;
}

.videos-page .video-card__play::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	margin: -10px 0 0 -5px;
	border-style: solid;
	border-width: 10px 0 10px 16px;
	border-color: transparent transparent transparent var(--video-ink);
}

.videos-page .video-card:hover .video-card__play {
	transform: scale(1.08);
	background: var(--video-accent);
}

.videos-page .video-card:hover .video-card__play::before {
	border-left-color: #fff;
}

.videos-page .video-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 18px 20px 20px;
	letter-spacing: 0;
}

.videos-page .video-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
	margin: 0 0 10px;
}

.videos-page .video-card__date {
	display: inline-block;
	margin: 0;
	padding: 4px 10px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.04em;
	color: var(--video-accent-dark);
	background: rgba(200, 160, 99, 0.14);
}

.videos-page .video-card__category {
	display: inline-block;
	padding: 4px 10px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--video-muted);
	background: #f0eeea;
	text-decoration: none;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.videos-page .video-card__category:hover {
	color: var(--video-accent-dark);
	background: rgba(200, 160, 99, 0.14);
}

.videos-page .video-card__title {
	margin: 0 0 10px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.45;
	color: var(--video-ink);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

.videos-page .video-card__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.25s ease;
}

.videos-page .video-card:hover .video-card__title a {
	color: var(--video-accent-dark);
}

.videos-page .video-card__excerpt {
	margin: 0 0 14px;
	font-size: 13px;
	line-height: 1.65;
	color: var(--video-muted);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

.videos-page .video-card__more {
	margin-top: auto;
	font-size: 13px;
	font-weight: 600;
	color: var(--video-ink);
	text-decoration: none;
	letter-spacing: 0.02em;
	transition: color 0.25s ease, letter-spacing 0.25s ease;
}

.videos-page .video-card__more::after {
	content: " →";
	color: var(--video-accent);
}

.videos-page .video-card__more:hover {
	color: var(--video-accent-dark);
	letter-spacing: 0.06em;
}

@media (max-width: 768px) {
	.videos-page .video-card__title {
		font-size: 15px;
	}

	.videos-page .video-card__body {
		padding: 16px 16px 18px;
	}
}

/* 分頁（沿用原本樣式） */
.videos-page .pagination {
	margin: auto;
	width: fit-content;
	display: flex;
	align-items: center;
}

.videos-page .pagination select {
	border: 1px solid #c1c1c1;
	padding: 2px 20px;
	border-radius: 5px;
}

.videos-page .pagination a {
	display: flex;
	align-items: center;
}

.videos-page .pagination a.disabled {
	display: none;
}

/* 空狀態 */
.videos-page .videos-empty {
	min-height: 320px;
	margin: 24px 0;
	padding: 48px 24px;
	text-align: center;
	background: var(--video-surface);
	box-shadow: var(--video-shadow);
}

.videos-page .videos-empty__title {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 700;
	color: var(--video-ink);
}

.videos-page .videos-empty__text {
	margin: 0;
	font-size: 14px;
	color: var(--video-muted);
}

@media (prefers-reduced-motion: reduce) {
	.videos-page .video-card,
	.videos-page .video-card__media img,
	.videos-page .video-card__play,
	.videos-page .videos-sidebar,
	.videos-page .videos-sidebar-backdrop,
	.videos-page .videos-sidebar-toggle {
		transition: none;
	}

	.videos-page .video-card:hover {
		transform: none;
	}
}
