/* ============================================================
   Card Slider — Frontend Styles
   ============================================================ */

/* Rompe overflow:hidden de contenedores Elementor para que cs-wrapper pueda ser 100vw */
.elementor-column-wrap:has(.cs-wrapper),
.elementor-widget-wrap:has(.cs-wrapper),
.e-container:has(.cs-wrapper),
.e-con:has(.cs-wrapper),
.elementor-column:has(.cs-wrapper) {
	overflow: visible !important;
}

/* Wrapper — siempre 100vw, centrado, rompe el contenedor de Elementor */
.cs-wrapper {
	width: 100vw;
	position: relative;
	left: 50%;
	transform: translateX(-50%);
	padding: 20px;
	box-sizing: border-box;
}

/* Swiper container */
.cs-wrapper .swiper {
	overflow: visible;
	padding-top: 40px;
	padding-bottom: 40px;
}

/* Slides ---------------------------------------------------- */
.cs-wrapper .swiper-slide {
	height: auto;
	display: flex;
	align-items: stretch;
	border-radius: 16px;
	overflow: hidden;
	transition: opacity 0.5s ease, box-shadow 0.5s ease;
}

/* ============================================================
   Card 3-D flip
   ============================================================ */

.cs-card {
	perspective: 1200px;
	cursor: pointer;
	width: 100%;
	-webkit-tap-highlight-color: transparent;
	outline: none;
	box-shadow: 0px 0px 15px 0px rgba(117, 117, 117, 0.11);
	border-radius: 16px;
}

.cs-card-inner {
	position: relative;
	width: 100%;
	aspect-ratio: 3 / 4;
	min-height: 0 !important;  /* cancela el min-height viejo guardado en Elementor */
	transform-style: preserve-3d;
	transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.cs-card.flipped .cs-card-inner {
	transform: rotateY(180deg);
}

.cs-card-front,
.cs-card-back {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	padding: 28px 24px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 12px;
	border-radius: 16px;
	overflow: hidden;
}

.cs-card-front {
	background-color: #ffffff;
}

.cs-card-back {
	background-color: #1a1a2e;
	color: #ffffff;
	transform: rotateY(180deg);
	justify-content: center;
	gap: 16px;
}

/* ============================================================
   Card content — front
   ============================================================ */

.cs-top-icon-wrapper {
	width: 44px;
	height: 44px;
	background-color: #f0f5ff;
	color: #2974FC;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5em;
	margin-bottom: 8px;
	flex-shrink: 0;
}

.cs-top-icon-wrapper svg {
	width: 24px;
	height: 24px;
	fill: currentColor;
}

.cs-category {
	display: inline-block;
	font-size: 0.7em;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	opacity: 0.6;
}

.cs-title {
	margin: 0;
	font-size: 1.3em;
	font-weight: 700;
	line-height: 1.3;
	color: #343F5A;
}

.cs-info {
	margin: 0;
	margin-top: auto;
	padding-top: 16px;
	font-size: 1.05em;
	font-weight: 600;
	border-top: 1px solid #eef1f6;
	color: #7A7A7A;
}

.cs-button {
	display: block;
	width: 100%;
	background-color: #2974FC;
	color: #ffffff;
	text-transform: uppercase;
	font-weight: 600;
	border-radius: 6px;
	padding: 16px;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.2s, transform 0.1s;
	margin-top: 16px;
	box-sizing: border-box;
}

.cs-button:hover, .cs-button:focus {
	background-color: #1e5bbd;
	color: #ffffff;
}

.cs-button:active {
	transform: scale(0.99);
}

/* List styles for characteristics */
.cs-card ul {
	list-style: none;
	padding: 0;
	margin: 0;
	color: #7A7A7A;
	text-align: left;
}

.cs-card ul li {
	position: relative;
	padding-left: 28px;
	margin-bottom: 8px;
	line-height: 1.5;
}

.cs-card ul li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 0;
	color: #2974FC;
	font-weight: bold;
	font-size: 1.1em;
}

.cs-card small {
	display: block;
	font-size: 12px;
	color: #b5b5b5;
	margin-top: 8px;
}

/* ============================================================
   Card content — back
   ============================================================ */

.cs-icon {
	display: block;
	text-align: center;
	font-size: 2em;
	color: inherit;
	opacity: 0.8;
}

.cs-description {
	margin: 0;
	font-size: 0.95em;
	line-height: 1.7;
	text-align: center;
}

.cs-description p {
	margin: 0 0 0.5em;
}

.cs-description p:last-child {
	margin-bottom: 0;
}

/* ============================================================
   Flip hint icon
   ============================================================ */

.cs-flip-hint {
	display: block;
	margin-top: 16px;
	text-align: center;
	font-size: 12px;
	color: #b5b5b5;
	transition: color 0.2s;
	line-height: 1.2;
	pointer-events: none;
}

.cs-card:hover .cs-flip-hint,
.cs-card:focus .cs-flip-hint {
	color: #7A7A7A;
}

/* ============================================================
   Flip — back face fade-in
   ============================================================ */

@keyframes cs-back-in {
	0%   { opacity: 0; }
	100% { opacity: 1; }
}

/* El reverso aparece suave a mitad del flip */
.cs-wrapper .cs-card.flipped .cs-card-back {
	animation: cs-back-in 0.3s 0.3s ease-out both;
}

/* ============================================================
   Non-active slide state
   ============================================================ */

/* Prevent non-active cards from being flipped */
.cs-wrapper .swiper-slide:not(.swiper-slide-active) .cs-card {
	cursor: default;
	pointer-events: none;
}

.cs-wrapper .swiper-slide:not(.swiper-slide-active) .cs-card-inner {
	transform: none !important;
}

.cs-wrapper .swiper-slide:not(.swiper-slide-active) .cs-flip-hint {
	display: none;
}

/* ============================================================
   Swiper nav/pagination
   ============================================================ */

.cs-wrapper .swiper-button-prev,
.cs-wrapper .swiper-button-next {
	color: currentColor;
}

.cs-wrapper .swiper-pagination-bullet-active {
	background: currentColor;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 767px) {
	.cs-wrapper .swiper {
		padding-top: 24px;
		padding-bottom: 24px;
	}
}
