/* Programme map (Accelerator page): lean India SVG + HTML dots, popup and mobile list. Used with script/programme-map.js. */

.pm-stage {
	position: relative;
	aspect-ratio: 1254 / 1366;
	width: 100%;
}

.pm-stage > svg {
	display: block;
	width: 100%;
	height: 100%;
}

/* Dots: visible 20px circle, 44px hit area */
.pm-dot {
	position: absolute;
	width: 44px;
	height: 44px;
	margin: -22px 0 0 -22px;
	padding: 0;
	border: 0;
	background: transparent;
	border-radius: 50%;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	z-index: 1;
}

.pm-dot::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: #0C6DE2;
	border: 1px solid #5EF9F9;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pm-dot:hover::before,
.pm-dot.is-active::before {
	transform: translate(-50%, -50%) scale(1.2);
	box-shadow: 0 0 0 6px rgba(16, 118, 241, 0.2);
}

/* Dot holding several programmes: slightly larger, with the count inside */
.pm-dot[data-count]::before {
	width: 24px;
	height: 24px;
}

.pm-dot[data-count]::after {
	content: attr(data-count);
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	color: #FFFFFF;
	pointer-events: none;
}

.pm-dot:focus {
	outline: none;
}

.pm-dot:focus-visible::before {
	box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 5px #1076F1;
}

/* Popup */
.pm-popup {
	--tail-x: 50%;
	position: absolute;
	z-index: 3;
	width: 258px;
	display: flex;
	flex-direction: column;
	background: #FFFFFF;
	border: 1px solid #1076F1;
	border-radius: 14px;
	box-shadow: 0 0 5px rgba(66, 89, 111, 0.06), 0 10px 20px rgba(33, 50, 119, 0.25);
	pointer-events: none;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.pm-popup.pm-below {
	transform: translateY(-6px);
}

.pm-popup.is-open {
	opacity: 1;
	transform: none;
}

.pm-popup[hidden] {
	display: none;
}

/* Tail: rotated square sharing the popup border */
.pm-popup::after {
	content: "";
	position: absolute;
	left: var(--tail-x);
	bottom: -8px;
	width: 14px;
	height: 14px;
	margin-left: -7px;
	background: #FFFFFF;
	border-right: 1px solid #1076F1;
	border-bottom: 1px solid #1076F1;
	transform: rotate(45deg);
	border-bottom-right-radius: 3px;
}

.pm-popup.pm-below::after {
	bottom: auto;
	top: -8px;
	transform: rotate(-135deg);
}

.pm-popup-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 96px;
	padding: 12px 18px;
	border-bottom: 1px solid #1076F1;
}

.pm-popup-logo img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.pm-popup-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 16px 16px 18px;
	text-align: center;
	color: #162A66;
}

.pm-popup-title {
	font-size: 17px;
	font-weight: 600;
	line-height: 1.25;
}

.pm-popup-state {
	font-size: 15px;
	font-weight: 400;
}

/* Popup with several programmes (one dot for a small state/UT) */
.pm-popup.pm-multi {
	width: 300px;
}

.pm-rows {
	display: flex;
	flex-direction: column;
}

.pm-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
}

.pm-row + .pm-row {
	border-top: 1px solid rgba(16, 118, 241, 0.25);
}

.pm-row-logo {
	flex: 0 0 88px;
	height: 46px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pm-row-logo img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.pm-row-title {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.25;
	color: #162A66;
}

.pm-multi .pm-popup-text {
	padding: 10px 14px 12px;
	border-top: 1px solid #1076F1;
}

.pm-multi .pm-popup-state {
	font-weight: 600;
}

/* Partner name shown in place of a missing logo */
.pm-partner-text {
	font-size: 20px;
	font-weight: 600;
	line-height: 1.2;
	color: #162A66;
	text-align: center;
}

.pm-row-logo.pm-partner-text,
.pm-card-logo.pm-partner-text {
	font-size: 14px;
}

/* List of programmes: shown on tablet and mobile only */
.pm-list {
	display: none;
	list-style: none;
	margin: 0;
	padding: 0;
}

.pm-card {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 16px 12px 12px;
	background: #F1F8FF;
	border-radius: 16px;
}

.pm-card-logo {
	flex: 0 0 128px;
	height: 68px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 6px 8px;
	background: #FFFFFF;
	border-radius: 10px;
}

.pm-card-logo img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.pm-card-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	color: #162A66;
}

