/* ==========================================================
   Carousel Box para Elementor
   ========================================================== */

.cb-carousel {
	--cb-visible: 3;
	--cb-gap: 28px;
	--cb-shadow-space: 40px; /* espacio arriba/abajo para que la sombra no se corte */
	--cb-arrow: #9aa0a6;
	--cb-arrow-size: 26px;
	--cb-dot: #d5d9e0;
	--cb-dot-active: #0a3ea8;

	position: relative;
	width: 100%;
}

.cb-slider {
	display: flex;
	align-items: center;
	gap: 12px;
}

/* ---------- Pista con scroll ---------- */
.cb-track {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: stretch;
	gap: var(--cb-gap);
	/*
	 * Relleno para que la sombra no se corte. A los lados se usa el mismo
	 * espacio que hay entre tarjetas: así la tarjeta anterior queda justo
	 * fuera de la vista y solo se ve la sombra.
	 */
	padding: var(--cb-shadow-space) var(--cb-gap);
	margin: calc(var(--cb-shadow-space) * -1) calc(var(--cb-gap) * -1);
	scroll-padding-inline: var(--cb-gap);
	/* La sombra se desvanece en la franja lateral en vez de cortarse en seco */
	-webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--cb-gap), #000 calc(100% - var(--cb-gap)), transparent 100%);
	mask-image: linear-gradient(to right, transparent 0, #000 var(--cb-gap), #000 calc(100% - var(--cb-gap)), transparent 100%);
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.cb-track::-webkit-scrollbar {
	display: none;
}

.cb-has-overflow .cb-track {
	cursor: grab;
}

.cb-dragging .cb-track {
	cursor: grabbing;
	scroll-snap-type: none;
	user-select: none;
}

/* ---------- Tarjeta ---------- */
.cb-card {
	flex: 0 0 calc((100% - var(--cb-gap) * (var(--cb-visible) - 1)) / var(--cb-visible));
	box-sizing: border-box;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-height: 370px;
	padding: 28px 28px 36px;
	border: 0 solid transparent;
	border-radius: 30px;
	background: #ffffff;
	box-shadow: 0 8px 28px rgba(20, 40, 80, .08);
	color: inherit;
	text-decoration: none;
}

a.cb-card:hover,
a.cb-card:focus {
	color: inherit;
	text-decoration: none;
}

.cb-image {
	width: 100%;
	height: 100px;
	margin-bottom: 28px;
	border-radius: 14px;
	overflow: hidden;
	flex: 0 0 auto;
}

.cb-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
}

.cb-card .cb-title {
	margin: 0;
	color: #0a3ea8;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
}

.cb-divider {
	display: block;
	width: 18px;
	height: 3px;
	margin: 12px 0 22px;
	border-radius: 2px;
	background: #f4b400;
}

.cb-text {
	color: #6b6f76;
	font-size: 12px;
	line-height: 1.45;
}

.cb-text > *:last-child {
	margin-bottom: 0;
}

/* ---------- Flechas ---------- */
.cb-arrow {
	position: relative;
	z-index: 1;
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px;
	border: 0;
	background: transparent;
	color: var(--cb-arrow);
	cursor: pointer;
	visibility: hidden;
	transition: opacity .2s;
}

.cb-has-overflow .cb-arrow {
	visibility: visible;
}

.cb-arrow:hover,
.cb-arrow:focus {
	background: transparent;
	color: var(--cb-arrow);
	opacity: .65;
}

.cb-arrow:disabled {
	opacity: .3;
	cursor: default;
}

.cb-arrow svg {
	width: var(--cb-arrow-size);
	height: var(--cb-arrow-size);
	fill: none;
	stroke: currentColor;
	stroke-width: 2.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ---------- Puntos ---------- */
.cb-dots {
	display: none;
	justify-content: center;
	gap: 8px;
	margin-top: 24px;
}

.cb-has-overflow .cb-dots {
	display: flex;
}

.cb-dot {
	width: 9px;
	height: 9px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--cb-dot);
	cursor: pointer;
	min-height: 0;
	transition: background-color .2s, width .2s;
}

.cb-dot:hover,
.cb-dot:focus {
	background: var(--cb-dot);
}

.cb-dot.is-active {
	width: 22px;
	border-radius: 5px;
	background: var(--cb-dot-active);
}

@media (max-width: 767px) {
	.cb-slider {
		gap: 4px;
	}

	.cb-arrow {
		padding: 4px;
	}

	.cb-card {
		min-height: 0;
	}
}

/* ==========================================================
   Plantilla: Grilla con "Ver más"
   ========================================================== */

.cb-template-grid {
	--cb-collapsed: 600px;
	--cb-fade: 160px;
}

.cb-grid {
	--cb-columns: 3;

	display: grid;
	grid-template-columns: repeat(var(--cb-columns), minmax(0, 1fr));
	column-gap: 46px;
	row-gap: 46px;
}

.cb-template-grid .cb-card {
	min-height: 0;
	padding: 0;
	align-items: stretch;
	overflow: hidden;
	border: 2px solid #ffffff;
	border-radius: 22px;
	background: transparent;
	box-shadow: none;
}

.cb-template-grid .cb-image {
	height: 130px;
	margin-bottom: 0;
	border-radius: 0;
}

.cb-body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex: 1 1 auto;
	padding: 34px 28px 40px;
}

.cb-template-grid .cb-title {
	color: #ffffff;
	font-size: 17px;
}

.cb-template-grid .cb-divider {
	width: 20px;
	margin: 10px 0 18px;
}

.cb-template-grid .cb-text {
	color: #ffffff;
	font-size: 13px;
	line-height: 1.35;
}

/* Contraído: se corta a la altura indicada y se desvanece hacia abajo */
.cb-grid-wrap {
	transition: max-height .6s ease;
}

.cb-grid-wrap.is-collapsed {
	max-height: var(--cb-collapsed);
	overflow: hidden;
	-webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--cb-fade)), transparent 100%);
	mask-image: linear-gradient(to bottom, #000 calc(100% - var(--cb-fade)), transparent 100%);
}

.cb-expanded .cb-grid-wrap {
	overflow: hidden;
}

/* Todo cabe: sin corte ni botón */
.cb-no-more .cb-grid-wrap.is-collapsed {
	max-height: none;
	-webkit-mask-image: none;
	mask-image: none;
}

.cb-no-more .cb-more-wrap,
.cb-hide-more .cb-more-wrap {
	display: none;
}

/* Botón */
.cb-more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 40px;
}

.cb-more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 20px;
	border: 0;
	border-radius: 30px;
	background: #f7c20f;
	color: #0a3ea8;
	font-size: 18px;
	font-weight: 500;
	line-height: 1.4;
	cursor: pointer;
	transition: background-color .2s, color .2s, filter .2s;
}

.cb-more:hover,
.cb-more:focus {
	background: #f7c20f;
	color: #0a3ea8;
	filter: brightness(1.05);
}

.cb-more-icon {
	width: 1em;
	height: 1em;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.5;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform .3s;
}

.cb-expanded .cb-more-icon {
	transform: rotate(180deg);
}

@media (max-width: 1024px) {
	.cb-grid {
		--cb-columns: 2;
		column-gap: 28px;
		row-gap: 28px;
	}
}

@media (max-width: 767px) {
	.cb-grid {
		--cb-columns: 1;
	}
}
