/* =========================================
   Tameh Video Stories — Elementor Widget
========================================== */

.tameh-video-stories,
.tameh-video-stories * {
	box-sizing: border-box;
}

.tameh-video-stories {
	--tameh-vs-columns: 4;
	--tameh-vs-gap: 24px;
	--tameh-vs-card-height: 700px;
	--tameh-vs-radius: 38px;

	position: relative;
	z-index: 2;
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
	direction: rtl;
	overflow: visible;
	background: transparent;
}


/* =========================================
   Grid
========================================== */

.tameh-video-stories .tameh-video-grid {
	position: relative;
	display: grid;
	grid-template-columns: repeat(var(--tameh-vs-columns), minmax(0, 1fr));
	gap: var(--tameh-vs-gap);
	width: 100%;
	max-width: 1800px;
	margin: 0 auto;
	padding: 0;
	overflow: visible;
}


/* =========================================
   Card
========================================== */

.tameh-video-stories .tameh-video-card {
	position: relative;
	isolation: isolate;
	display: block;
	width: 100%;
	height: var(--tameh-vs-card-height);
	min-height: var(--tameh-vs-card-height);
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: var(--tameh-vs-radius);
	background:
		radial-gradient(
			circle at 50% 35%,
			#494949 0%,
			#282828 45%,
			#111 100%
		);
	box-shadow: 0 16px 45px rgba(0, 0, 0, 0.12);
}


/* =========================================
   Video
========================================== */

.tameh-video-stories .tameh-card-video {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: block;
	width: 100%;
	height: 100%;
	min-width: 100%;
	min-height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: inherit;
	object-fit: cover;
	object-position: center center;
	background: #111;
}


/* =========================================
   Overlay
========================================== */

.tameh-video-stories .tameh-card-overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: block;
	width: 100%;
	height: 100%;
	border-radius: inherit;
	pointer-events: none;
	background:
		linear-gradient(
			180deg,
			rgba(0, 0, 0, 0.02) 0%,
			rgba(0, 0, 0, 0.04) 38%,
			rgba(0, 0, 0, 0.18) 65%,
			rgba(0, 0, 0, 0.87) 100%
		);
	transition: opacity 0.3s ease, visibility 0.3s ease;
}


/* =========================================
   Badge
========================================== */

.tameh-video-stories .tameh-card-badge {
	position: absolute;
	top: 25px;
	right: 25px;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	min-width: 138px;
	min-height: 42px;
	margin: 0;
	padding: 9px 22px;
	border: 0;
	border-radius: 999px;
	background: #ff9418;
	color: #fff;
	font-family: inherit;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	white-space: nowrap;
	pointer-events: none;
	transition:
		opacity 0.3s ease,
		visibility 0.3s ease,
		transform 0.3s ease;
}


/* =========================================
   Play Button
========================================== */

.tameh-video-stories .tameh-card-play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 84px;
	height: 84px;
	min-width: 84px;
	min-height: 84px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.4);
	border-radius: 50%;
	outline: none;
	background: rgba(20, 20, 20, 0.48);
	color: #fff;
	cursor: pointer;
	transform: translate(-50%, -50%);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	box-shadow:
		0 10px 30px rgba(0, 0, 0, 0.25),
		inset 0 1px 0 rgba(255, 255, 255, 0.2);
	transition:
		background-color 0.25s ease,
		transform 0.25s ease,
		opacity 0.3s ease,
		visibility 0.3s ease;
}

.tameh-video-stories .tameh-card-play:hover {
	background: #ff9418;
	transform: translate(-50%, -50%) scale(1.08);
}

.tameh-video-stories .tameh-card-play:focus {
	outline: none;
}

.tameh-video-stories .tameh-card-play:focus-visible {
	outline: 3px solid rgba(255, 148, 24, 0.65);
	outline-offset: 5px;
}

.tameh-video-stories .tameh-card-play svg {
	display: block;
	width: 36px;
	height: 36px;
	margin: 0 0 0 4px;
	padding: 0;
	overflow: visible;
}

.tameh-video-stories .tameh-card-play svg path {
	fill: none;
	stroke: #fff;
	stroke-width: 2.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}


