/* CyberIT Education Suite — educational ecosystem map */

.edu-map {
	position: relative;
	margin: 8px 0 48px;
	border-radius: var(--radius-lg, 20px);
	overflow: hidden;
	isolation: isolate;
	color: #f8fafc;
	border: 1px solid rgba(96, 165, 250, 0.16);
	background:
		radial-gradient(circle at 50% 46%, rgba(37, 99, 235, 0.16), transparent 28%),
		radial-gradient(circle at 12% 12%, rgba(34, 211, 238, 0.1), transparent 26%),
		radial-gradient(circle at 90% 88%, rgba(167, 139, 250, 0.1), transparent 28%),
		linear-gradient(180deg, #07101f 0%, #040812 100%);
	color: #f8fafc;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.edu-map-grid {
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0.35;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
	background-size: 42px 42px;
	mask-image: radial-gradient(circle at center, black, transparent 82%);
	-webkit-mask-image: radial-gradient(circle at center, black, transparent 82%);
}

.edu-map-hud {
	position: absolute;
	left: 16px;
	top: 14px;
	z-index: 4;
	padding: 10px 12px;
	border: 1px solid rgba(96, 165, 250, 0.14);
	border-radius: 12px;
	background: rgba(3, 7, 18, 0.58);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	max-width: min(280px, calc(100% - 140px));
}

.edu-map-eyebrow {
	color: #93c5fd;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.edu-map-title {
	margin-top: 4px;
	font-size: 15px;
	font-weight: 750;
	letter-spacing: -0.02em;
	color: #f8fafc;
}

.edu-map-sub {
	margin-top: 3px;
	color: #94a3b8;
	font-size: 11px;
	line-height: 1.45;
}

.edu-map-live {
	position: absolute;
	right: 14px;
	top: 14px;
	z-index: 4;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 11px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.04);
	color: #94a3b8;
	font-size: 10px;
	letter-spacing: 0.04em;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.edu-map-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #34d399;
	box-shadow: 0 0 12px #34d399;
	animation: eduMapPulse 1.6s ease-in-out infinite;
}

.edu-map-stage {
	position: relative;
	width: 100%;
	aspect-ratio: 1000 / 640;
	min-height: 480px;
}

.edu-map-links {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	overflow: visible;
}

.edu-map-link {
	fill: none;
	stroke-width: 1.4;
	stroke-dasharray: 5 9;
	opacity: 0.5;
	animation: eduMapDash 3s linear infinite;
}

.edu-map-glow {
	fill: none;
	stroke-width: 7;
	opacity: 0.07;
	filter: blur(4px);
}

.edu-map-orbit {
	fill: none;
	stroke: rgba(96, 165, 250, 0.1);
	stroke-width: 1;
}

.edu-map-orbit--soft {
	stroke: rgba(34, 211, 238, 0.06);
	stroke-dasharray: 2 12;
}

.edu-map-particle {
	filter: drop-shadow(0 0 6px currentColor);
}

.edu-map-core {
	position: absolute;
	left: 50%;
	top: 50%;
	width: min(200px, 28%);
	aspect-ratio: 1;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	z-index: 8;
	text-align: center;
}

.edu-map-core-ring,
.edu-map-core-ring-2 {
	position: absolute;
	inset: 0;
	border: 1px solid rgba(96, 165, 250, 0.2);
	border-radius: 50%;
	animation: eduMapSpin 16s linear infinite;
}

.edu-map-core-ring-2 {
	inset: -14px;
	border-color: rgba(34, 211, 238, 0.1);
	animation-duration: 24s;
	animation-direction: reverse;
}

.edu-map-core-ring::before,
.edu-map-core-ring-2::before {
	content: "";
	position: absolute;
	left: 50%;
	top: -4px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #60a5fa;
	box-shadow: 0 0 12px #60a5fa;
}

