/* YouTube Kanal Videoları */
.ykv {
	--ykv-cols: 3;
	--ykv-gap: 24px;
	--ykv-title-lines: 2;
	--ykv-play-size: 60px;
	--ykv-nav-size: 44px;
	--ykv-list-thumb: 40%;
	--ykv-zoom: 1.06;
	--ykv-c: var(--ykv-cols);
	position: relative;
	width: 100%;
}
@media (max-width: 1024px) {
	.ykv { --ykv-c: var(--ykv-cols-t, var(--ykv-cols)); }
}
@media (max-width: 767px) {
	.ykv { --ykv-c: var(--ykv-cols-m, var(--ykv-cols)); }
}

.ykv *, .ykv *::before, .ykv *::after { box-sizing: border-box; }

/* Izgara */
.ykv__track {
	display: grid;
	gap: var(--ykv-gap);
	grid-template-columns: repeat(var(--ykv-c), minmax(0, 1fr));
}
.ykv .ykv__item.is-hidden { display: none; }
.ykv__item.is-revealed { animation: ykv-in .35s ease both; }
@keyframes ykv-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.ykv__item {
	min-width: 0;
	transition: transform .25s ease, box-shadow .25s ease;
}

/* Görsel */
.ykv__thumb,
.ykv__frame {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: var(--ykv-ratio, 16 / 9);
	background: #000;
	border-radius: 8px;
}
.ykv--shorts .ykv__thumb,
.ykv--shorts .ykv__frame { aspect-ratio: var(--ykv-ratio, 9 / 16); }

.ykv .ykv__thumb img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	border: 0;
	border-radius: 0;
	object-fit: cover;
	transition: transform .45s ease;
}
.ykv__thumb:hover img,
.ykv__thumb:focus-visible img { transform: scale(var(--ykv-zoom)); }
.ykv__thumb::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .18);
	opacity: 0;
	transition: opacity .25s ease;
	pointer-events: none;
}
.ykv__thumb:hover::after { opacity: 1; }

.ykv__play {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}
.ykv__play svg { width: var(--ykv-play-size); height: auto; }
.ykv__play-bg { fill: #212121; fill-opacity: .8; transition: fill .2s, fill-opacity .2s; }
.ykv__play-icon { fill: #fff; }
.ykv__thumb:hover .ykv__play-bg,
.ykv__thumb:focus-visible .ykv__play-bg { fill: #f00; fill-opacity: 1; }

.ykv__duration {
	position: absolute;
	right: 8px;
	bottom: 8px;
	z-index: 1;
	padding: 2px 6px;
	border-radius: 4px;
	background: rgba(0, 0, 0, .8);
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: .02em;
}

.ykv__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Yazılar */
.ykv__body { padding-top: 12px; }
.ykv .ykv__title {
	display: -webkit-box;
	-webkit-line-clamp: var(--ykv-title-lines);
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0 0 6px;
	font-size: 1rem;
	line-height: 1.4;
}
.ykv .ykv__title a {
	color: inherit;
	text-decoration: none;
	box-shadow: none;
}
.ykv .ykv__title a:hover { text-decoration: none; }
.ykv__meta {
	font-size: .85em;
	line-height: 1.4;
	opacity: .75;
}
.ykv__sep { margin: 0 6px; }
.ykv__desc {
	margin: 8px 0 0;
	font-size: .9em;
	line-height: 1.5;
	opacity: .85;
}

/* Liste */
.ykv--list .ykv__track { grid-template-columns: minmax(0, 1fr); }
.ykv--list .ykv__item {
	display: grid;
	grid-template-columns: var(--ykv-list-thumb) minmax(0, 1fr);
	gap: calc(var(--ykv-gap) * .8);
	align-items: center;
}
.ykv--list .ykv__body { padding-top: 0; }
@media (max-width: 767px) {
	.ykv--list .ykv__item { grid-template-columns: minmax(0, 1fr); }
	.ykv--list .ykv__body { padding-top: 12px; }
}

/* Kaydırmalı */
.ykv--slider .ykv__viewport {
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.ykv--slider .ykv__viewport::-webkit-scrollbar { display: none; }
.ykv--slider .ykv__track {
	grid-template-columns: none;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - (var(--ykv-c) - 1) * var(--ykv-gap)) / var(--ykv-c));
}
.ykv--slider .ykv__item { scroll-snap-align: start; }

.ykv .ykv__nav {
	position: absolute;
	top: var(--ykv-nav-top, 35%);
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--ykv-nav-size);
	height: var(--ykv-nav-size);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .95);
	color: #111;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
	cursor: pointer;
	transform: translateY(-50%);
	transition: background-color .2s, opacity .2s;
}
.ykv .ykv__nav:hover { background: #fff; }
.ykv .ykv__nav svg { width: 60%; height: 60%; fill: currentColor; }
.ykv__nav--prev { left: 10px; }
.ykv__nav--next { right: 10px; }
.ykv--no-nav .ykv__nav { display: none; }

/* Buton */
.ykv__footer {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
	margin-top: 28px;
}
.ykv .ykv__more,
.ykv .ykv__btn {
	font: inherit;
	border: 0;
	cursor: pointer;
	display: inline-block;
	padding: 12px 28px;
	border-radius: 6px;
	background: #f00;
	color: #fff;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color .2s, color .2s;
}
/* Tıklandıktan sonra (odakta) temanın buton stili butonu görünmez yapmasın. */
.ykv .ykv__more:focus,
.ykv .ykv__btn:focus,
.ykv .ykv__more:active,
.ykv .ykv__btn:active { background-color: #f00; color: #fff; }
.ykv .ykv__more:focus-visible,
.ykv .ykv__btn:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.ykv .ykv__more:hover,
.ykv .ykv__btn:hover { background-color: #c00; color: #fff; }
.ykv .ykv__more[hidden] { display: none; }

/* Açılır pencere */
html.ykv-lb-open { overflow: hidden; }
.ykv-lb {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 56px 16px 24px;
	background: rgba(0, 0, 0, .9);
	opacity: 0;
	transition: opacity .2s ease;
}
.ykv-lb.is-open { opacity: 1; }
.ykv-lb__box {
	position: relative;
	width: min(1100px, 100%, calc((100vh - 100px) * 16 / 9));
	aspect-ratio: 16 / 9;
	background: #000;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}
.ykv-lb--short .ykv-lb__box {
	width: min(100%, calc((100vh - 100px) * 9 / 16), 480px);
	aspect-ratio: 9 / 16;
}
.ykv-lb__box iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
.ykv-lb .ykv-lb__close {
	position: absolute;
	top: 10px;
	right: 14px;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	font-size: 34px;
	line-height: 40px;
	text-align: center;
	cursor: pointer;
	opacity: .85;
}
.ykv-lb .ykv-lb__close:hover { opacity: 1; background: rgba(255, 255, 255, .12); }
