/* ============================================================
   SMART-C interactive beneficiary globe (home page)
   ============================================================ */

.homeglobe {
	overflow: hidden;
}

.homeglobe-header {
	margin-bottom: 32px;
}

.homeglobe-title {
	margin: 0;
}

/* ---- Stage (dark space wrapper the globe renders into) ---- */
.homeglobe-stage {
	position: relative;
	background: #050d1f;
}

.homeglobe-canvas {
	width: 100%;
	line-height: 0;
	cursor: grab;
}

.homeglobe-canvas:active {
	cursor: grabbing;
}

/* ---- Programme filter bar ---- */
.homeglobe-tabs {
	position: absolute;
	top: 24px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 5;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px;
	background: #fff;
	border-radius: 999px;
	box-shadow: 0 12px 30px rgba(2, 8, 23, 0.45);
	max-width: calc(100% - 32px);
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.homeglobe-tabs::-webkit-scrollbar {
	display: none;
}

.homeglobe-tab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
	padding: 8px 18px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: transparent;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.homeglobe-tab img {
	display: block;
	height: 26px;
	width: auto;
	max-width: 140px;
	object-fit: contain;
}

.homeglobe-tab-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	border: 3px solid var(--tab-color, #1d3f94);
	background: #fff;
}

.homeglobe-tab span:not(.homeglobe-tab-dot) {
	font-weight: 700;
	font-size: 15px;
	color: var(--tab-color, #1d3f94);
	white-space: nowrap;
}

.homeglobe-tab:hover {
	background: rgba(29, 63, 148, 0.06);
}

.homeglobe-tab.is-active {
	background: #f1f5fb;
	border-color: rgba(29, 63, 148, 0.25);
}

/* ---- Pin tooltip ---- */
.globe-tooltip {
	padding: 6px 12px;
	border-radius: 8px;
	background: rgba(8, 15, 32, 0.9);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}

/* ---- Country panel ---- */
.homeglobe-panel {
	position: absolute;
	top: 96px;
	left: 32px;
	z-index: 6;
	width: 320px;
	max-width: calc(100% - 48px);
	padding: 24px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 20px;
	background: rgba(8, 15, 32, 0.82);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	color: #fff;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.homeglobe-panel-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 50%;
	background: transparent;
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.homeglobe-panel-close:hover {
	background: rgba(255, 255, 255, 0.12);
}

.homeglobe-panel-region {
	display: block;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.6);
	margin-bottom: 6px;
}

.homeglobe-panel-country {
	margin: 0 0 4px;
	font-size: 28px;
	font-weight: 700;
	color: #fff;
}

.homeglobe-panel-count {
	margin: 0 0 18px;
	font-size: 14px;
	color: rgba(255, 255, 255, 0.7);
}

.homeglobe-panel-label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.5);
	margin-bottom: 10px;
}

.homeglobe-panel-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.homeglobe-panel-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.homeglobe-panel-link:hover,
.homeglobe-panel-link:focus {
	background: rgba(255, 255, 255, 0.14);
	border-color: rgba(255, 255, 255, 0.3);
	color: #fff;
}

.homeglobe-panel-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--pin-color, #1d3f94);
	flex: 0 0 auto;
}

.homeglobe-panel-name {
	flex: 1 1 auto;
	font-size: 15px;
	font-weight: 600;
}

.homeglobe-panel-link i {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.55);
}

.homeglobe-panel-list--region {
	margin-top: 6px;
}

/* Next country button */
.homeglobe-panel-next {
	margin-top: 10px;
	width: 100%;
	padding: 10px 14px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.homeglobe-panel-next:hover {
	background: rgba(255, 255, 255, 0.16);
	border-color: rgba(255, 255, 255, 0.35);
}

/* Region pin: comma-separated country list */
.homeglobe-panel-members {
	color: rgba(255, 255, 255, 0.85);
	font-size: 14px;
	line-height: 1.6;
	margin: 0;
}

/* ---- Hint ---- */
.homeglobe-hint {
	position: absolute;
	top: 28px;
	right: 28px;
	z-index: 4;
	margin: 0;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.55);
	text-align: right;
	pointer-events: none;
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
	.homeglobe-tabs {
		top: 16px;
		justify-content: flex-start;
	}

	.homeglobe-hint {
		display: none;
	}

	/* Panel is anchored just below the clicked pin (top set inline by JS). */
	.homeglobe-stage {
		padding-top: 36px;
		transition: padding-bottom 0.45s ease;
	}

	.homeglobe-panel {
		top: 0;
		bottom: auto;
		left: 16px;
		right: 16px;
		width: auto;
		max-width: none;
		padding: 18px;
		transition: top 0.45s ease;
	}

	.homeglobe-panel-country {
		font-size: 22px;
	}

	/* Google-Maps style "use two fingers" hint over the globe */
	.homeglobe-gesture-hint {
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 7;
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 24px;
		text-align: center;
		background: rgba(5, 13, 31, 0.55);
		-webkit-backdrop-filter: blur(1px);
		backdrop-filter: blur(1px);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.2s ease, visibility 0.2s ease;
		pointer-events: none;
	}

	.homeglobe-gesture-hint.is-visible {
		opacity: 1;
		visibility: visible;
	}

	.homeglobe-gesture-hint span {
		font-size: 16px;
		font-weight: 700;
		color: #fff;
	}
}

/* Desktop two-finger hint — same full-overlay style as mobile */
@media (min-width: 768px) {
	.homeglobe-gesture-hint--desktop {
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 7;
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 24px;
		text-align: center;
		background: rgba(5, 13, 31, 0.55);
		-webkit-backdrop-filter: blur(1px);
		backdrop-filter: blur(1px);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.2s ease, visibility 0.2s ease;
		pointer-events: none;
	}

	.homeglobe-gesture-hint--desktop.is-visible {
		opacity: 1;
		visibility: visible;
	}

	.homeglobe-gesture-hint--desktop span {
		background: rgba(5, 13, 31, 0.7);
		-webkit-backdrop-filter: blur(4px);
		backdrop-filter: blur(4px);
		color: #fff;
		font-size: 16px;
		font-weight: 700;
		padding: 12px 24px;
		border-radius: 8px;
		border: 1px solid rgba(255, 255, 255, 0.2);
	}
}

.homeglobe-controls {
	position: absolute;
	right: 16px;
	bottom: 16px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	z-index: 5;
}

.homeglobe-ctrl-btn {
	width: 36px;
	height: 36px;
	border: 1px solid rgba(0, 0, 0, 0.1);
	background: #fff;
	color: #555;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	transition: background-color 0.2s ease;
}

.homeglobe-ctrl-btn:hover {
	background: #f0f0f0;
}

