/* =========================================================
   COSTA RICA XPLORES — TIKTOK COMPACT SECTION
========================================================= */

.crx-tiktok-section {
	--crx-tt-green: #064326;
	--crx-tt-green-dark: #031d11;
	--crx-tt-orange: #f45117;
	--crx-tt-white: #ffffff;
	--crx-tt-light: #f4f8f5;
	--crx-tt-text: #111c16;
	--crx-tt-muted: #667169;
	--crx-tt-border: rgba(6, 67, 38, 0.12);

	position: relative;
	padding: 58px 0 64px;
	overflow: hidden;
	background:
		radial-gradient(
			circle at 8% 10%,
			rgba(244, 81, 23, 0.07),
			transparent 25%
		),
		linear-gradient(180deg, #ffffff 0%, #f3f8f4 100%);
}

.crx-tiktok-section::before {
	content: "";
	position: absolute;
	top: -190px;
	right: -170px;
	width: 430px;
	height: 430px;
	border-radius: 50%;
	background: rgba(6, 67, 38, 0.045);
	pointer-events: none;
}

.crx-tiktok-section .container {
	position: relative;
	z-index: 2;
}

/* =========================================================
   CABECERA COMPACTA
========================================================= */

.crx-tiktok-section .crx-tiktok-header {
	position: relative;
	inset: auto;
	z-index: auto;

	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(330px, 420px);
	align-items: center;
	gap: 32px;

	width: auto;
	height: auto;
	min-height: 0;
	margin: 0 0 34px;
	padding: 0;

	background: transparent;
	transform: none;
}

.crx-tiktok-heading {
	max-width: 680px;
}

.crx-tiktok-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
	color: var(--crx-tt-orange);
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 1.2px;
	text-transform: uppercase;
}

.crx-tiktok-eyebrow-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--crx-tt-green-dark);
	color: var(--crx-tt-white);
	font-size: 15px;
	box-shadow: 0 7px 16px rgba(3, 29, 17, 0.18);
}

.crx-tiktok-heading h2 {
	margin: 0 0 12px;
	color: var(--crx-tt-text);
	font-size: clamp(34px, 4vw, 50px);
	font-weight: 900;
	line-height: 1.04;
	letter-spacing: -1.5px;
}

.crx-tiktok-heading h2 span {
	display: block;
	color: var(--crx-tt-green);
}

.crx-tiktok-heading p {
	max-width: 620px;
	margin: 0;
	color: var(--crx-tt-muted);
	font-size: 16px;
	line-height: 1.62;
}

/* =========================================================
   PERFIL COMPACTO
========================================================= */

.crx-tiktok-profile {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: 13px;
	padding: 17px;
	border: 1px solid var(--crx-tt-border);
	border-radius: 19px;
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 15px 35px rgba(6, 67, 38, 0.1);
	backdrop-filter: blur(9px);
}

.crx-tiktok-profile-logo {
	position: relative;
	grid-row: span 2;
	width: 67px;
	height: 67px;
}

.crx-tiktok-profile-logo img {
	display: block;
	width: 100%;
	height: 100%;
	border: 3px solid var(--crx-tt-white);
	border-radius: 50%;
	object-fit: cover;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

.crx-tiktok-status {
	position: absolute;
	right: 2px;
	bottom: 2px;
	width: 15px;
	height: 15px;
	border: 3px solid var(--crx-tt-white);
	border-radius: 50%;
	background: #25d366;
}

.crx-tiktok-profile-info {
	min-width: 0;
}

.crx-tiktok-profile-label {
	display: block;
	margin-bottom: 2px;
	color: var(--crx-tt-orange);
	font-size: 10px;
	font-weight: 900;
	letter-spacing: 0.8px;
	text-transform: uppercase;
}

.crx-tiktok-profile-info strong {
	display: block;
	margin-bottom: 2px;
	color: var(--crx-tt-text);
	font-size: 16px;
	font-weight: 900;
	overflow-wrap: anywhere;
}

.crx-tiktok-profile-info small {
	display: block;
	color: var(--crx-tt-muted);
	font-size: 11px;
	font-weight: 600;
	line-height: 1.4;
}

.crx-tiktok-profile-button {
	grid-column: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	width: max-content;
	min-width: 122px;
	padding: 9px 15px;
	border-radius: 9px;
	background: var(--crx-tt-green-dark);
	color: var(--crx-tt-white);
	font-size: 12px;
	font-weight: 900;
	text-decoration: none;
	box-shadow: 0 8px 17px rgba(3, 29, 17, 0.18);
	transition:
		transform 0.22s ease,
		background-color 0.22s ease;
}

.crx-tiktok-profile-button:hover {
	background: var(--crx-tt-orange);
	color: var(--crx-tt-white);
	transform: translateY(-2px);
}

/* =========================================================
   GRID DE TARJETAS
========================================================= */

.crx-tiktok-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-items: stretch;
	gap: 22px;
}

