/* BeatLatin Home — Nuevos videos destacados (16:9 Apple)
 *
 * PC: 4 enteras + peek · móvil: 1 + peek
 * Rocket minify: no calc(var(a) + var(b))
 */

.bl-home-videos {
	position: relative;
	overflow: visible;
	margin-bottom: 36px;
	font-family: var(--bl-font);
}

.bl-home-videos__header {
	margin-bottom: 12px;
}

.bl-home-videos__section-title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.2941176471;
	letter-spacing: -0.01em;
	color: var(--bl-system-primary, hsla(0, 0%, 100%, 0.92));
}

.bl-home-videos__title-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: inherit;
	text-decoration: none;
}

.bl-home-videos__title-link:hover {
	opacity: 0.92;
	color: inherit;
}

.bl-home-videos__title-link .fa-chevron-right {
	font-size: 0.72em;
	opacity: 0.75;
}

.bl-home-videos__shelf {
	position: relative;
	overflow: visible;
}

.bl-home-videos__shelf-arrow {
	position: absolute;
	/* Centro vertical del artwork 16:9 (resta meta ~44px) */
	top: calc((100% - 44px) / 2);
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 52px;
	padding: 0 !important;
	margin: 0;
	border: none !important;
	border-radius: 1000px !important;
	cursor: pointer;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
	will-change: opacity;
	color: rgba(245, 245, 247, 0.72) !important;
	background: rgba(255, 255, 255, 0.10) !important;
	backdrop-filter: blur(24px) saturate(185%);
	-webkit-backdrop-filter: blur(24px) saturate(185%);
	box-shadow:
		inset 0 0 0 0.5px rgba(255, 255, 255, 0.14),
		0 4px 14px rgba(0, 0, 0, 0.22) !important;
	transition:
		background-color 0.25s linear,
		color 0.25s linear,
		opacity 0.25s linear;
	-webkit-appearance: none;
	appearance: none;
	outline: none !important;
}

.bl-home-videos__shelf-arrow[hidden] {
	display: none !important;
}

.bl-home-videos__shelf-arrow-icon {
	width: 8.5px;
	height: 30.5px;
	fill: currentColor !important;
	flex-shrink: 0;
}

.bl-home-videos__shelf-arrow-icon--right {
	transform: scaleX(-1);
}

.bl-home-videos__shelf-arrow--left {
	left: 0;
	right: auto;
	translate: -10px -50%;
}

/* PC: 4 + peek · gap 14 · 3 gaps = 42 */
.bl-home-videos__shelf-arrow--right {
	right: calc(14px + (100% - 42px) / 4.04 * 0.04);
	left: auto;
	translate: 10px -50%;
}

.bl-home-videos__shelf-arrow:hover,
.bl-home-videos__shelf-arrow:focus,
.bl-home-videos__shelf-arrow:focus-visible,
.bl-home-videos__shelf-arrow:active {
	color: #ffffff !important;
	background: rgba(255, 255, 255, 0.16) !important;
	outline: none !important;
}

.bl-home-videos.is-shelf-hover .bl-home-videos__shelf-arrow:not([hidden]) {
	opacity: 1;
	pointer-events: auto;
}

.bl-home-videos.is-at-start .bl-home-videos__shelf-arrow--left {
	display: none !important;
}

.bl-home-videos.is-at-end .bl-home-videos__shelf-arrow--right {
	display: none !important;
}

.bl-home-videos__viewport {
	overflow: hidden;
	width: 100%;
}

@media (min-width: 1025px) {
	.bl-home-videos__viewport {
		box-sizing: border-box;
		width: calc(100% + var(--bl-bleed-left, 256px) + var(--bl-bleed-right, 12px));
		max-width: none;
		margin-left: calc(-1 * var(--bl-bleed-left, 256px));
		margin-right: calc(-1 * var(--bl-bleed-right, 12px));
		padding-left: var(--bl-bleed-left, 256px);
		padding-right: var(--bl-bleed-right, 12px);
	}
}

.bl-home-videos__track {
	display: flex;
	flex-wrap: nowrap;
	gap: 14px;
	list-style: none;
	margin: 0;
	padding: 0;
	transition: transform 0.38s cubic-bezier(0.25, 0.8, 0.25, 1);
	will-change: transform;
}

/* Desktop: 4 enteras + peek · 3×14 = 42 */
.bl-home-videos__item {
	flex: 0 0 calc((100% - 42px) / 4.04);
	width: calc((100% - 42px) / 4.04);
	max-width: calc((100% - 42px) / 4.04);
	min-width: 0;
	box-sizing: border-box;
}

