/* Kian TV — font: set --ktv-font (e.g. "IRANSansX") to force a font; default inherits the site font.
   Colors can be overridden from Elementor > Custom CSS by redefining these variables on .kian-tv */
.kian-tv,
.kian-tv-modal {
	--ktv-accent: #0b6fa4;
	--ktv-live: #e53935;
	--ktv-text: #1d2733;
	--ktv-muted: #6b7785;
	--ktv-radius: 6px;
	--ktv-cols: 5;
	--ktv-gap: 14px;
	font-family: var(--ktv-font, inherit);
}

.kian-tv {
	direction: rtl;
	width: 100%;
	margin: 0 auto;
	color: var(--ktv-text);
}

.kian-tv__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.kian-tv__title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.4;
	color: var(--ktv-text);
}

.kian-tv__live {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--ktv-live);
	box-shadow: 0 0 0 0 rgba(229, 57, 53, .6);
	animation: ktv-pulse 1.8s infinite;
	flex: none;
}

@keyframes ktv-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(229, 57, 53, .55); }
	70%  { box-shadow: 0 0 0 9px rgba(229, 57, 53, 0); }
	100% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0); }
}

.kian-tv__sub {
	margin: 4px 0 0;
	font-size: 14px;
	color: var(--ktv-muted);
}

.kian-tv__nav {
	display: flex;
	align-items: center;
	gap: 8px;
}

.kian-tv__more {
	font-size: 14px;
	font-weight: 500;
	color: var(--ktv-accent);
	text-decoration: none;
	margin-left: 6px;
}

.kian-tv__arrow {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, .12);
	background: #fff;
	color: var(--ktv-text);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 0 3px;
	transition: background .2s, color .2s;
}

.kian-tv__arrow:hover {
	background: var(--ktv-accent);
	color: #fff;
	border-color: var(--ktv-accent);
}

.kian-tv__track {
	display: flex;
	gap: var(--ktv-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	padding: 4px 2px 12px;
	scrollbar-width: none;
}

.kian-tv__track::-webkit-scrollbar { display: none; }

.kian-tv__card {
	position: relative;
	flex: 0 0 calc((100% - (var(--ktv-cols) - 1) * var(--ktv-gap)) / var(--ktv-cols));
	aspect-ratio: 9 / 16;
	border: 0;
	padding: 0;
	margin: 0;
	border-radius: var(--ktv-radius);
	overflow: hidden;
	background: #0d1b26;
	cursor: pointer;
	scroll-snap-align: start;
	box-shadow: 0 6px 18px rgba(13, 27, 38, .14);
	transition: transform .25s ease, box-shadow .25s ease;
	font: inherit;
	text-align: right;
}

@supports not (aspect-ratio: 9 / 16) {
	.kian-tv__card { height: 0; padding-top: 177.78%; }
}

.kian-tv__card:hover,
.kian-tv__card:focus-visible {
	transform: translateY(-4px);
	box-shadow: 0 12px 26px rgba(13, 27, 38, .22);
	outline: none;
}

.kian-tv__card:focus-visible { box-shadow: 0 0 0 3px var(--ktv-accent); }

.kian-tv__media,
.kian-tv__media img,
.kian-tv__media video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* no gradient overlay: covers carry their own */

.kian-tv__play {
	position: absolute;
	top: 12px;
	left: 12px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .22);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	transition: background .2s;
}

.kian-tv__play svg { width: 18px; height: 18px; fill: #fff; margin-left: 2px; }
.kian-tv__card:hover .kian-tv__play { background: var(--ktv-accent); }

.kian-tv__caption {
	position: absolute;
	right: 12px;
	left: 12px;
	bottom: 12px;
	z-index: 2;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-shadow: 0 1px 4px rgba(0, 0, 0, .85), 0 0 2px rgba(0, 0, 0, .6);
}

@media (max-width: 1024px) and (min-width: 768px) {
	.kian-tv { --ktv-cols: 3.5; }
}

@media (max-width: 767px) {
	.kian-tv { --ktv-cols: 2.3; --ktv-gap: 10px; }
	.kian-tv__title { font-size: 18px; }
	.kian-tv__arrow { display: none; }
	.kian-tv__caption { font-size: 13px; }
}

/* ---------- Player (lightbox) ---------- */
html.kian-tv-lock,
html.kian-tv-lock body { overflow: hidden !important; }

.kian-tv-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
}