.crx-tiktok-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	border: 1px solid var(--crx-tt-border);
	border-radius: 20px;
	background: var(--crx-tt-white);
	box-shadow: 0 15px 34px rgba(6, 67, 38, 0.1);
	transition:
		transform 0.28s ease,
		box-shadow 0.28s ease;
}

.crx-tiktok-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 22px 44px rgba(6, 67, 38, 0.15);
}

.crx-tiktok-card-featured {
	border-color: rgba(244, 81, 23, 0.25);
}

/* =========================================================
   VIDEO COMPACTO
========================================================= */

.crx-tiktok-player {
	position: relative;
	width: 100%;
	height: clamp(285px, 31vw, 390px);
	overflow: hidden;
	background: var(--crx-tt-green-dark);
}

.crx-tiktok-media {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	overflow: hidden;
	border: 0;
	background: var(--crx-tt-green-dark);
	cursor: pointer;
	text-align: left;
}

.crx-tiktok-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition:
		transform 0.55s ease,
		filter 0.35s ease;
}

.crx-tiktok-media:hover img {
	transform: scale(1.04);
	filter: brightness(0.9);
}

.crx-tiktok-overlay {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(
			to bottom,
			rgba(0, 0, 0, 0.04) 20%,
			rgba(0, 0, 0, 0.08) 52%,
			rgba(0, 0, 0, 0.56) 100%
		);
	pointer-events: none;
}

.crx-tiktok-category {
	position: absolute;
	top: 13px;
	left: 13px;
	padding: 7px 10px;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 999px;
	background: rgba(4, 66, 37, 0.86);
	color: var(--crx-tt-white);
	font-size: 10px;
	font-weight: 900;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	backdrop-filter: blur(7px);
}

.crx-tiktok-play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	border: 2px solid rgba(255, 255, 255, 0.88);
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.53);
	color: var(--crx-tt-white);
	box-shadow:
		0 11px 26px rgba(0, 0, 0, 0.3),
		inset 0 0 0 5px rgba(255, 255, 255, 0.07);
	transform: translate(-50%, -50%);
	transition:
		transform 0.22s ease,
		background-color 0.22s ease;
}

.crx-tiktok-play span {
	margin-left: 3px;
	font-size: 20px;
}

.crx-tiktok-media:hover .crx-tiktok-play {
	background: var(--crx-tt-orange);
	transform: translate(-50%, -50%) scale(1.07);
}

.crx-tiktok-watch {
	position: absolute;
	right: 13px;
	bottom: 13px;
	left: 13px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	border: 1px solid rgba(255, 255, 255, 0.32);
	border-radius: 9px;
	background: rgba(0, 0, 0, 0.53);
	color: var(--crx-tt-white);
	font-size: 11px;
	font-weight: 900;
	backdrop-filter: blur(7px);
}

/* =========================================================
   CUERPO COMPACTO
========================================================= */

.crx-tiktok-card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 17px 18px 18px;
}

.crx-tiktok-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 10px;
}

.crx-tiktok-meta span {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 5px 8px;
	border-radius: 999px;
	background: #eff6f1;
	color: var(--crx-tt-green);
	font-size: 10px;
	font-weight: 800;
}

.crx-tiktok-card-body h3 {
	margin: 0 0 8px;
	color: var(--crx-tt-text);
	font-size: 18px;
	font-weight: 900;
	line-height: 1.3;
}

.crx-tiktok-card-body p {
	margin: 0;
	color: var(--crx-tt-muted);
	font-size: 13px;
	line-height: 1.55;
}

.crx-tiktok-external-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	padding-top: 14px;
	color: var(--crx-tt-green);
	font-size: 12px;
	font-weight: 900;
	text-decoration: none;
}

.crx-tiktok-external-link span {
	transition: transform 0.2s ease;
}

.crx-tiktok-external-link:hover {
	color: var(--crx-tt-orange);
}

.crx-tiktok-external-link:hover span {
	transform: translate(3px, -3px);
}

/* =========================================================
   IFRAME Y CARGA
========================================================= */

.crx-tiktok-iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	background: #000000;
}

.crx-tiktok-player.is-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 5;
	width: 38px;
	height: 38px;
	margin: -19px 0 0 -19px;
	border: 4px solid rgba(255, 255, 255, 0.25);
	border-top-color: var(--crx-tt-white);
	border-radius: 50%;
	animation: crxTikTokLoading 0.8s linear infinite;
}

@keyframes crxTikTokLoading {
	to {
		transform: rotate(360deg);
	}
}

/* =========================================================
   BARRA FINAL COMPACTA
========================================================= */

.crx-tiktok-section .crx-tiktok-footer {
	position: relative;
	inset: auto;

	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;

	width: auto;
	height: auto;
	margin-top: 32px;
	padding: 18px 21px;

	border-radius: 17px;
	background:
		linear-gradient(
			135deg,
			var(--crx-tt-green-dark),
			var(--crx-tt-green)
		);
	box-shadow: 0 15px 32px rgba(6, 67, 38, 0.2);
}