/* =========================================
   Content
========================================== */

.tameh-video-stories .tameh-card-content {
	position: absolute;
	right: 27px;
	bottom: 27px;
	left: 27px;
	z-index: 4;
	display: block;
	margin: 0;
	padding: 0;
	color: #fff;
	text-align: right;
	pointer-events: none;
	transition:
		opacity 0.3s ease,
		visibility 0.3s ease,
		transform 0.3s ease;
}

.tameh-video-stories .tameh-card-content h3 {
	display: block;
	width: 100%;
	margin: 0 0 9px;
	padding: 0;
	color: #fff;
	font-family: inherit;
	font-size: clamp(20px, 1.45vw, 27px);
	font-weight: 600;
	line-height: 1.55;
	text-align: right;
	text-shadow: 0 3px 12px rgba(0, 0, 0, 0.5);
}

.tameh-video-stories .tameh-card-content .tameh-card-name {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	color: rgba(255, 255, 255, 0.72);
	font-family: inherit;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.6;
	text-align: right;
	text-decoration: none;
	pointer-events: auto;
	transition: color 0.2s ease;
}

.tameh-video-stories .tameh-card-content a.tameh-card-name:hover {
	color: #ff9418;
}


/* =========================================
   Playing State
========================================== */

.tameh-video-stories .tameh-video-card.is-playing {
	cursor: default;
}

.tameh-video-stories .tameh-video-card.is-playing .tameh-card-overlay {
	opacity: 0;
	visibility: hidden;
}

.tameh-video-stories .tameh-video-card.is-playing .tameh-card-badge {
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
}

.tameh-video-stories .tameh-video-card.is-playing .tameh-card-play {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translate(-50%, -50%) scale(0.75);
}

.tameh-video-stories .tameh-video-card.is-playing .tameh-card-content {
	opacity: 0;
	visibility: hidden;
	transform: translateY(15px);
}


/* =========================================
   Tablet fallback (when Elementor vars not set)
========================================== */

@media screen and (max-width: 1100px) {
	.tameh-video-stories {
		--tameh-vs-radius: 32px;
	}
}


/* =========================================
   Mobile carousel
========================================== */

@media screen and (max-width: 767px) {
	.tameh-video-stories {
		padding: 15px 0;
		--tameh-vs-radius: 28px;
	}

	.tameh-video-stories[data-mobile-carousel="yes"] {
		overflow: hidden;
	}

	.tameh-video-stories[data-mobile-carousel="yes"] .tameh-video-grid {
		display: flex;
		grid-template-columns: none;
		width: 100%;
		max-width: none;
		margin: 0;
		padding: 0 16px 12px;
		overflow-x: auto;
		overflow-y: hidden;
		scroll-snap-type: x mandatory;
		scroll-behavior: smooth;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	.tameh-video-stories[data-mobile-carousel="yes"] .tameh-video-grid::-webkit-scrollbar {
		display: none;
		width: 0;
		height: 0;
	}

	.tameh-video-stories[data-mobile-carousel="yes"] .tameh-video-card {
		flex: 0 0 84vw;
		width: 84vw;
		max-width: 370px;
		scroll-snap-align: center;
	}

	.tameh-video-stories .tameh-card-badge {
		top: 18px;
		right: 18px;
		min-width: auto;
		min-height: 38px;
		padding: 8px 18px;
		font-size: 14px;
	}

	.tameh-video-stories .tameh-card-play {
		width: 72px;
		height: 72px;
		min-width: 72px;
		min-height: 72px;
	}

	.tameh-video-stories .tameh-card-play svg {
		width: 30px;
		height: 30px;
	}

	.tameh-video-stories .tameh-card-content {
		right: 20px;
		bottom: 22px;
		left: 20px;
	}

	.tameh-video-stories .tameh-card-content h3 {
		margin-bottom: 7px;
		font-size: 21px;
	}

	.tameh-video-stories .tameh-card-content .tameh-card-name {
		font-size: 14px;
	}
}

@media screen and (max-width: 420px) {
	.tameh-video-stories[data-mobile-carousel="yes"] .tameh-video-card {
		flex-basis: 86vw;
		width: 86vw;
	}
}