.kian-tv-modal.is-open { display: flex; }

.kian-tv-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(5, 12, 18, .92);
}

.kian-tv-modal__box {
	position: relative;
	height: min(92vh, 860px);
	aspect-ratio: 9 / 16;
	max-width: 100vw;
	display: flex;
	flex-direction: column;
}

.kian-tv-modal__bar {
	position: absolute;
	top: 10px;
	right: 10px;
	left: 10px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	z-index: 3;
	pointer-events: none;
}

.kian-tv-modal__counter {
	color: #fff;
	font-size: 13px;
	background: rgba(0, 0, 0, .4);
	padding: 3px 10px;
	border-radius: 20px;
}

.kian-tv-modal__close {
	pointer-events: auto;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 0;
	background: rgba(0, 0, 0, .5);
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	padding: 0 0 4px;
}

.kian-tv-modal__stage {
	position: relative;
	flex: 1;
	border-radius: var(--ktv-radius);
	overflow: hidden;
	background: #000;
}

.kian-tv-modal__video,
.kian-tv-modal__frame {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	object-fit: contain;
	background: #000;
}

.kian-tv-modal__title {
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.7;
	padding: 10px 4px 0;
	text-align: center;
}

.kian-tv-modal__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 0;
	background: rgba(255, 255, 255, .14);
	color: #fff;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
	padding: 0 0 4px;
}

.kian-tv-modal__nav:hover { background: var(--ktv-accent); }
.kian-tv-modal__nav[hidden] { display: none; }
.kian-tv-modal__nav--prev { right: -68px; }
.kian-tv-modal__nav--next { left: -68px; }

@media (max-width: 767px) {
	.kian-tv-modal__box {
		height: 100%;
		width: 100%;
		aspect-ratio: auto;
	}
	.kian-tv-modal__stage { border-radius: 0; }
	.kian-tv-modal__title {
		position: absolute;
		bottom: 64px;
		right: 0;
		left: 0;
		padding: 0 16px;
		pointer-events: none;
		text-shadow: 0 1px 4px rgba(0, 0, 0, .7);
		z-index: 2;
	}
	.kian-tv-modal__nav { display: none; }
}

/* Guard against theme button styles (e.g. Hello Elementor pink buttons) */
.kian-tv button.kian-tv__card,
.kian-tv button.kian-tv__card:hover,
.kian-tv button.kian-tv__card:focus { background: #0d1b26; border: 0; color: #fff; text-transform: none; letter-spacing: normal; }
.kian-tv button.kian-tv__arrow:hover,
.kian-tv button.kian-tv__arrow:focus { background: var(--ktv-accent); color: #fff; border-color: var(--ktv-accent); }
.kian-tv button.kian-tv__arrow { background: #fff; color: var(--ktv-text); }
.kian-tv-modal button.kian-tv-modal__close,
.kian-tv-modal button.kian-tv-modal__close:hover { background: rgba(0, 0, 0, .5); color: #fff; border: 0; }
.kian-tv-modal button.kian-tv-modal__nav { background: rgba(255, 255, 255, .14); color: #fff; border: 0; }
.kian-tv-modal button.kian-tv-modal__nav:hover { background: var(--ktv-accent); color: #fff; }

/* Force corner radius: themes/Elementor kits often round every <img> or <button> */
.kian-tv .kian-tv__track .kian-tv__card { border-radius: var(--ktv-radius) !important; overflow: hidden !important; }
.kian-tv .kian-tv__track .kian-tv__media,
.kian-tv .kian-tv__track .kian-tv__media img,
.kian-tv .kian-tv__track .kian-tv__media video { border-radius: 0 !important; box-shadow: none !important; border: 0 !important; max-width: none !important; }