.crx-tiktok-footer-text {
	display: flex;
	align-items: center;
	gap: 13px;
	max-width: 720px;
}

.crx-tiktok-footer-text > span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 43px;
	height: 43px;
	border-radius: 50%;
	background: var(--crx-tt-orange);
	color: var(--crx-tt-white);
	font-size: 21px;
	box-shadow: 0 8px 18px rgba(244, 81, 23, 0.26);
}

.crx-tiktok-footer-text p {
	margin: 0;
	color: rgba(255, 255, 255, 0.81);
	font-size: 13px;
	line-height: 1.5;
}

.crx-tiktok-footer-text strong {
	display: block;
	margin-bottom: 2px;
	color: var(--crx-tt-white);
	font-size: 16px;
}

.crx-tiktok-main-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	flex-shrink: 0;
	min-width: 156px;
	padding: 12px 18px;
	border-radius: 10px;
	background: var(--crx-tt-orange);
	color: var(--crx-tt-white);
	font-size: 13px;
	font-weight: 900;
	text-decoration: none;
	box-shadow: 0 8px 19px rgba(244, 81, 23, 0.26);
	transition:
		transform 0.22s ease,
		background-color 0.22s ease;
}

.crx-tiktok-main-button:hover {
	background: #d9430f;
	color: var(--crx-tt-white);
	transform: translateY(-2px);
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 991.98px) {

	.crx-tiktok-section {
		padding: 50px 0 56px;
	}

	.crx-tiktok-section .crx-tiktok-header {
		grid-template-columns: 1fr;
		gap: 22px;
		margin-bottom: 28px;
	}

	.crx-tiktok-profile {
		max-width: 520px;
	}

	.crx-tiktok-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px;
	}

	.crx-tiktok-player {
		height: 350px;
	}

	.crx-tiktok-card:last-child {
		grid-column: 1 / -1;
		width: 100%;
		max-width: 440px;
		margin: 0 auto;
	}

}

/* =========================================================
   MÓVIL
========================================================= */

@media (max-width: 767.98px) {

	.crx-tiktok-section {
		padding: 44px 0 48px;
	}

	.crx-tiktok-heading {
		text-align: center;
	}

	.crx-tiktok-eyebrow {
		justify-content: center;
	}

	.crx-tiktok-heading h2 {
		font-size: clamp(32px, 10vw, 43px);
		letter-spacing: -1px;
	}

	.crx-tiktok-heading p {
		font-size: 14px;
		line-height: 1.55;
	}

	.crx-tiktok-profile {
		grid-template-columns: auto minmax(0, 1fr);
		padding: 15px;
	}

	.crx-tiktok-profile-logo {
		width: 61px;
		height: 61px;
	}

	.crx-tiktok-profile-info strong {
		font-size: 14px;
	}

	.crx-tiktok-profile-button {
		grid-column: 1 / -1;
		width: 100%;
	}

	.crx-tiktok-grid {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.crx-tiktok-card,
	.crx-tiktok-card:last-child {
		width: 100%;
		max-width: 420px;
		margin: 0 auto;
	}

	.crx-tiktok-player {
		height: 305px;
	}

	.crx-tiktok-card-body {
		padding: 15px 16px 16px;
	}

	.crx-tiktok-section .crx-tiktok-footer {
		align-items: stretch;
		flex-direction: column;
		gap: 15px;
		margin-top: 25px;
		padding: 17px;
	}

	.crx-tiktok-main-button {
		width: 100%;
	}

}

/* =========================================================
   MÓVIL PEQUEÑO
========================================================= */

@media (max-width: 480px) {

	.crx-tiktok-section {
		padding: 38px 0 42px;
	}

	.crx-tiktok-profile {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.crx-tiktok-profile-logo {
		grid-row: auto;
		margin: 0 auto;
	}

	.crx-tiktok-profile-button {
		grid-column: auto;
	}

	.crx-tiktok-player {
		height: 270px;
	}

	.crx-tiktok-category {
		top: 10px;
		left: 10px;
		font-size: 9px;
	}

	.crx-tiktok-watch {
		right: 10px;
		bottom: 10px;
		left: 10px;
		min-height: 35px;
	}

	.crx-tiktok-play {
		width: 52px;
		height: 52px;
	}

	.crx-tiktok-footer-text {
		align-items: flex-start;
	}

	.crx-tiktok-footer-text > span {
		width: 39px;
		height: 39px;
	}

}

/* =========================================================
   ACCESIBILIDAD
========================================================= */

@media (prefers-reduced-motion: reduce) {

	.crx-tiktok-card,
	.crx-tiktok-media img,
	.crx-tiktok-play,
	.crx-tiktok-profile-button,
	.crx-tiktok-main-button,
	.crx-tiktok-external-link span {
		transition: none;
	}

	.crx-tiktok-player.is-loading::after {
		animation: none;
	}

}