.itp-carrusel {
	--itp-azul: var(--wd-primary-color, rgb(91, 128, 193));
	--itp-texto: #242424;
	--itp-suave: #6b6b6b;
	--itp-fondo: #fff;
	--itp-borde: #e6e9ef;
	margin: 0 auto;
	padding: 8px 0 16px;
	font-family: var(--wd-text-font, "Inter", Arial, sans-serif);
}

.itp-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.itp-heading {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-family: var(--wd-title-font, "Roboto", Arial, sans-serif);
	font-size: 22px;
	line-height: 1.2;
	color: var(--itp-texto);
}

.itp-heading svg {
	color: var(--itp-azul);
	flex: none;
}

.itp-nav {
	display: flex;
	gap: 8px;
}

.itp-arrow {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--itp-borde);
	border-radius: 50%;
	background: var(--itp-fondo);
	color: var(--itp-texto);
	cursor: pointer;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.itp-arrow:hover,
.itp-arrow:focus-visible {
	background: var(--itp-azul);
	border-color: var(--itp-azul);
	color: #fff;
	outline: none;
}

/* Bordes difuminados, igual que un carrusel de logos */
.itp-viewport {
	overflow-x: auto;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
	mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
}

.itp-viewport::-webkit-scrollbar {
	display: none;
}

.itp-track {
	display: flex;
	width: max-content;
	margin: 0;
	padding: 4px 0;
	list-style: none;
}

/* margin en vez de gap: así ambas mitades miden lo mismo y el bucle no salta */
.itp-card {
	flex: none;
	width: 320px;
	margin: 0 16px 0 0;
	padding: 0;
	list-style: none;
}

.itp-link {
	display: flex;
	gap: 14px;
	align-items: center;
	height: 100%;
	padding: 12px;
	background: var(--itp-fondo);
	border: 1px solid var(--itp-borde);
	border-radius: 12px;
	color: inherit;
	text-decoration: none;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.itp-link:hover,
.itp-link:focus-visible {
	border-color: var(--itp-azul);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
	outline: none;
}

.itp-cover {
	position: relative;
	flex: none;
	width: 96px;
	height: 96px;
	border-radius: 8px;
	overflow: hidden;
	background: #f0f2f5;
}

.itp-cover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.itp-play {
	position: absolute;
	right: 6px;
	bottom: 6px;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #1db954;
	color: #fff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s;
}

.itp-link:hover .itp-play {
	transform: scale(1.1);
}

.itp-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.itp-badges {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.itp-new {
	padding: 2px 8px;
	border-radius: 999px;
	background: #e8392b;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.itp-badge {
	padding: 2px 8px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--itp-azul) 12%, transparent);
	color: var(--itp-azul);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.itp-title {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--itp-texto);
}

.itp-meta {
	font-size: 12px;
	color: var(--itp-suave);
}

@media (max-width: 600px) {
	.itp-card {
		width: 270px;
		margin-right: 12px;
	}

	.itp-cover {
		width: 80px;
		height: 80px;
	}

	.itp-heading {
		font-size: 19px;
	}
}

/* Quien prefiere sin movimiento: no avanza solo (lo controla carrusel.js), solo flechas y deslizar */
@media (prefers-reduced-motion: reduce) {
	.itp-viewport {
		scroll-snap-type: x mandatory;
	}

	.itp-card {
		scroll-snap-align: start;
	}
}