.bl-home-videos__card {
	position: relative;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.bl-home-videos__art-wrap {
	position: relative;
	cursor: pointer;
}

.bl-home-videos__art {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: 7px;
	overflow: hidden;
	background: var(--bl-art-bg, rgba(255, 255, 255, 0.06));
	isolation: isolate;
	/* Apple vertical-video__artwork-wrapper + borde sutil sobre fondo oscuro */
	box-shadow:
		0 1px 1px rgba(0, 0, 0, 0.01),
		0 2px 2px rgba(0, 0, 0, 0.01),
		0 4px 4px rgba(0, 0, 0, 0.02),
		0 8px 8px rgba(0, 0, 0, 0.03),
		0 14px 14px rgba(0, 0, 0, 0.03),
		inset 0 0 0 0.5px rgba(255, 255, 255, 0.14);
}

[data-theme="light"] .bl-home-videos__art {
	box-shadow:
		0 1px 1px rgba(0, 0, 0, 0.02),
		0 2px 2px rgba(0, 0, 0, 0.02),
		0 4px 4px rgba(0, 0, 0, 0.03),
		0 8px 8px rgba(0, 0, 0, 0.04),
		inset 0 0 0 0.5px rgba(0, 0, 0, 0.12);
}

.bl-home-videos__poster {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bl-home-videos__poster-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: var(--bl-system-secondary, hsla(0, 0%, 100%, 0.55));
	font-size: 28px;
}

.bl-home-videos__preview {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: inherit;
	background: #111;
	pointer-events: none;
}

.bl-home-videos__card.has-video-preview .bl-home-videos__poster,
.bl-home-videos__card.has-video-preview .bl-home-videos__poster-placeholder {
	opacity: 0;
}

.bl-home-videos__shade {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: rgba(51, 51, 51, 0.3);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.1s ease-in;
	z-index: 1;
}

.bl-home-videos__mount {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	overflow: hidden;
	border-radius: inherit;
}

.bl-home-videos__engine {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: inherit;
	background: #000;
}

.bl-home-videos__controls {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	z-index: 3;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

.bl-home-videos__play {
	position: absolute;
	left: 10px;
	bottom: 10px;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0 !important;
	margin: 0;
	border: none !important;
	border-radius: 50% !important;
	cursor: pointer;
	color: #fff !important;
	background: rgba(255, 255, 255, 0.22) !important;
	backdrop-filter: blur(20px) saturate(180%);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	box-shadow:
		inset 0 0 0 0.5px rgba(255, 255, 255, 0.22),
		0 2px 8px rgba(0, 0, 0, 0.22);
	pointer-events: auto;
	-webkit-appearance: none;
	appearance: none;
}

.bl-home-videos__play .bl-home-videos__play-icon,
.bl-home-videos__play .bl-home-videos__pause-icon {
	display: block;
	width: 12px;
	height: 12px;
	fill: currentColor;
}

.bl-home-videos__play .bl-home-videos__pause-icon {
	display: none;
}

.bl-home-videos__card .bl-search-result__menu-wrap {
	position: absolute;
	right: 10px;
	bottom: 10px;
	z-index: 4;
	pointer-events: auto;
}

.bl-home-videos__options {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 28px !important;
	height: 28px !important;
	min-width: 28px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: none !important;
	border-radius: 50% !important;
	cursor: pointer;
	color: #fff !important;
	background: rgba(255, 255, 255, 0.22) !important;
	backdrop-filter: blur(20px) saturate(180%);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	box-shadow:
		inset 0 0 0 0.5px rgba(255, 255, 255, 0.22),
		0 2px 8px rgba(0, 0, 0, 0.22);
}

.bl-home-videos__meta {
	margin-top: 4px;
	min-width: 0;
	text-align: start;
}

.bl-home-videos__title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	margin: 0;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.2307692308;
	letter-spacing: -0.01em;
	color: var(--bl-system-primary, hsla(0, 0%, 100%, 0.92));
	word-break: break-word;
}

.bl-home-videos__artist {
	margin-top: 1px;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.2307692308;
	color: var(--bl-system-secondary, hsla(0, 0%, 100%, 0.55));
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 1;
	line-clamp: 1;
	overflow: hidden;
}

.bl-home-videos-playlist {
	display: none;
}

@media (hover: hover) and (pointer: fine) {
	.bl-home-videos__card:hover .bl-home-videos__shade,
	.bl-home-videos__card:focus-within .bl-home-videos__shade {
		opacity: 1;
	}

	.bl-home-videos__card:hover .bl-home-videos__controls,
	.bl-home-videos__card:focus-within .bl-home-videos__controls {
		opacity: 1;
		pointer-events: auto;
	}
}

.bl-home-videos__card.now-playing .bl-home-videos__shade,
.bl-home-videos__card.is-playing .bl-home-videos__shade {
	opacity: 1;
}

.bl-home-videos__card.now-playing .bl-home-videos__controls,
.bl-home-videos__card.is-playing .bl-home-videos__controls {
	opacity: 1;
	pointer-events: auto;
}

.bl-home-videos__card.now-playing .bl-home-videos__play,
.bl-home-videos__card.is-playing .bl-home-videos__play {
	background: rgba(255, 255, 255, 0.34) !important;
}

.bl-home-videos__card.now-playing:not(.paused) .bl-home-videos__play-icon,
.bl-home-videos__card.is-playing:not(.paused) .bl-home-videos__play-icon {
	display: none;
}

.bl-home-videos__card.now-playing:not(.paused) .bl-home-videos__pause-icon,
.bl-home-videos__card.is-playing:not(.paused) .bl-home-videos__pause-icon {
	display: block;
}

.bl-home-videos__card.now-playing.paused .bl-home-videos__play-icon,
.bl-home-videos__card.is-playing.paused .bl-home-videos__play-icon {
	display: block;
}

.bl-home-videos__card.now-playing.paused .bl-home-videos__pause-icon,
.bl-home-videos__card.is-playing.paused .bl-home-videos__pause-icon {
	display: none;
}

.bl-home-videos__card.now-playing .bl-home-videos__poster,
.bl-home-videos__card.now-playing .bl-home-videos__poster-placeholder,
.bl-home-videos__card.is-playing .bl-home-videos__poster,
.bl-home-videos__card.is-playing .bl-home-videos__poster-placeholder {
	opacity: 0;
}

/* Touch: tap en el artwork reproduce; ⋯ visible al reproducir */
@media (pointer: coarse) {
	.bl-home-videos__controls {
		opacity: 0;
		pointer-events: none;
	}

	.bl-home-videos__card.now-playing .bl-home-videos__controls,
	.bl-home-videos__card.is-playing .bl-home-videos__controls,
	.bl-home-videos__card:focus-within .bl-home-videos__controls {
		opacity: 1;
		pointer-events: auto;
		visibility: visible;
	}
}

/* Tablet: 2 + peek */
@media (max-width: 1024px) {
	.bl-home-videos__track {
		gap: 14px;
	}

	.bl-home-videos__item {
		flex: 0 0 calc((100% - 14px) / 2.04);
		width: calc((100% - 14px) / 2.04);
		max-width: calc((100% - 14px) / 2.04);
	}

	.bl-home-videos__shelf-arrow--right {
		right: calc(14px + (100% - 14px) / 2.04 * 0.04);
	}
}

/* QHD: 5 + peek */
@media (min-width: 2560px) {
	.bl-home-videos__track {
		gap: 16px;
	}

	.bl-home-videos__item {
		flex: 0 0 calc((100% - 64px) / 5.04);
		width: calc((100% - 64px) / 5.04);
		max-width: calc((100% - 64px) / 5.04);
	}

	.bl-home-videos__shelf-arrow--right {
		right: calc(16px + (100% - 64px) / 5.04 * 0.04);
	}
}

/* Móvil: 1 + peek */
@media (max-width: 767px) {
	.bl-home-videos {
		margin-bottom: 28px;
	}

	.bl-home-videos__shelf-arrow {
		display: none !important;
	}

	.bl-home-videos__viewport {
		touch-action: pan-y;
		-webkit-overflow-scrolling: touch;
		/* El JS hace axis-lock + preventDefault en swipe X */
	}

	.bl-home-videos__track {
		gap: 12px;
	}

	.bl-home-videos__item {
		flex: 0 0 calc((100% - 12px) / 1.22);
		width: calc((100% - 12px) / 1.22);
		max-width: calc((100% - 12px) / 1.22);
	}
}

[data-theme="light"] .bl-home-videos__section-title,
[data-theme="light"] .bl-home-videos__title {
	color: var(--bl-system-primary, rgba(0, 0, 0, 0.88));
}

[data-theme="light"] .bl-home-videos__artist {
	color: var(--bl-system-secondary, rgba(0, 0, 0, 0.56));
}

[data-theme="light"] .bl-home-videos__shelf-arrow,
[data-theme="light"] .bl-home-videos__shelf-arrow:hover {
	color: rgba(29, 29, 31, 0.55) !important;
	background: rgba(255, 255, 255, 0.78) !important;
	box-shadow:
		inset 0 0 0 0.5px rgba(0, 0, 0, 0.07),
		0 4px 14px rgba(0, 0, 0, 0.08) !important;
}
