/**
 * WebXtrm Team Grid Widget Styles
 * Avatar-with-cyan-ring + name + role + social icon, animated.
 */

.wx-tg-wrap {
	width: 100%;
	display: flex;
	justify-content: center;
	box-sizing: border-box;
}

.wx-tg-wrap * {
	box-sizing: border-box;
}

/* Screen-reader only — visible to AT but hidden visually */
.wx-tg-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ===== GRID ===== */
.wx-tg-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	grid-auto-rows: 1fr;
	gap: 16px;
	max-width: 1200px;
	width: 100%;
}

/* ===== CARD ===== */
.wx-tg-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	padding: 22px 14px;
	background: #0f131a;
	border: 1px solid rgba(255, 255, 255, 0.05);
	border-radius: 14px;
	text-align: center;
	height: 100%;
	transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
	position: relative;
}

.wx-tg-card:hover {
	background: #111620;
	border-color: rgba(0, 201, 240, 0.3);
	transform: translateY(-4px);
	box-shadow: 0 12px 32px rgba(0, 201, 240, 0.08);
}

/* ===== AVATAR ===== */
.wx-tg-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 80px;
	height: 80px;
	border-radius: 50%;
	border: 2px solid rgba(0, 201, 240, 0.6);
	background: rgba(0, 201, 240, 0.04);
	overflow: hidden;
	flex-shrink: 0;
	position: relative;
	transition: border-color 0.3s ease, transform 0.3s ease;
}

.wx-tg-card:hover .wx-tg-avatar {
	border-color: rgba(0, 201, 240, 0.9);
	transform: scale(1.05);
}

.wx-tg-initials {
	font-family: 'Inter', sans-serif;
	font-size: 26px;
	font-weight: 800;
	color: #00c9f0;
	letter-spacing: 0.5px;
	line-height: 1;
	text-transform: uppercase;
}

.wx-tg-avatar-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
	display: block;
}

/* ===== NAME ===== */
.wx-tg-name {
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	font-weight: 700;
	color: #ffffff;
	line-height: 1.3;
	margin-top: 16px;
}

/* ===== ROLE ===== */
.wx-tg-role {
	font-family: 'Inter', sans-serif;
	font-size: 12px;
	font-weight: 400;
	color: #9aacbd;
	line-height: 1.35;
	margin-top: 6px;
}

/* ===== SOCIAL ICON ===== */
.wx-tg-social {
	margin-top: 14px;
	display: flex;
	justify-content: center;
}

.wx-tg-social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 5px;
	background: rgba(0, 201, 240, 0.08);
	border: 1px solid rgba(0, 201, 240, 0.3);
	color: #00c9f0;
	text-decoration: none;
	transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.wx-tg-social-link:hover {
	background: #00c9f0;
	border-color: #00c9f0;
	color: #ffffff;
	transform: translateY(-2px);
}

.wx-tg-social-link svg {
	width: 13px;
	height: 13px;
	fill: currentColor;
	color: currentColor;
	display: block;
}

.wx-tg-social-link svg path,
.wx-tg-social-link svg circle,
.wx-tg-social-link svg polygon,
.wx-tg-social-link svg rect {
	fill: currentColor;
}

.wx-tg-social-link i {
	font-size: 13px;
	color: inherit;
	line-height: 1;
}

/* ============================================ */
/* ===== ANIMATIONS ========================== */
/* ============================================ */

/* 1. Stagger card entry */
@keyframes wx-tg-card-in {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.wx-tg-anim-stagger .wx-tg-card {
	opacity: 0;
	animation: wx-tg-card-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
	animation-delay: calc(var(--wx-i, 0) * 0.1s + 0.1s);
}

/* Avoid conflict with hover transform — hover overrides via :hover specificity */

/* 2. Avatar ring pulse — staggered offset per card so they don't sync */
@keyframes wx-tg-avatar-pulse {
	0%, 100% {
		box-shadow: 0 0 0 0 rgba(0, 201, 240, 0);
	}
	50% {
		box-shadow: 0 0 0 6px rgba(0, 201, 240, 0.15), 0 0 18px rgba(0, 201, 240, 0.25);
	}
}

.wx-tg-anim-pulse .wx-tg-avatar {
	animation: wx-tg-avatar-pulse 3s ease-in-out infinite;
	animation-delay: calc(var(--wx-i, 0) * 0.4s);
}

/* Pause pulse on hover so user-triggered scale doesn't fight with pulse glow */
.wx-tg-anim-pulse .wx-tg-card:hover .wx-tg-avatar {
	animation-play-state: paused;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.wx-tg-anim-stagger .wx-tg-card,
	.wx-tg-anim-pulse .wx-tg-avatar {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
	}
}

/* ============================================ */
/* ===== RESPONSIVE SAFETY FALLBACKS ========= */
/* ============================================ */
/* Elementor responsive controls override these with higher specificity. */

@media (max-width: 1024px) {
	.wx-tg-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 14px;
	}
	.wx-tg-card {
		padding: 20px 12px;
		border-radius: 12px;
	}
	.wx-tg-avatar {
		width: 72px;
		height: 72px;
	}
	.wx-tg-initials {
		font-size: 24px;
	}
}

@media (max-width: 767px) {
	.wx-tg-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}
	.wx-tg-card {
		padding: 18px 10px;
		border-radius: 12px;
	}
	.wx-tg-card:hover {
		transform: none; /* no lift on touch */
	}
	.wx-tg-avatar {
		width: 64px;
		height: 64px;
	}
	.wx-tg-initials {
		font-size: 22px;
	}
	.wx-tg-name {
		font-size: 13px;
		margin-top: 12px;
	}
	.wx-tg-role {
		font-size: 11.5px;
	}
	.wx-tg-social {
		margin-top: 12px;
	}
	.wx-tg-social-link {
		width: 26px;
		height: 26px;
	}
}

@media (max-width: 380px) {
	.wx-tg-grid {
		gap: 10px;
	}
	.wx-tg-card {
		padding: 16px 8px;
	}
	.wx-tg-avatar {
		width: 58px;
		height: 58px;
	}
	.wx-tg-initials {
		font-size: 20px;
	}
	.wx-tg-name {
		font-size: 12.5px;
	}
	.wx-tg-role {
		font-size: 11px;
	}
}