.pm-card-title {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
}

.pm-card-state {
	font-size: 14px;
	font-weight: 400;
}

@media (max-width: 1023px) {
	.pm-stage {
		margin-top: 24px;
	}

	.pm-dot {
		width: 32px;
		height: 32px;
		margin: -16px 0 0 -16px;
	}

	.pm-dot::before {
		width: 12px;
		height: 12px;
	}

	.pm-dot:hover::before,
	.pm-dot.is-active::before {
		box-shadow: 0 0 0 4px rgba(16, 118, 241, 0.25);
	}

	.pm-popup {
		width: 220px;
		border-radius: 12px;
	}

	.pm-popup.pm-multi {
		width: 250px;
	}

	.pm-row {
		padding: 8px 10px;
		gap: 10px;
	}

	.pm-row-logo {
		flex-basis: 64px;
		height: 36px;
	}

	.pm-row-title {
		font-size: 13px;
	}

	.pm-popup-logo.pm-partner-text {
		font-size: 17px;
	}

	.pm-row-logo.pm-partner-text {
		font-size: 12px;
	}

	.pm-dot[data-count]::before {
		width: 12px;
		height: 12px;
	}

	.pm-dot[data-count]::after {
		display: none;
	}

	.pm-popup-logo {
		height: 72px;
		padding: 10px 14px;
	}

	.pm-popup-text {
		padding: 12px 12px 14px;
	}

	.pm-popup-title {
		font-size: 15px;
	}

	.pm-popup-state {
		font-size: 13px;
	}

	.pm-list {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
		margin-top: 32px;
	}
}

@media (max-width: 575px) {
	.pm-list {
		grid-template-columns: 1fr;
	}
}

/* Section: Tailored Programmes for Incubators + map (light theme; text left, map right) */
.tp-section {
	padding: 100px 0;
	background: #FFFFFF;
}

.tp-grid {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 64px;
	align-items: center;
}

.tp-text {
	text-align: left;
}

.tp-text h2.title {
	margin-bottom: 24px;
}

.tp-text p {
	max-width: 560px;
	margin-bottom: 36px;
	font-size: 18px;
	font-weight: 400;
	line-height: 1.6;
	letter-spacing: 0.4px;
	color: #162A66;
}

.tp-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
}

.tp-map {
	margin: 0;
}

.tp-text p.tp-hint {
	margin: 20px 0 0;
	font-size: 15px;
	line-height: 1.5;
	color: rgba(22, 42, 102, 0.7);
}

@media (max-width: 1023px) {
	.tp-section {
		padding: 70px 0;
	}

	.tp-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 40px;
	}

	.tp-text p {
		max-width: none;
		font-size: 16px;
	}

	.tp-text p.tp-hint {
		font-size: 14px;
	}
}

/* phones: the two buttons share the row equally, and each takes the full width if they wrap (360px) */
@media (max-width: 767px) {
	.tp-buttons .btn {
		flex: 1 1 auto;
	}
}

/* Fit to viewport (section has class pm-fit), laptops and desktops only (>= 1024px wide AND landscape;
   large tablets in portrait, e.g. iPad Pro 13" 1032x1376, keep the normal layout and spacing):
   the section is one viewport tall and the map is sized to fit the screen. */
@media (min-width: 1024px) and (orientation: landscape) {
	.tp-section.pm-fit {
		box-sizing: border-box;
		min-height: 100vh;
		padding: 40px 0;
		display: flex;
		align-items: center;
	}

	.tp-section.pm-fit > .container-large {
		width: 100%;
	}

	.tp-section.pm-fit .pm-stage {
		width: min(100%, calc((100vh - 96px) * 1254 / 1366));
		margin: 0 auto;
	}

	/* fixed header fades out while the section is on screen (toggled by programme-map.js) */
	.pm-header-hidden .main-header {
		opacity: 0;
		visibility: hidden;
		transform: translateY(-16px);
		pointer-events: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pm-popup,
	.pm-dot::before {
		transition: none;
	}
}
