/* CAES Testimonials - Estilos del frontend */

.caest-wrap {
	--caest-bg: #000000;
	--caest-primary: #29ABE2;
	--caest-text: #ffffff;
	--caest-card-bg: #111111;
	--caest-card-border: #262626;
	--caest-dot-1: #8E44AD;
	--caest-dot-2: #F2A900;
	--caest-dot-3: #E81C73;
	--caest-dot-4: #7AC943;
	--caest-dot-5: #8C5A2B;

	background-color: var(--caest-bg);
	color: var(--caest-text);
	padding: 0 0 60px;
	overflow: hidden;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	/* Full-bleed: rompe el contenedor del tema y ocupa todo el ancho de la pantalla. */
	width: 100vw;
	max-width: 100vw;
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
	box-sizing: border-box;
	margin-top: 0;
}

/* Algunos temas añaden padding/margin superior al contenedor de contenido.
   Si el contenedor envuelve directamente a .caest-wrap, lo eliminamos. */
body:has(.caest-wrap) .entry-content,
body:has(.caest-wrap) .site-content,
body:has(.caest-wrap) .content-area,
body:has(.caest-wrap) main {
	padding-top: 0 !important;
	margin-top: 0 !important;
}


/* ---------- IMAGEN DE FONDO Y PARTICULAS (TODA LA LANDING) ---------- */
.caest-bg-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	opacity: var(--caest-bg-opacity, 0.3);
	z-index: 0;
	pointer-events: none;
}

.caest-particles-canvas {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: block;
	pointer-events: none;
}

.caest-particles-fullpage {
	z-index: 1;
}

/* Todas las secciones de contenido van por encima del fondo y las partículas. */
.caest-logo-wrap,
.caest-hero,
.caest-marquees,
.caest-video-gallery,
.caest-cta,
.caest-footer {
	position: relative;
	z-index: 2;
}

/* ---------- LOGO ---------- */
.caest-logo-wrap {
	text-align: center;
	padding: 28px 20px 0;
}

.caest-logo {
	max-height: 64px;
	width: auto;
	display: inline-block;
}

/* ---------- HERO ---------- */
.caest-hero {
	text-align: center;
	padding: 40px 20px 80px;
	margin-top: 0;
	overflow: hidden;
}

.caest-hero-inner {
	position: relative;
	z-index: 2;
	max-width: 800px;
	margin: 0 auto;
}

.caest-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 1px solid var(--caest-primary);
	color: var(--caest-primary);
	border-radius: 999px;
	padding: 8px 20px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	margin-bottom: 24px;
	position: relative;
	animation: caest-badge-glow 2.4s ease-in-out infinite;
}

.caest-badge::before,
.caest-badge::after {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--caest-primary);
	display: inline-block;
	animation: caest-badge-dot 2.4s ease-in-out infinite;
}

.caest-badge::after {
	animation-delay: 0.4s;
}

@keyframes caest-badge-glow {
	0%, 100% {
		box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
		border-color: var(--caest-primary);
	}
	50% {
		box-shadow: 0 0 16px 2px var(--caest-primary);
		border-color: var(--caest-text);
	}
}

@keyframes caest-badge-dot {
	0%, 100% {
		opacity: 0.4;
		transform: scale(0.85);
	}
	50% {
		opacity: 1;
		transform: scale(1.15);
		box-shadow: 0 0 8px 1px var(--caest-primary);
	}
}

