/* Tecolote Menú Burbuja — estilos del sitio (front-end) */

.tecolote-burbuja {
	--tb-principal: #16324a;
	--tb-acento: #2bb3a3;
	position: fixed;
	z-index: 9999;
	font-family: inherit;
}

.tecolote-burbuja.tb-pos-centro-abajo {
	left: 50%;
	bottom: 28px;
	transform: translateX(-50%);
}

.tecolote-burbuja.tb-pos-abajo-izquierda {
	left: 24px;
	bottom: 28px;
}

.tecolote-burbuja.tb-pos-abajo-derecha {
	right: 24px;
	bottom: 28px;
}

/* El botón central es una columna: el círculo del búho y, debajo, el texto. */
.tecolote-burbuja .tb-main {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: auto;
	height: auto;
	background: none;
	border: none;
	box-shadow: none;
	cursor: pointer;
	text-decoration: none;
	outline: none;
}

.tecolote-burbuja .tb-main__imagen {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 84px;
	height: 84px;
	flex: none;
	border-radius: 50%;
	background: var(--tb-principal);
	border: 3px solid var(--tb-acento);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	overflow: hidden;
}

.tecolote-burbuja .tb-main:hover .tb-main__imagen,
.tecolote-burbuja .tb-main:focus-visible .tb-main__imagen {
	transform: scale(1.06);
	box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
}

/* El icono central palpita: latido suave y continuo. */
@keyframes tb-pulso {
	0%, 100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.06);
	}
}

.tecolote-burbuja .tb-main__imagen img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
	display: block;
	animation: tb-pulso 2.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
	.tecolote-burbuja .tb-main__imagen img {
		animation: none;
	}
}

/* Texto debajo del botón central: "menú" cerrado, "nuestros juegos" abierto. */
.tecolote-burbuja .tb-main__texto {
	margin-top: 6px;
	padding: 2px 10px;
	border-radius: 999px;
	background: rgba(18, 38, 58, 0.92);
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: #fff;
	font-size: 12px;
	line-height: 1.4;
	white-space: nowrap;
}

/* Contenedor de las burbujas: anclado al centro del botón principal (42 px
   desde arriba del nav), no al centro del nav, porque el texto bajo el botón
   alarga el nav. */
.tecolote-burbuja .tb-items {
	position: absolute;
	left: 50%;
	top: 42px;
	width: 0;
	height: 0;
}

/* Botón para cerrar el menú: en la parte de arriba del abanico, solo visible
   con el menú abierto. En el modo flotante el abanico se abre hacia arriba,
   así que va por encima del búho; en el encabezado se abre hacia abajo y va
   debajo del búho, arriba de las burbujas. */
.tecolote-burbuja .tb-cerrar {
	--tb-cerrar-y: -100px;
	position: absolute;
	left: 0;
	top: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border-radius: 50%;
	background: rgba(18, 38, 58, 0.92);
	border: 1px solid rgba(255, 255, 255, 0.35);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, -50%) translate(0, var(--tb-cerrar-y)) scale(0.5);
	transition:
		transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
		opacity 0.25s ease;
	transition-delay: 120ms;
}

.tecolote-burbuja.is-open .tb-cerrar {
	opacity: 1;
	pointer-events: auto;
	transform: translate(-50%, -50%) translate(0, var(--tb-cerrar-y)) scale(1);
}

.tecolote-burbuja .tb-cerrar:hover,
.tecolote-burbuja .tb-cerrar:focus-visible {
	background: #3a8fd0;
	outline: none;
}

.tecolote-burbuja.tb-inline .tb-cerrar {
	--tb-cerrar-y: 100px;
}

/* Cada burbuja: icono arriba, nombre abajo */
.tecolote-burbuja .tb-item {
	position: absolute;
	left: 0;
	top: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 92px;
	text-decoration: none;
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, -50%) translate(var(--tx, 0), var(--ty, 0)) scale(0.5);
	transition:
		transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
		opacity 0.25s ease;
	transition-delay: var(--td, 0s);
}

.tecolote-burbuja.is-open .tb-item {
	opacity: 1;
	pointer-events: auto;
	transform: translate(-50%, -50%) translate(var(--tx, 0), var(--ty, 0)) scale(1);
}

.tecolote-burbuja .tb-item__icono {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--tb-color, #16324a);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
	overflow: hidden;
	flex: none;
}

.tecolote-burbuja .tb-item--destacado .tb-item__icono {
	width: 66px;
	height: 66px;
	border: 3px solid #8ecae6;
}

.tecolote-burbuja .tb-item__icono img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tecolote-burbuja .tb-item__letra {
	color: #fff;
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
}

.tecolote-burbuja .tb-item--destacado .tb-item__nombre {
	color: #8ecae6;
	border-color: rgba(142, 202, 230, 0.6);
}

.tecolote-burbuja .tb-item__nombre {
	margin-top: 6px;
	padding: 2px 10px;
	border-radius: 999px;
	background: rgba(18, 38, 58, 0.92);
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: #fff;
	font-size: 12px;
	line-height: 1.4;
	white-space: nowrap;
}

.tecolote-burbuja .tb-item:hover .tb-item__icono,
.tecolote-burbuja .tb-item:focus-visible .tb-item__icono {
	transform: scale(1.08);
}

.tecolote-burbuja .tb-item:focus-visible {
	outline: none;
}

.tecolote-burbuja .tb-item:focus-visible .tb-item__nombre {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

@media (max-width: 480px) {
	.tecolote-burbuja.tb-pos-centro-abajo {
		bottom: 20px;
	}

	/* En pantallas angostas el abanico se achica al 70% del radio: las
	   posiciones móviles (--txm/--tym) sustituyen a las normales, para que
	   las burbujas de los extremos (Torneos y Desarrollo) no se recorten
	   en los bordes. El !important es necesario porque --tx/--ty vienen
	   en el estilo en línea de cada burbuja. */
	.tecolote-burbuja .tb-item {
		--tx: var(--txm) !important;
		--ty: var(--tym) !important;
	}

	.tecolote-burbuja.tb-pos-abajo-izquierda {
		left: 16px;
		bottom: 20px;
	}

	.tecolote-burbuja.tb-pos-abajo-derecha {
		right: 16px;
		bottom: 20px;
	}

	.tecolote-burbuja .tb-item {
		width: 80px;
	}

	.tecolote-burbuja .tb-item__icono {
		width: 48px;
		height: 48px;
	}

	.tecolote-burbuja .tb-item--destacado .tb-item__icono {
		width: 56px;
		height: 56px;
	}

	.tecolote-burbuja .tb-item__nombre {
		font-size: 11px;
	}

	.tecolote-burbuja .tb-main__texto {
		font-size: 11px;
	}

	.tecolote-burbuja .tb-cerrar {
		--tb-cerrar-y: -80px;
		width: 32px;
		height: 32px;
		font-size: 20px;
	}

	.tecolote-burbuja.tb-inline .tb-cerrar {
		--tb-cerrar-y: 90px;
	}
}

/* Modo en el encabezado: el menú vive dentro del contenido, no flotante. */
.tecolote-burbuja.tb-inline {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	height: auto;
	margin: 0 auto;
}

/* En escritorio (compu) el menú se ve al doble de grande: escala uniforme
   ×2 del búho, las burbujas, el abanico y los textos. En móvil y tablet no
   cambia nada. El espaciador sobre «Suscríbete ahora» se subió a 260 px
   para que el abanico abierto no tape el botón. */
@media (min-width: 481px) {
	.tecolote-burbuja.tb-inline {
		transform: scale(2);
		transform-origin: top center;
	}
}
