/* TCH Carousel — estilos minimos. Todo lo configurable vive en variables CSS. */

.tch-carousel {
	--tch-primary: #0A4B8C;
	--tch-primary-dark: #07376B;
	--tch-on-primary: #FFFFFF;
	--tch-arrow-size: 44px;
	--tch-arrow-offset: 0px;
	--tch-dot-size: 9px;
	--tch-dot-gap: 8px;
	--tch-dot-color: #D5DBE3;
	--tch-dot-active: var(--tch-primary);
	--tch-litem-gap: 8px;
	--tch-litem-icon: 12px;

	position: relative;
	width: 100%;
}

.tch-carousel__viewport {
	overflow: hidden;
	width: 100%;
}

/* Alturas iguales aunque los titulos ocupen distintas lineas. */
.tch-carousel .swiper-wrapper {
	display: flex;
	align-items: stretch;
}

.tch-carousel .swiper-slide {
	height: auto;
	flex-shrink: 0;
	box-sizing: border-box;
}

.tch-slide {
	display: flex;
	flex-direction: column;
	height: 100%;
	box-sizing: border-box;
}

/* ---------------------------- Imagen ---------------------------------- */

.tch-slide__media {
	position: relative;
	width: 100%;
	overflow: hidden;
	line-height: 0;
}

.tch-slide__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.45s ease;
}

.tch-slide__media::after {
	position: absolute;
	inset: 0;
	pointer-events: none;
	transition: background-color 0.3s ease;
}

.tch-ratio-1-1 .tch-slide__media {
	aspect-ratio: 1 / 1;
}

.tch-ratio-4-3 .tch-slide__media {
	aspect-ratio: 4 / 3;
}

.tch-ratio-3-2 .tch-slide__media {
	aspect-ratio: 3 / 2;
}

.tch-ratio-16-9 .tch-slide__media {
	aspect-ratio: 16 / 9;
}

.tch-ratio-21-9 .tch-slide__media {
	aspect-ratio: 21 / 9;
}

.tch-ratio-original .tch-slide__media img {
	height: auto;
	object-fit: initial;
}

.tch-zoom-yes .tch-slide:hover .tch-slide__media img {
	transform: scale(1.06);
}

/* ---------------------------- Titulo ---------------------------------- */

.tch-slide__title {
	margin: 0;
	transition: color 0.25s ease, background-color 0.25s ease;
	overflow-wrap: break-word;
}

/* ------------------- Lista de items bajo el titulo -------------------- */

.tch-slide__items {
	list-style: none;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--tch-litem-gap);
	margin: 14px 0 0;
	padding: 0;
	width: 100%;
}

.tch-list-divider-yes .tch-slide__items {
	padding-top: 14px;
	border-top: 1px solid rgba(15, 23, 42, 0.1);
}

.tch-slide__item {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin: 0;
	min-width: 0;
	max-width: 100%;
	color: #475569;
	font-size: 15px;
	line-height: 1.5;
	text-align: left;
}

.tch-slide__item-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	margin-top: 0.25em;
	color: var(--tch-primary);
	font-size: var(--tch-litem-icon);
	line-height: 1;
}

.tch-slide__item-icon svg {
	width: var(--tch-litem-icon);
	height: var(--tch-litem-icon);
	fill: currentColor;
}

.tch-slide__item-text {
	min-width: 0;
	overflow-wrap: break-word;
}

/* ---------------------------- Flechas --------------------------------- */

.tch-arrow {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--tch-arrow-size);
	height: var(--tch-arrow-size);
	margin: 0;
	padding: 0;
	transform: translateY(-50%);
	border: 0;
	background-color: var(--tch-primary);
	color: var(--tch-on-primary);
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}

.tch-arrow--prev {
	left: var(--tch-arrow-offset);
}

.tch-arrow--next {
	right: var(--tch-arrow-offset);
}

.tch-arrow:hover,
.tch-arrow:focus-visible {
	background-color: var(--tch-primary-dark);
}

.tch-arrow:focus-visible {
	outline: 2px solid var(--tch-primary);
	outline-offset: 2px;
}

.tch-arrow svg {
	width: 16px;
	height: 16px;
	display: block;
}

.tch-arrow.swiper-button-disabled {
	opacity: 0.35;
	cursor: default;
}

/* ---------------------------- Puntos ---------------------------------- */

.tch-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--tch-dot-gap);
	margin-top: 24px;
}

.tch-pagination:empty {
	display: none;
}

.tch-bullet {
	width: var(--tch-dot-size);
	height: var(--tch-dot-size);
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: var(--tch-dot-color);
	opacity: 1;
	cursor: pointer;
	transition: background-color 0.25s ease, transform 0.25s ease;
}

.tch-bullet--active {
	background-color: var(--tch-dot-active);
	transform: scale(1.25);
}

/* -------------------- Sin JS / Swiper no disponible -------------------- */

.tch-no-swiper .swiper-wrapper {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	gap: 16px;
	-webkit-overflow-scrolling: touch;
}

.tch-no-swiper .swiper-slide {
	scroll-snap-align: start;
	width: 80%;
}

.tch-no-swiper .tch-arrow,
.tch-no-swiper .tch-pagination {
	display: none;
}

/* ---------------------------- Responsive ------------------------------ */

@media (max-width: 767px) {
	.tch-hide-arrows-mobile-yes .tch-arrow {
		display: none;
	}
}
