/* Vidas – Tabs con tarjetas
 * Escritorio (captura, frame 1512 / contenido 1392; las medidas de tarjeta escalan con --vtb-u = 1px de diseño):
 *   pestañas 19.5px, alto 52, relleno 27 lateral, 17px entre ellas; 40px hasta las tarjetas;
 *   tarjetas 608×316 (mín.), 36px de separación, borde 1px, radio 22, relleno 36/38/45;
 *   texto SemiBold 38/44.2; botón de flecha 39px. El carrusel llega hasta el borde derecho de la pantalla.
 * Móvil (captura, contenido 353): etiqueta; pestañas 15px, alto 40, 15px entre filas y 8px entre pestañas;
 *   69px hasta las tarjetas; tarjeta 333×252 (la siguiente asoma 20px), texto 29/32, botón 31px.
 * Sin fondo ni espacio vertical: los pone el contenedor y los espaciadores de Elementor.
 */

.vtb {
	--vtb-label: #000;
	--vtb-tab-text: #000;
	--vtb-tab-bg: transparent;
	--vtb-tab-border: #000;
	--vtb-tab-text-on: #fff;
	--vtb-tab-bg-on: #4e20e4;
	--vtb-tab-border-on: #4e20e4;
	--vtb-tab-bw: 1px;
	--vtb-tab-radius: 100px;
	--vtb-card-bg: #fff;
	--vtb-card-border: #000;
	--vtb-card-bw: 1px;
	--vtb-card-text: #000;
	--vtb-btn-bg: #000;
	--vtb-btn-icon: #fff;
	--vtb-btn-bg-h: #4e20e4;
	--vtb-btn-icon-h: #fff;
	--vtb-max: 1392px;
	--vtb-pad: 60px;
	--vtb-tabs-cards: 40px;

	position: relative;
	width: 100%;
	container-type: inline-size;
	font-family: "Soleil", sans-serif;
}

/* Medidas comunes: ancho de la columna, margen hasta ella y 1px de diseño */
.vtb > * {
	--vtb-cw: min(var(--vtb-max), 100cqw - 2 * var(--vtb-pad));
	--vtb-left: calc((100cqw - var(--vtb-cw)) / 2);
	--vtb-u: calc(var(--vtb-cw) / 1392);
}

/* ---------- Cabecera: etiqueta + pestañas (en la columna de contenido) ---------- */
.vtb__head {
	width: var(--vtb-cw);
	margin: 0 auto;
}

.vtb__label {
	display: none;                      /* el control "Mostrar etiqueta" decide (en el diseño, solo móvil) */
	align-items: center;
	gap: 10px;
	margin: 0 0 20px;
	padding: 0;
	font-family: inherit;
	font-weight: 400;
	font-size: 16px;
	line-height: 26px;
	letter-spacing: 0;
	text-transform: uppercase;
	color: var(--vtb-label);
}

.vtb__asterisk {
	display: block;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
}

.vtb__tabs {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	gap: var(--vtb-tab-gap, 17px);
}

/* Botones: se anulan los estilos de <button> del tema (Hello pinta hover/foco en rosa) */
.vtb .vtb__tab,
.vtb .vtb__tab:hover,
.vtb .vtb__tab:focus,
.vtb .vtb__tab:active {
	background-color: var(--vtb-tab-bg);
	color: var(--vtb-tab-text);
	border-color: var(--vtb-tab-border);
	text-decoration: none;
	outline: none;
	box-shadow: none;
}