.caest-hero-title {
	font-size: clamp(28px, 5vw, 52px);
	font-weight: 800;
	margin: 0 0 18px;
	line-height: 1.15;
	background: linear-gradient(90deg, var(--caest-text) 0%, var(--caest-primary) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.caest-hero-subtitle {
	font-size: clamp(14px, 2vw, 18px);
	color: rgba(255, 255, 255, 0.7);
	margin: 0;
}

/* ---------- MARQUESINAS ---------- */
.caest-marquees {
	display: flex;
	flex-direction: column;
	gap: 24px;
	margin: 0 auto 60px;
	max-width: 100%;
}

.caest-marquee {
	overflow: hidden;
	position: relative;
	width: 100%;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.caest-marquee-track {
	display: flex;
	gap: 20px;
	width: max-content;
	will-change: transform;
}

.caest-marquee-left .caest-marquee-track {
	animation-name: caest-scroll-left;
	animation-timing-function: linear;
	animation-iteration-count: infinite;
}

.caest-marquee-right .caest-marquee-track {
	animation-name: caest-scroll-right;
	animation-timing-function: linear;
	animation-iteration-count: infinite;
}

.caest-marquee:hover .caest-marquee-track {
	animation-play-state: paused;
}

@keyframes caest-scroll-left {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}

@keyframes caest-scroll-right {
	from { transform: translateX(-50%); }
	to   { transform: translateX(0); }
}

/* ---------- TARJETAS ---------- */
.caest-card {
	background: var(--caest-card-bg);
	border: 1px solid var(--caest-card-border);
	border-radius: 14px;
	padding: 22px;
	width: 360px;
	max-width: 80vw;
	flex: 0 0 auto;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	position: relative;
}

.caest-card-header {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 14px;
}

.caest-avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	flex: 0 0 auto;
	border: 2px solid var(--caest-primary);
}

.caest-avatar-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--caest-primary);
	color: #000;
	font-weight: 700;
	font-size: 18px;
	text-transform: uppercase;
}

.caest-card-info {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
	min-width: 0;
}