.edu-map-core-ring-2::before { background: #22d3ee; box-shadow: 0 0 12px #22d3ee; }

.edu-map-core-shell {
	position: absolute;
	inset: 16px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #294b88, #0b152a 58%, #050a14);
	border: 1px solid rgba(96, 165, 250, 0.42);
	box-shadow:
		0 0 0 10px rgba(79, 140, 255, 0.03),
		0 0 50px rgba(79, 140, 255, 0.28),
		inset 0 0 36px rgba(79, 140, 255, 0.12);
}

.edu-map-core-icon,
.edu-map-core-name,
.edu-map-core-sub {
	position: relative;
	z-index: 2;
}

.edu-map-core-icon {
	width: 28px;
	height: 28px;
	color: #93c5fd;
	margin-bottom: 4px;
}

.edu-map-core-icon svg {
	width: 28px;
	height: 28px;
	display: block;
}

.edu-map-core-name {
	font-size: clamp(10px, 1.25vw, 13px);
	font-weight: 800;
	letter-spacing: 0.03em;
	color: #f8fafc;
	max-width: 88%;
	line-height: 1.2;
}

.edu-map-core-sub {
	margin-top: 4px;
	font-size: 8px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #6ee7b7;
}

.edu-map-node {
	position: absolute;
	width: min(168px, 19vw);
	min-height: 86px;
	padding: 12px;
	border: 1px solid rgba(255, 255, 255, 0.11);
	border-radius: 16px;
	background: linear-gradient(145deg, rgba(21, 32, 53, 0.92), rgba(7, 13, 25, 0.86));
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
	transform: translate(-50%, -50%);
	z-index: 6;
}

.edu-map-node::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: linear-gradient(135deg, var(--edu-c), transparent 52%);
	opacity: 0.1;
	pointer-events: none;
}

.edu-map-node-top {
	display: flex;
	align-items: center;
	gap: 8px;
}

.edu-map-icon {
	width: 32px;
	height: 32px;
	flex-shrink: 0;
	display: grid;
	place-items: center;
	border-radius: 10px;
	background: rgba(148, 163, 184, 0.14);
	background: color-mix(in srgb, var(--edu-c) 16%, transparent);
	color: var(--edu-c);
}

.edu-map-icon svg {
	width: 18px;
	height: 18px;
	display: block;
}

.edu-map-name {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.02em;
	line-height: 1.2;
	color: #f8fafc;
}

.edu-map-type {
	margin-top: 2px;
	color: #7b879c;
	font-size: 8px;
	letter-spacing: 0.04em;
}

.edu-map-meta {
	margin-top: 10px;
	color: #9caac0;
	font-size: 9px;
	line-height: 1.35;
}