.vtb .vtb__tab {
	position: relative;
	z-index: 1;
	margin: 0;
	padding: 13px 27px;
	border-style: solid;
	border-width: var(--vtb-tab-bw);
	border-radius: var(--vtb-tab-radius);
	font-family: inherit;
	font-weight: 400;
	font-size: 19.5px;
	line-height: 1.2;
	letter-spacing: -0.01em;
	text-transform: none;
	white-space: nowrap;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
	transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

@media (hover: hover) {
	.vtb .vtb__tab:not(.is-active):hover {
		background-color: var(--vtb-tab-bg-h, var(--vtb-tab-bg));
		color: var(--vtb-tab-text-h, var(--vtb-tab-text));
		border-color: var(--vtb-tab-border-h, var(--vtb-tab-border));
	}
}

/* Activa: el fondo lo pinta el indicador que se desliza */
.vtb .vtb__tab.is-active,
.vtb .vtb__tab.is-active:hover,
.vtb .vtb__tab.is-active:focus,
.vtb .vtb__tab.is-active:active {
	background-color: transparent;
	color: var(--vtb-tab-text-on);
	border-color: var(--vtb-tab-border-on);
}

.vtb:not(.is-ready) .vtb__tab.is-active {
	background-color: var(--vtb-tab-bg-on);
}

.vtb .vtb__tab:focus-visible {
	outline: 2px solid var(--vtb-tab-bg-on);
	outline-offset: 3px;
}

.vtb__indicator {
	position: absolute;
	left: 0;
	top: 0;
	z-index: 0;
	width: 0;
	height: 0;
	border-radius: var(--vtb-tab-radius);
	background: var(--vtb-tab-bg-on);
	pointer-events: none;
	will-change: transform, width;
}

.vtb:not(.is-ready) .vtb__indicator {
	display: none;
}

/* ---------- Carrusel de tarjetas ---------- */
.vtb__panels {
	margin-top: var(--vtb-tabs-cards);
}

.vtb__panel[hidden] {
	display: none;
}

.vtb__track {
	--vtb-gap: calc(36 * var(--vtb-u));

	position: relative;
	display: flex;
	gap: var(--vtb-gap);
	padding: 2px 0 2px var(--vtb-left);       /* la primera tarjeta arranca en la columna */
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding-left: var(--vtb-left);
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	cursor: grab;
}

/* espacio final para que la última tarjeta pueda llegar a la columna */
.vtb__track::after {
	content: "";
	flex: 0 0 max(1px, calc(var(--vtb-left) - var(--vtb-gap)));
}

.vtb__track::-webkit-scrollbar {
	display: none;
}

.vtb__track.is-dragging {
	scroll-snap-type: none;
	cursor: grabbing;
	user-select: none;
}

.vtb__track.is-dragging * {
	pointer-events: none;
}

.vtb__card {
	display: flex;
	flex: 0 0 calc(608 * var(--vtb-u));
	scroll-snap-align: start;
}

.vtb__card-in {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	justify-content: space-between;
	min-height: calc(316 * var(--vtb-u));
	padding: calc(36 * var(--vtb-u)) calc(38 * var(--vtb-u)) calc(45 * var(--vtb-u));
	border: var(--vtb-card-bw) solid var(--vtb-card-border);
	border-radius: var(--vtb-card-radius, calc(22 * var(--vtb-u)));
	background: var(--vtb-card-bg);
	box-sizing: border-box;
	will-change: transform;
}

.vtb__card-title {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-weight: 600;
	font-size: calc(38 * var(--vtb-u));
	line-height: 1.163;
	letter-spacing: -0.02em;
	color: var(--vtb-card-text);
}

/* Botón de flecha (igual que en Blog y Qué hacemos) */
.vtb .vtb__btn,
.vtb .vtb__btn:hover,
.vtb .vtb__btn:focus {
	color: var(--vtb-btn-icon);
	text-decoration: none;
}

.vtb .vtb__btn {
	display: inline-flex;
	align-self: flex-start;
	margin-top: calc(30 * var(--vtb-u));
	-webkit-user-drag: none;
}

/* toda la tarjeta enlaza: el enlace del botón se estira sobre la tarjeta */
.vtb--card-link .vtb__btn::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
}

.vtb--card-link .vtb__card-in {
	cursor: pointer;
}

.vtb__btn-in {
	position: relative;
	display: block;
	width: calc(39 * var(--vtb-u));
	height: calc(39 * var(--vtb-u));
	border-radius: calc(4 * var(--vtb-u));
	background: var(--vtb-btn-bg);
	overflow: hidden;
	transition: background-color 0.35s ease, color 0.35s ease;
	will-change: transform;
}

.vtb .vtb__btn:hover .vtb__btn-in,
.vtb .vtb__btn:focus-visible .vtb__btn-in,
.vtb--card-link .vtb__card-in:hover .vtb__btn-in {
	background: var(--vtb-btn-bg-h);
	color: var(--vtb-btn-icon-h);
}

.vtb--card-link .vtb__card-in:hover .vtb__btn {
	color: var(--vtb-btn-icon-h);
}

.vtb__btn-arrow {
	position: absolute;
	left: 17%;
	top: 17%;
	width: 66%;
	height: 66%;
}

.vtb__btn-arrow--b {
	visibility: hidden;                 /* sin JS solo se ve la flecha A */
}

.vtb__card-in:focus-within {
	outline: 2px solid var(--vtb-btn-bg-h);
	outline-offset: 3px;
}

/* ---------- Móvil ---------- */
@media (max-width: 767px) {
	.vtb {
		--vtb-pad: 20px;
		--vtb-tabs-cards: 69px;
	}

	.vtb__label {
		gap: 8px;
		margin-bottom: 8px;
		font-size: 11px;
		line-height: 18px;
	}

	.vtb__asterisk {
		width: 14px;
		height: 14px;
	}

	.vtb__tabs {
		gap: var(--vtb-tab-gap, 15px 8px);
	}

	.vtb .vtb__tab {
		padding: 10px 22px;
		font-size: 15px;
	}

	.vtb__track {
		--vtb-gap: 20px;
	}

	.vtb__card {
		flex-basis: calc(var(--vtb-cw) - 20px);   /* 333 a 393: la siguiente asoma 20px */
	}

	.vtb__card-in {
		min-height: 252px;
		padding: 31px 27px 26px;
		border-radius: var(--vtb-card-radius, 12px);
	}

	.vtb__card-title {
		font-size: 29px;
		line-height: 32px;
	}

	.vtb .vtb__btn {
		margin-top: 24px;
	}

	.vtb__btn-in {
		width: 31px;
		height: 31px;
		border-radius: 4px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vtb .vtb__tab,
	.vtb__btn-in {
		transition: none;
	}
}