/* TocaHits Party Carousel */
.thpc {
	--thpc-accent: #8b5cf6;
	--thpc-btn: #0b3fd1;
	--thpc-time: 4s;
	--thpc-radius: 14px;
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: clamp(28px, 5vw, 56px) 0 clamp(28px, 4vw, 48px);
	color: #fff;
	background: #050507;
	border: 1px solid rgba(255, 255, 255, .14);
}
.thpc *, .thpc *::before, .thpc *::after { box-sizing: border-box; }

/* Glow ambiental con la foto activa */
.thpc-ambient {
	position: absolute; inset: -20%;
	z-index: -1; pointer-events: none;
	opacity: .45;
	filter: blur(70px) saturate(1.6);
	transition: opacity .6s;
}
.thpc-ambient img { width: 100%; height: 100%; object-fit: cover; transition: opacity .7s ease; }
.thpc::after {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background:
		radial-gradient(ellipse at 50% 55%, transparent 30%, rgba(5,5,7,.85) 75%),
		linear-gradient(180deg, rgba(5,5,7,.6), transparent 30%, transparent 70%, rgba(5,5,7,.9));
}

/* Encabezado */
.thpc-head { text-align: center; padding: 0 16px; margin: 0 auto clamp(18px, 3vw, 30px); max-width: 720px; }
.thpc-eyebrow {
	display: inline-flex; align-items: center; gap: 8px;
	margin: 0 0 8px; color: var(--thpc-accent);
	font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.thpc-live {
	width: 8px; height: 8px; border-radius: 50%;
	background: #ff2d55; box-shadow: 0 0 0 0 rgba(255, 45, 85, .7);
	animation: thpc-pulse 1.6s infinite;
}
@keyframes thpc-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(255,45,85,.7); }
	70%  { box-shadow: 0 0 0 10px rgba(255,45,85,0); }
	100% { box-shadow: 0 0 0 0 rgba(255,45,85,0); }
}
.thpc .thpc-title {
	margin: 0; color: #fff;
	font-size: clamp(28px, 5vw, 48px); line-height: 1.02;
	text-transform: uppercase; letter-spacing: .01em;
}
.thpc-sub { margin: 10px auto 0; color: rgba(255,255,255,.75); font-size: 15px; line-height: 1.5; }
.thpc-badge {
	display: inline-block; margin-top: 14px; padding: 6px 14px;
	border: 1px solid var(--thpc-accent); border-radius: 999px;
	background: color-mix(in srgb, var(--thpc-accent) 18%, transparent);
	font-size: 13px; font-weight: 700; letter-spacing: .04em;
}

/* Escenario coverflow */
.thpc-stage {
	position: relative;
	aspect-ratio: 16 / 7;
	min-height: 240px;
	max-height: 520px;
	width: 100%;
	perspective: 1600px;
	touch-action: pan-y;
	user-select: none; -webkit-user-select: none;
	cursor: grab; outline: none;
}
.thpc-stage.is-dragging { cursor: grabbing; }
.thpc-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--thpc-accent); }

.thpc-slide {
	position: absolute; top: 0; left: 50%;
	width: min(64%, 760px); height: 100%; margin: 0;
	border-radius: var(--thpc-radius); overflow: hidden;
	background: #111;
	transform: translateX(-50%);
	transition: transform .7s cubic-bezier(.22,.8,.24,1), opacity .5s ease, filter .5s ease, box-shadow .5s ease;
	will-change: transform;
	opacity: 0;
}
.thpc-slide img {
	width: 100%; height: 100%; display: block;
	object-fit: cover; pointer-events: none;
	transform: scale(1.06);
	transition: transform 6s ease-out;
}
.thpc-slide.is-active {
	box-shadow: 0 30px 70px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.18), 0 0 50px -10px var(--thpc-accent);
	cursor: zoom-in;
}
.thpc-slide.is-active img { transform: scale(1); }
.thpc-slide:not(.is-active) { filter: brightness(.45) saturate(.8); }

.thpc-slide figcaption {
	position: absolute; left: 0; right: 0; bottom: 0;
	padding: 40px 20px 16px;
	background: linear-gradient(transparent, rgba(0,0,0,.85));
	font-size: 15px; font-weight: 600;
	transform: translateY(100%); opacity: 0;
	transition: transform .5s .25s, opacity .5s .25s;
}
.thpc-slide.is-active figcaption { transform: none; opacity: 1; }
.thpc-zoom {
	position: absolute; top: 12px; right: 12px;
	display: grid; place-items: center; width: 34px; height: 34px;
	border-radius: 50%; background: rgba(0,0,0,.55); backdrop-filter: blur(6px);
	opacity: 0; transition: opacity .3s;
}
.thpc-slide.is-active:hover .thpc-zoom { opacity: 1; }

