/**
 * Kumparan Article Video Mode (Article to Video Slide) Stylesheet
 *
 * @package Kumparan
 */

/* 1. CTA Button on Single Article */
.kumparan-video-mode-cta-wrap {
	margin: 20px 0 24px;
	width: 100%;
}

.btn-play-video-mode {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	padding: 14px 20px;
	background: linear-gradient(135deg, #091e2b 0%, #002b33 50%, #004d57 100%);
	border: 1px solid rgba(0, 165, 175, 0.4);
	border-radius: var(--radius-md, 10px);
	color: #FFFFFF;
	cursor: pointer;
	text-decoration: none;
	box-shadow: 0 8px 24px rgba(0, 165, 175, 0.18);
	transition: all var(--transition-smooth, 0.25s ease);
	position: relative;
	overflow: hidden;
}

.btn-play-video-mode::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 60%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
	transform: skewX(-25deg);
	transition: left 0.6s ease;
}

.btn-play-video-mode:hover::before {
	left: 150%;
}

.btn-play-video-mode:hover {
	transform: translateY(-2px);
	border-color: var(--kumparan-cyan, #00A5AF);
	box-shadow: 0 12px 30px rgba(0, 165, 175, 0.32);
}

.video-mode-play-icon {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: linear-gradient(135deg, #DC1641 0%, #ff3b65 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	box-shadow: 0 4px 14px rgba(220, 22, 65, 0.45);
	transition: transform 0.25s ease;
}

.btn-play-video-mode:hover .video-mode-play-icon {
	transform: scale(1.1);
}

.video-mode-text-wrap {
	display: flex;
	flex-direction: column;
	text-align: left;
	flex: 1;
}

.video-mode-label {
	font-size: 1.02rem;
	font-weight: 800;
	color: #FFFFFF;
	letter-spacing: -0.01em;
	display: flex;
	align-items: center;
	gap: 6px;
}

.video-mode-subtext {
	font-size: 0.8rem;
	color: rgba(255, 255, 255, 0.72);
	margin-top: 2px;
	font-weight: 400;
}

.video-mode-badge-live {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	background: rgba(220, 22, 65, 0.18);
	border: 1px solid rgba(220, 22, 65, 0.5);
	border-radius: var(--radius-pill, 999px);
	font-size: 0.72rem;
	font-weight: 800;
	color: #ff5277;
	letter-spacing: 0.05em;
	position: relative;
	flex-shrink: 0;
}

.video-mode-badge-live .pulse-ring {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: #DC1641;
	animation: livePulse 1.6s infinite ease-out;
}

@keyframes livePulse {
	0% {
		transform: scale(0.9);
		opacity: 1;
	}
	50% {
		transform: scale(1.6);
		opacity: 0.3;
	}
	100% {
		transform: scale(2.2);
		opacity: 0;
	}
}

/* 2. Fullscreen Video Player Modal */
.kumparan-video-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100vw;
	height: 100vh;
	z-index: 99999;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.kumparan-video-modal.open {
	display: flex;
	opacity: 1;
}

/* Ambient Backdrop */
.video-modal-backdrop {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	z-index: 1;
}

.video-modal-bg-image {
	position: absolute;
	inset: -40px;
	background-size: cover;
	background-position: center;
	filter: blur(40px) brightness(0.35) saturate(1.4);
	transform: scale(1.1);
	transition: background-image 0.5s ease;
}

.video-modal-bg-overlay {
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at center, rgba(15, 23, 42, 0.7) 0%, rgba(2, 6, 23, 0.95) 100%);
}

/* 3. Vertical 9:16 Player Container */
.kumparan-video-container {
	position: relative;
	z-index: 10;
	width: 460px;
	max-width: 96vw;
	height: min(92vh, 840px);
	aspect-ratio: 9 / 16;
	background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(2, 6, 23, 0.98) 100%);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 20px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 165, 175, 0.2);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	user-select: none;
}

@media screen and (max-width: 640px) {
	.kumparan-video-container {
		width: 100vw;
		max-width: 100vw;
		height: 100vh;
		max-height: 100vh;
		aspect-ratio: auto;
		border-radius: 0;
		border: none;
	}
}

/* 4. Top Segmented Progress Bar */
.video-progress-bar-container {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 12px 14px 4px;
	z-index: 25;
	position: relative;
}

.progress-bar-segment {
	flex: 1;
	height: 3px;
	background: rgba(255, 255, 255, 0.25);
	border-radius: 2px;
	overflow: hidden;
	position: relative;
	cursor: pointer;
}