.caest-card-name {
	font-size: 15px;
	color: var(--caest-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.caest-card-course {
	font-size: 12px;
	color: var(--caest-primary);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.caest-card-text {
	font-size: 14px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.85);
	margin: 0;
}

/* ---------- GALERIA DE VIDEOS ---------- */
.caest-video-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 24px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

.caest-video-item {
	cursor: pointer;
	border-radius: 12px;
	overflow: hidden;
	background: var(--caest-card-bg);
	border: 1px solid var(--caest-card-border);
	transition: transform 0.25s ease, border-color 0.25s ease;
}

.caest-video-item:hover {
	transform: translateY(-4px);
	border-color: var(--caest-primary);
}

.caest-video-thumb {
	position: relative;
	width: 100%;
	aspect-ratio: 9 / 16;
	background: #000;
	overflow: hidden;
}

.caest-video-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: opacity 0.2s ease;
}

.caest-video-preview-holder {
	position: absolute;
	inset: 0;
	display: none;
}

.caest-video-preview-holder iframe,
.caest-video-preview-holder video {
	width: 100%;
	height: 100%;
	border: 0;
	object-fit: cover;
	pointer-events: none;
}

.caest-video-item.is-previewing .caest-video-thumb img {
	opacity: 0;
}

.caest-video-item.is-previewing .caest-video-preview-holder {
	display: block;
}

.caest-play-button {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 60px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, opacity 0.2s ease;
	pointer-events: none;
	z-index: 2;
}

.caest-video-item:hover .caest-play-button {
	transform: translate(-50%, -50%) scale(1.1);
}

.caest-video-item.is-previewing .caest-play-button {
	opacity: 0;
}

.caest-video-info {
	padding: 14px 16px;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

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

.caest-video-title {
	font-size: 14px;
	line-height: 1.35;
	color: var(--caest-text);
}

.caest-video-course {
	font-size: 12px;
	line-height: 1.35;
	color: var(--caest-primary);
}

/* ---------- BANDERAS DE PAIS ---------- */
.caest-card-flag {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 26px;
	min-width: 26px;
	max-width: 26px;
	height: 18px;
	min-height: 18px;
	max-height: 18px;
	border-radius: 3px;
	overflow: hidden;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
	flex: 0 0 auto;
	line-height: 0;
}

.caest-video-flag {
	width: 24px;
	min-width: 24px;
	max-width: 24px;
	height: 16px;
	min-height: 16px;
	max-height: 16px;
	border-radius: 3px;
	overflow: hidden;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
	flex: 0 0 auto;
	line-height: 0;
}

.caest-flag {
	display: block;
	width: 100% !important;
	height: 100% !important;
	line-height: 0;
	overflow: hidden;
}

.caest-flag svg {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	min-width: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* ---------- MODAL ---------- */
.caest-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
}

.caest-modal.is-open {
	display: flex;
}

.caest-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
}

.caest-modal-content {
	position: relative;
	width: min(400px, 92vw);
	aspect-ratio: 9 / 16;
	max-height: 92vh;
	z-index: 1;
	background: #000;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 10px 60px rgba(0, 0, 0, 0.6);
}

.caest-modal-player,
.caest-modal-player iframe,
.caest-modal-player video {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.caest-modal-close {
	position: absolute;
	top: -40px;
	right: 0;
	background: transparent;
	border: 0;
	color: #fff;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
}

@media (max-width: 600px) {
	.caest-card {
		width: 280px;
	}

	.caest-modal-close {
		top: -36px;
		font-size: 28px;
	}
}

/* ---------- LLAMADO A LA ACCION (CTA) ---------- */
.caest-cta {
	text-align: center;
	max-width: 800px;
	margin: 0 auto;
	padding: 70px 20px 90px;
}

.caest-cta-title {
	font-size: clamp(22px, 4vw, 38px);
	font-weight: 800;
	line-height: 1.3;
	margin: 0 0 32px;
	color: var(--caest-text);
}

.caest-cta-button {
	position: relative;
	display: inline-block;
	padding: 18px 48px;
	border-radius: 999px;
	background: var(--caest-primary);
	color: #000;
	font-weight: 800;
	font-size: 15px;
	letter-spacing: 2px;
	text-transform: uppercase;
	text-decoration: none;
	overflow: hidden;
	isolation: isolate;
	animation: caest-cta-pulse 2.4s ease-in-out infinite;
	transition: transform 0.25s ease;
}

.caest-cta-button span {
	position: relative;
	z-index: 1;
}

.caest-cta-button::before {
	content: "";
	position: absolute;
	top: 0;
	left: -75%;
	width: 50%;
	height: 100%;
	background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.6), transparent);
	transform: skewX(-20deg);
	animation: caest-cta-shine 2.6s ease-in-out infinite;
}

.caest-cta-button:hover {
	transform: translateY(-3px) scale(1.05);
	animation-play-state: paused;
}

@keyframes caest-cta-pulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.045); }
}

@keyframes caest-cta-shine {
	0% { left: -75%; }
	55% { left: 130%; }
	100% { left: 130%; }
}

/* ---------- PLANTILLA DE LANDING DE PAGINA COMPLETA ---------- */
body.caest-landing-body {
	margin: 0;
	padding: 0;
	background: var(--caest-bg, #000000);
}

body.caest-landing-body .caest-wrap {
	/* En la plantilla de página completa no hay contenedor del tema que romper. */
	width: 100%;
	max-width: 100%;
	left: 0;
	right: 0;
	margin-left: 0;
	margin-right: 0;
}

/* ---------- PIE DE PAGINA ---------- */
.caest-footer {
	border-top: 1px solid var(--caest-card-border);
	padding: 28px 20px;
	text-align: center;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.6);
}

.caest-footer-copy {
	margin: 0 0 10px;
}

.caest-footer-contact {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 24px;
}

.caest-footer-contact li {
	margin: 0;
}

.caest-footer-contact a {
	color: var(--caest-primary);
	text-decoration: none;
}

.caest-footer-contact a:hover {
	text-decoration: underline;
}

@media (max-width: 600px) {
	.caest-footer-contact {
		flex-direction: column;
		gap: 6px;
	}
}