.edu-map-node[data-pos="preschool"] { left: 17%; top: 34%; --edu-c: #fbbf24; }
.edu-map-node[data-pos="school"] { left: 17%; top: 72%; --edu-c: #60a5fa; }
.edu-map-node[data-pos="children"] { left: 39%; top: 18%; --edu-c: #34d399; }
.edu-map-node[data-pos="teachers"] { left: 61%; top: 18%; --edu-c: #22d3ee; }
.edu-map-node[data-pos="parents"] { left: 83%; top: 34%; --edu-c: #f472b6; }
.edu-map-node[data-pos="checkin"] { left: 8%; top: 53%; --edu-c: #22d3ee; }
.edu-map-node[data-pos="communication"] { left: 92%; top: 53%; --edu-c: #f472b6; }
.edu-map-node[data-pos="attendance"] { left: 31%; top: 84%; --edu-c: #35d399; }
.edu-map-node[data-pos="academic"] { left: 69%; top: 84%; --edu-c: #a78bfa; }
.edu-map-node[data-pos="finance"] { left: 83%; top: 72%; --edu-c: #fbbf24; }

.edu-map-cat {
	position: absolute;
	z-index: 3;
	color: #64748b;
	font-size: 8px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	pointer-events: none;
}

.edu-map-cat--left { left: 6%; top: 14%; }
.edu-map-cat--right { right: 6%; top: 14%; }
.edu-map-cat--bottom {
	left: 50%;
	bottom: 10px;
	transform: translateX(-50%);
}

@keyframes eduMapDash { to { stroke-dashoffset: -56; } }
@keyframes eduMapSpin { to { transform: rotate(360deg); } }
@keyframes eduMapPulse {
	0%, 100% { transform: scale(1); opacity: 1; }
	50% { transform: scale(1.45); opacity: 0.5; }
}

@media (max-width: 980px) {
	.edu-map-node { width: min(142px, 22vw); min-height: 78px; padding: 10px; }
	.edu-map-name { font-size: 10px; }
	.edu-map-core { width: min(168px, 26%); }
	.edu-map-hud { max-width: min(240px, calc(100% - 120px)); }
}

@media (max-width: 720px) {
	.edu-map { margin: 0 0 32px; }
	.edu-map-hud {
		position: relative;
		left: auto;
		top: auto;
		max-width: none;
		margin: 14px 14px 0;
	}
	.edu-map-live { top: 14px; right: 14px; }
	.edu-map-sub { display: none; }
	.edu-map-cat,
	.edu-map-links { display: none; }
	.edu-map-stage {
		aspect-ratio: auto;
		min-height: 0;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 10px;
		padding: 18px 14px 16px;
	}
	.edu-map-core {
		grid-column: 1 / -1;
		position: relative;
		left: auto;
		top: auto;
		width: 100%;
		aspect-ratio: auto;
		height: auto;
		transform: none;
		flex-direction: row;
		justify-content: flex-start;
		gap: 12px;
		padding: 14px 16px;
		border-radius: 16px;
		background: radial-gradient(circle at 12% 50%, #294b88, #0b152a 62%);
		border: 1px solid rgba(96, 165, 250, 0.28);
	}
	.edu-map-core-ring,
	.edu-map-core-ring-2,
	.edu-map-core-shell { display: none; }
	.edu-map-core-name { font-size: 15px; }
	.edu-map-node {
		position: relative;
		left: auto !important;
		top: auto !important;
		transform: none;
		width: auto;
		min-height: 0;
	}
}

@media (max-width: 430px) {
	.edu-map-live span:last-child { display: none; }
	.edu-map-live { padding: 7px; }
	.edu-map-stage { grid-template-columns: 1fr; }
}

.edu-map.reveal,
.edu-map.reveal.is-visible {
	opacity: 1;
	transform: none;
}

.school-container:has(.edu-map) {
	overflow-x: visible;
}

body.site .edu-map {
	color: #f8fafc !important;
	background:
		radial-gradient(circle at 50% 46%, rgba(37, 99, 235, 0.16), transparent 28%),
		radial-gradient(circle at 12% 12%, rgba(34, 211, 238, 0.1), transparent 26%),
		radial-gradient(circle at 90% 88%, rgba(167, 139, 250, 0.1), transparent 28%),
		linear-gradient(180deg, #07101f 0%, #040812 100%) !important;
	border-color: rgba(96, 165, 250, 0.16) !important;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

body.site .edu-map .edu-map-title,
body.site .edu-map .edu-map-name,
body.site .edu-map .edu-map-core-name,
body.site .edu-map .edu-map-eyebrow,
body.site .edu-map .edu-map-sub,
body.site .edu-map .edu-map-type,
body.site .edu-map .edu-map-meta,
body.site .edu-map .edu-map-cat,
body.site .edu-map .edu-map-live {
	-webkit-text-fill-color: unset;
	background: none;
}

body.site .edu-map .edu-map-title,
body.site .edu-map .edu-map-name,
body.site .edu-map .edu-map-core-name {
	color: #f8fafc !important;
}

body.site .edu-map .edu-map-eyebrow { color: #93c5fd !important; }
body.site .edu-map .edu-map-sub,
body.site .edu-map .edu-map-type,
body.site .edu-map .edu-map-meta,
body.site .edu-map .edu-map-cat { color: #94a3b8 !important; }

@media (prefers-reduced-motion: reduce) {
	.edu-map-link,
	.edu-map-core-ring,
	.edu-map-core-ring-2,
	.edu-map-dot {
		animation: none !important;
	}
	.edu-map-particle { display: none; }
}