.progress-bar-fill {
	width: 0%;
	height: 100%;
	background: #FFFFFF;
	border-radius: 2px;
	transition: width 0.1s linear;
}

.progress-bar-segment.completed .progress-bar-fill {
	width: 100% !important;
}

.progress-bar-segment.active .progress-bar-fill {
	background: var(--kumparan-cyan, #00A5AF);
}

/* 5. Header Meta & Controls */
.video-top-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 16px 10px;
	z-index: 25;
	position: relative;
}

.video-top-left {
	display: flex;
	align-items: center;
	gap: 8px;
}

.video-cat-pill {
	display: inline-block;
	padding: 4px 10px;
	background: var(--kumparan-cyan, #00A5AF);
	color: #FFFFFF;
	font-size: 0.72rem;
	font-weight: 800;
	border-radius: var(--radius-pill, 999px);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.video-time-indicator {
	font-size: 0.74rem;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.7);
	font-variant-numeric: tabular-nums;
}

.video-top-right {
	display: flex;
	align-items: center;
	gap: 8px;
}

.video-icon-btn {
	background: rgba(0, 0, 0, 0.4);
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: #FFFFFF;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease;
	position: relative;
}

.video-icon-btn:hover {
	background: rgba(255, 255, 255, 0.2);
	transform: scale(1.08);
}

.video-close-btn:hover {
	background: rgba(220, 22, 65, 0.85);
	border-color: #DC1641;
}

/* Audio wave animation */
.video-music-btn {
	position: relative;
}

.video-music-btn.playing {
	color: var(--kumparan-cyan, #00A5AF);
	border-color: var(--kumparan-cyan, #00A5AF);
}

.music-wave-bars {
	display: none;
	position: absolute;
	bottom: -4px;
	right: -2px;
	align-items: flex-end;
	gap: 1px;
	height: 12px;
}

.video-music-btn.playing .music-wave-bars {
	display: flex;
}

.music-wave-bars span {
	width: 2px;
	height: 6px;
	background: var(--kumparan-cyan, #00A5AF);
	border-radius: 1px;
	animation: waveJump 0.8s infinite ease-in-out alternate;
}

.music-wave-bars span:nth-child(2) {
	animation-delay: 0.2s;
	height: 10px;
}

.music-wave-bars span:nth-child(3) {
	animation-delay: 0.4s;
	height: 8px;
}

@keyframes waveJump {
	0% {
		height: 3px;
	}
	100% {
		height: 12px;
	}
}

/* 6. Slide Stage */
.video-slide-stage {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px 24px;
	position: relative;
	z-index: 15;
	overflow-y: auto;
	scrollbar-width: none;
}

.video-slide-stage::-webkit-scrollbar {
	display: none;
}

.video-slide-inner {
	width: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	animation: slideFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideFadeIn {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* Opening Slide */
.slide-opening {
	text-align: center;
}

.opening-thumb-wrap {
	width: 100%;
	max-height: 220px;
	border-radius: 14px;
	overflow: hidden;
	margin-bottom: 20px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
	position: relative;
}

.opening-thumb-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.opening-title {
	font-size: clamp(1.3rem, 4vw, 1.65rem);
	font-weight: 900;
	line-height: 1.3;
	color: #FFFFFF;
	margin-bottom: 16px;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.opening-meta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-size: 0.8rem;
	color: rgba(255, 255, 255, 0.75);
}

.opening-author {
	font-weight: 700;
	color: var(--kumparan-cyan, #00A5AF);
}

/* Paragraph Content Slide */
.slide-paragraph {
	background: rgba(255, 255, 255, 0.05);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	padding: 26px 22px;
	border-radius: 16px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.slide-paragraph-text {
	font-size: clamp(1.15rem, 3.4vw, 1.45rem);
	font-weight: 600;
	line-height: 1.62;
	color: #FFFFFF;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
	margin: 0;
}

.slide-paragraph-text a {
	color: var(--kumparan-cyan, #00A5AF);
	text-decoration: underline;
}

/* Quote Slide */
.slide-quote {
	padding: 28px 24px;
	background: rgba(0, 165, 175, 0.1);
	border-left: 4px solid var(--kumparan-cyan, #00A5AF);
	border-radius: 12px;
	position: relative;
}

.quote-icon {
	color: var(--kumparan-cyan, #00A5AF);
	opacity: 0.6;
	margin-bottom: 12px;
}

.slide-quote-text {
	font-size: clamp(1.18rem, 3.6vw, 1.5rem);
	font-weight: 700;
	font-style: italic;
	line-height: 1.55;
	color: #FFFFFF;
	margin: 0;
}

/* Image Slide */
.slide-image {
	text-align: center;
}

.slide-image-wrap {
	width: 100%;
	max-height: 380px;
	border-radius: 14px;
	overflow: hidden;
	margin-bottom: 14px;
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
}

.slide-image-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.slide-image-caption {
	font-size: 0.82rem;
	color: rgba(255, 255, 255, 0.75);
	line-height: 1.4;
	font-style: italic;
}

/* Heading Slide */
.slide-heading {
	text-align: center;
	padding: 30px 20px;
}

.slide-heading-text {
	font-size: clamp(1.35rem, 4.2vw, 1.8rem);
	font-weight: 900;
	line-height: 1.35;
	color: var(--kumparan-cyan, #00A5AF);
	text-transform: uppercase;
	letter-spacing: -0.01em;
}

/* List Slide */
.slide-list {
	padding: 24px;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 14px;
}

.slide-list-items {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.slide-list-items li {
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.5;
	color: #FFFFFF;
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.slide-list-items li::before {
	content: '•';
	color: var(--kumparan-cyan, #00A5AF);
	font-size: 1.4rem;
	line-height: 1;
}

/* Ending Slide */
.slide-ending {
	text-align: center;
	padding: 10px;
}

.ending-check-circle {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: linear-gradient(135deg, #10b981 0%, #059669 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 18px;
	box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.ending-title {
	font-size: 1.45rem;
	font-weight: 800;
	color: #FFFFFF;
	margin-bottom: 8px;
}

.ending-desc {
	font-size: 0.88rem;
	color: rgba(255, 255, 255, 0.72);
	margin-bottom: 22px;
	line-height: 1.45;
}

.ending-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 22px;
}

.btn-ending-replay {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 20px;
	background: var(--kumparan-cyan, #00A5AF);
	color: #FFFFFF;
	border: none;
	border-radius: var(--radius-pill, 999px);
	font-weight: 700;
	font-size: 0.92rem;
	cursor: pointer;
	transition: all 0.2s ease;
}

.btn-ending-replay:hover {
	background: #008e96;
	transform: translateY(-2px);
}

.btn-ending-exit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 20px;
	background: rgba(255, 255, 255, 0.1);
	color: #FFFFFF;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: var(--radius-pill, 999px);
	font-weight: 600;
	font-size: 0.88rem;
	cursor: pointer;
	transition: all 0.2s ease;
}

.btn-ending-exit:hover {
	background: rgba(255, 255, 255, 0.2);
}

/* Next story card in ending slide */
.ending-next-card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	text-decoration: none;
	text-align: left;
	transition: all 0.2s ease;
}

.ending-next-card:hover {
	background: rgba(0, 165, 175, 0.15);
	border-color: var(--kumparan-cyan, #00A5AF);
	transform: translateY(-2px);
}

.ending-next-thumb {
	width: 58px;
	height: 44px;
	border-radius: 6px;
	object-fit: cover;
	flex-shrink: 0;
}

.ending-next-info {
	flex: 1;
	min-width: 0;
}

.ending-next-label {
	font-size: 0.7rem;
	font-weight: 700;
	color: var(--kumparan-cyan, #00A5AF);
	text-transform: uppercase;
	display: block;
	margin-bottom: 2px;
}

.ending-next-title {
	font-size: 0.84rem;
	font-weight: 700;
	color: #FFFFFF;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0;
}

/* 7. Tap Navigation Zones (Left/Right) */
.video-tap-zone {
	position: absolute;
	top: 70px;
	bottom: 60px;
	width: 25%;
	z-index: 18;
	cursor: pointer;
	display: flex;
	align-items: center;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.video-tap-zone:hover {
	opacity: 1;
}

.zone-left {
	left: 0;
	justify-content: flex-start;
	padding-left: 10px;
	background: linear-gradient(90deg, rgba(0, 0, 0, 0.25) 0%, transparent 100%);
}

.zone-right {
	right: 0;
	justify-content: flex-end;
	padding-right: 10px;
	background: linear-gradient(-90deg, rgba(0, 0, 0, 0.25) 0%, transparent 100%);
}

.tap-hint {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
}

/* 8. Bottom Control Bar */
.video-bottom-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 18px 14px;
	z-index: 25;
	position: relative;
	background: linear-gradient(0deg, rgba(2, 6, 23, 0.95) 0%, transparent 100%);
}

.video-bottom-left {
	display: flex;
	align-items: center;
	gap: 12px;
}

.video-play-pause-btn {
	background: rgba(255, 255, 255, 0.15);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #FFFFFF;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease;
}

.video-play-pause-btn:hover {
	background: var(--kumparan-cyan, #00A5AF);
	border-color: var(--kumparan-cyan, #00A5AF);
	transform: scale(1.08);
}

.video-slide-counter {
	font-size: 0.78rem;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.75);
}

.video-reading-speed-badge {
	font-size: 0.72rem;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.5);
	background: rgba(255, 255, 255, 0.08);
	padding: 4px 10px;
	border-radius: 12px;
}

/* Loading State in Video Stage */
.video-stage-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	color: rgba(255, 255, 255, 0.8);
	font-size: 0.9rem;
}

.video-spinner {
	width: 38px;
	height: 38px;
	border: 3px solid rgba(255, 255, 255, 0.2);
	border-top-color: var(--kumparan-cyan, #00A5AF);
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* 9. Front Page Video Shorts Block */
.kumparan-shorts-block {
	margin: 28px 0 36px;
	padding: 24px 20px;
	background: linear-gradient(135deg, #0b1524 0%, #06101c 100%);
	border-radius: var(--radius-lg, 14px);
	border: 1px solid rgba(0, 165, 175, 0.2);
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16);
	position: relative;
	overflow: hidden;
}

.kumparan-shorts-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
}

.shorts-header-left {
	display: flex;
	align-items: center;
	gap: 10px;
}

.shorts-accent-icon {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: linear-gradient(135deg, #DC1641 0%, #ff3b65 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #FFFFFF;
}

.shorts-title {
	font-size: 1.25rem;
	font-weight: 800;
	color: #FFFFFF;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 10px;
}

.shorts-badge-live {
	font-size: 0.72rem;
	font-weight: 800;
	color: #DC1641;
	background: rgba(220, 22, 65, 0.15);
	padding: 3px 10px;
	border-radius: var(--radius-pill, 999px);
	border: 1px solid rgba(220, 22, 65, 0.35);
}

.kumparan-shorts-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 16px;
}

@media screen and (max-width: 1024px) {
	.kumparan-shorts-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media screen and (max-width: 640px) {
	.kumparan-shorts-grid {
		display: flex;
		overflow-x: auto;
		gap: 12px;
		scrollbar-width: none;
		padding-bottom: 8px;
	}
	.kumparan-shorts-grid::-webkit-scrollbar {
		display: none;
	}
	.kumparan-short-card {
		flex: 0 0 170px;
	}
}

.kumparan-short-card {
	position: relative;
	aspect-ratio: 9 / 16;
	border-radius: 14px;
	overflow: hidden;
	background-color: #0d1e2e;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	border: 1px solid rgba(255, 255, 255, 0.08);
	display: block;
	text-decoration: none;
}

.kumparan-short-card:hover {
	transform: translateY(-5px) scale(1.02);
	border-color: var(--kumparan-cyan, #00A5AF);
	box-shadow: 0 14px 32px rgba(0, 165, 175, 0.35);
}

.short-card-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.kumparan-short-card:hover .short-card-thumb {
	transform: scale(1.08);
}

.short-card-gradient {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(2, 6, 23, 0.3) 40%, rgba(2, 6, 23, 0.95) 100%);
	z-index: 2;
}

.short-card-play-badge {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.9);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(220, 22, 65, 0.9);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 5;
	box-shadow: 0 4px 16px rgba(220, 22, 65, 0.5);
	opacity: 0.9;
	transition: all 0.25s ease;
}

.kumparan-short-card:hover .short-card-play-badge {
	transform: translate(-50%, -50%) scale(1.1);
	background: #DC1641;
	opacity: 1;
}

.short-card-duration-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	background: rgba(0, 0, 0, 0.65);
	color: #FFFFFF;
	font-size: 0.68rem;
	font-weight: 700;
	padding: 2px 7px;
	border-radius: 4px;
	z-index: 5;
	backdrop-filter: blur(4px);
}

.short-card-content {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 14px 12px;
	z-index: 5;
}

.short-card-cat {
	font-size: 0.68rem;
	font-weight: 800;
	color: var(--kumparan-cyan, #00A5AF);
	text-transform: uppercase;
	margin-bottom: 4px;
	display: block;
}

.short-card-title {
	font-size: 0.88rem;
	font-weight: 700;
	line-height: 1.35;
	color: #FFFFFF;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
	.video-slide-inner,
	.progress-bar-fill,
	.music-wave-bars span,
	.btn-play-video-mode,
	.kumparan-short-card {
		animation: none !important;
		transition: none !important;
	}
}