/* Controles */
.thpc-controls {
	display: flex; align-items: center; justify-content: center; gap: 18px;
	margin-top: clamp(16px, 2.5vw, 26px); padding: 0 16px;
}
.thpc .thpc-arrow {
	display: grid; place-items: center;
	width: 46px; height: 46px; padding: 0; margin: 0;
	border: 1px solid rgba(255,255,255,.35); border-radius: 50%;
	background: rgba(255,255,255,.04); color: #fff;
	cursor: pointer; transition: background .25s, border-color .25s, transform .2s;
}
.thpc .thpc-arrow:hover, .thpc .thpc-arrow:focus-visible {
	background: var(--thpc-accent); border-color: var(--thpc-accent); outline: none;
}
.thpc .thpc-arrow:active { transform: scale(.92); }

.thpc-meta { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 140px; }
.thpc-count { font-size: 13px; letter-spacing: .14em; color: rgba(255,255,255,.6); font-variant-numeric: tabular-nums; }
.thpc-count b { color: #fff; font-size: 18px; }
.thpc-progress { width: 140px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; }
.thpc-progress i { display: block; height: 100%; width: 0; background: var(--thpc-accent); }
.thpc.is-playing .thpc-progress i { animation: thpc-fill var(--thpc-time) linear forwards; }
.thpc.is-paused .thpc-progress i { animation-play-state: paused; }
@keyframes thpc-fill { to { width: 100%; } }

/* CTA */
.thpc-cta-wrap { text-align: center; margin-top: clamp(18px, 3vw, 28px); padding: 0 16px; }
.thpc .thpc-cta {
	position: relative; overflow: hidden;
	display: inline-flex; align-items: center; gap: 10px;
	padding: 15px 30px;
	background: var(--thpc-btn); color: #fff !important; text-decoration: none !important;
	border: 1px solid rgba(255,255,255,.25);
	font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	transition: transform .2s, box-shadow .3s;
	box-shadow: 0 10px 30px -10px var(--thpc-btn);
}
.thpc .thpc-cta::before {
	content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
	transform: skewX(-20deg);
	animation: thpc-shine 3.5s infinite;
}
@keyframes thpc-shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.thpc .thpc-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px var(--thpc-btn); }
.thpc .thpc-cta svg { transition: transform .2s; }
.thpc .thpc-cta:hover svg { transform: translateX(4px); }

/* Lightbox */
.thpc-lightbox {
	position: fixed; inset: 0; z-index: 999999;
	display: flex; align-items: center; justify-content: center;
	background: rgba(0,0,0,.92); backdrop-filter: blur(8px);
	opacity: 0; transition: opacity .3s;
}
.thpc-lightbox[hidden] { display: none; }
.thpc-lightbox.is-open { opacity: 1; }
.thpc-lightbox figure { margin: 0; max-width: 92vw; max-height: 86vh; text-align: center; }
.thpc-lightbox img {
	display: block; max-width: 92vw; max-height: 80vh; margin: 0 auto;
	object-fit: contain; border-radius: 8px;
	transition: opacity .25s;
}
.thpc-lightbox figcaption { margin-top: 12px; color: #fff; font-size: 15px; }
.thpc-lightbox button {
	position: absolute; display: grid; place-items: center;
	width: 52px; height: 52px; padding: 0;
	border: 0; border-radius: 50%;
	background: rgba(255,255,255,.1); color: #fff;
	font-size: 34px; line-height: 1; cursor: pointer;
	transition: background .2s;
}
.thpc-lightbox button:hover, .thpc-lightbox button:focus-visible { background: var(--thpc-accent, #8b5cf6); outline: none; }
.thpc-lb-close { top: 18px; right: 18px; }
.thpc-lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.thpc-lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.thpc-lb-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.7); font-size: 13px; letter-spacing: .14em; }

/* Móvil */
@media (max-width: 700px) {
	.thpc-stage { aspect-ratio: 1 / 1; max-height: 460px; }
	.thpc-slide { width: 80%; }
	.thpc .thpc-arrow { width: 40px; height: 40px; }
	.thpc-lb-prev, .thpc-lb-next { top: auto; bottom: 14px; transform: none; }
	.thpc-lb-count { bottom: 32px; }
}

@media (prefers-reduced-motion: reduce) {
	.thpc-slide, .thpc-slide img, .thpc-ambient img { transition: none; }
	.thpc .thpc-cta::before, .thpc-live { animation: none; }
}
