/* ==========================================================================
   Videos  [jys_videos]  + visor de YouTube
   ========================================================================== */

.jys-videos {
	--jys-cols: 3;
	--jys-gold: #d7a34f;
	--jys-card: #161b22;

	display: grid;
	grid-template-columns: repeat(var(--jys-cols), minmax(0, 1fr));
	gap: 26px;
	text-align: left;
}

.jys-video {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	background: var(--jys-card);
	border: 0;
	color: #fff;
	text-decoration: none;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
	transition: transform .4s cubic-bezier(.22, .61, .36, 1), box-shadow .4s ease;
}

.jys-video:hover,
.jys-video:focus-visible {
	color: #fff;
	text-decoration: none;
	transform: translateY(-4px);
	box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
}

.jys-video:focus-visible { outline: 2px solid var(--jys-gold); outline-offset: 3px; }

.jys-video__thumb {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #0e1217;
}

.jys-video__thumb img,
.jys-video__noimg {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .8s cubic-bezier(.22, .61, .36, 1), filter .5s ease;
}

.jys-video__noimg { background: linear-gradient(135deg, #222a35, #11161c); }

.jys-video:hover .jys-video__thumb img { transform: scale(1.06); filter: brightness(.8); }

/* Boton play */
.jys-video__play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 64px;
	height: 64px;
	margin: -32px 0 0 -32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(17, 22, 28, .55);
	border: 2px solid rgba(255, 255, 255, .85);
	backdrop-filter: blur(2px);
	transition: background-color .3s ease, border-color .3s ease, transform .3s cubic-bezier(.22, .61, .36, 1);
}

.jys-video__play svg { width: 28px; height: 28px; margin-left: 4px; fill: #fff; }

.jys-video:hover .jys-video__play,
.jys-video:focus-visible .jys-video__play {
	background: var(--jys-gold);
	border-color: var(--jys-gold);
	transform: scale(1.08);
}

.jys-video__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 4px 9px;
	background: rgba(17, 22, 28, .75);
	color: var(--jys-gold);
	font-family: Montserrat, sans-serif;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
}

/* Texto */
.jys-video__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 16px 18px 18px;
}

.jys-video__title {
	color: #fff;
	font-family: Montserrat, sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
}

.jys-video__sub {
	display: -webkit-box;
	overflow: hidden;
	color: rgba(255, 255, 255, .6);
	font-family: Montserrat, sans-serif;
	font-size: 12.5px;
	line-height: 1.45;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.jys-video__date {
	color: var(--jys-gold);
	font-family: Montserrat, sans-serif;
	font-size: 11px;
	letter-spacing: .12em;
	text-transform: uppercase;
}

/* --- Destacado: el primero grande, texto sobre la imagen ------------- */
.jys-videos--featured .jys-video--big {
	grid-column: span 2;
	grid-row: span 2;
	min-height: 360px;
}

.jys-video--big .jys-video__thumb {
	position: absolute;
	inset: 0;
	aspect-ratio: auto;
}

.jys-video--big .jys-video__body {
	position: relative;
	margin-top: auto;
	padding: 90px 28px 26px;
	background: linear-gradient(to top, rgba(10, 13, 18, .92) 0%, rgba(10, 13, 18, .6) 55%, rgba(10, 13, 18, 0));
	pointer-events: none;
}

.jys-video--big .jys-video__title { font-size: clamp(20px, 2.2vw, 30px); }
.jys-video--big .jys-video__sub { font-size: 14px; color: rgba(255, 255, 255, .75); }
.jys-video--big .jys-video__play { width: 92px; height: 92px; margin: -46px 0 0 -46px; }
.jys-video--big .jys-video__play svg { width: 40px; height: 40px; margin-left: 6px; }

/* Boton "Ver mas en YouTube" */
.jys-videos__more { margin: 40px 0 0; text-align: center; }

.jys-videos__btn {
	display: inline-block;
	padding: 14px 30px;
	border: 2px solid #a67f57;
	color: #a67f57;
	font-family: Montserrat, sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .15em;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color .3s ease, color .3s ease;
}

.jys-videos__btn:hover,
.jys-videos__btn:focus-visible {
	background: #a67f57;
	color: #fff;
	text-decoration: none;
}

/* --- Responsive ------------------------------------------------------- */
@media (max-width: 1024px) {
	.jys-videos { --jys-cols: 2 !important; gap: 18px; }
	.jys-videos--featured .jys-video--big { grid-row: auto; min-height: 0; aspect-ratio: 16 / 9; }
}

@media (max-width: 640px) {
	.jys-videos { --jys-cols: 1 !important; gap: 16px; }
	.jys-videos--featured .jys-video--big { grid-column: auto; aspect-ratio: auto; }
	.jys-video--big .jys-video__thumb { position: relative; aspect-ratio: 16 / 9; }
	.jys-video--big .jys-video__body { padding: 16px 18px 18px; background: none; }
	.jys-video--big .jys-video__title { font-size: 18px; }
	.jys-video--big .jys-video__play { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
	.jys-video--big .jys-video__play svg { width: 28px; height: 28px; margin-left: 4px; }
}

/* --- Visor ------------------------------------------------------------ */
.jys-vlb {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(10, 13, 18, .95);
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s ease, visibility 0s linear .3s;
}

.jys-vlb.is-open { opacity: 1; visibility: visible; transition: opacity .3s ease; }

.jys-vlb__frame {
	position: relative;
	width: min(1100px, 100%, calc(84vh * 16 / 9));
	aspect-ratio: 16 / 9;
	background: #000;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
	transform: scale(.96);
	transition: transform .4s cubic-bezier(.22, .61, .36, 1);
}

.jys-vlb.is-open .jys-vlb__frame { transform: none; }

.jys-vlb__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.jys-vlb__close {
	position: absolute;
	top: 14px;
	right: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .08);
	cursor: pointer;
}

.jys-vlb__close:hover,
.jys-vlb__close:focus-visible { background: #d7a34f; }

.jys-vlb__close svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }

@media (prefers-reduced-motion: reduce) {
	.jys-video, .jys-video__thumb img, .jys-vlb, .jys-vlb__frame { transition: none; }
}
