/* Proje haritası (inc/project-map.php, assets/js/project-map.js). Renkler shell.css değişkenlerinden.
 * Solda başlık ve ülke/şehir listesi, sağda harita sahnesi. Bölümün tamamı bir ekrana sığar. */

.motto-sec.motto-pmap {
	padding-top: clamp(28px, 3.2vw, 52px);
	padding-bottom: clamp(28px, 3.2vw, 52px);
}

.motto-pmap__panel {
	display: grid;
	grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
	gap: clamp(20px, 2.6vw, 40px);
	align-items: stretch;
}

/* ---------------------------------------------------------------------------
 * Sol sütun
 * ------------------------------------------------------------------------ */
.motto-pmap__side {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 6px 0;
}

.motto-pmap .motto-pmap__title {
	margin: 10px 0 0;
	color: var(--motto-ink);
	font-size: clamp(26px, 2.4vw, 38px);
	font-weight: 600;
	letter-spacing: -0.025em;
	line-height: 1.1;
}

.motto-pmap__title em {
	color: var(--motto-gold);
	font-style: normal;
}

.motto-sec .motto-pmap__text {
	margin: 12px 0 0;
	color: var(--motto-ink-2);
	font-size: 14.5px;
	line-height: 1.6;
}

.motto-pmap__nav {
	margin-top: clamp(18px, 2vw, 28px);
}

.motto-sec .motto-pmap__label {
	margin: 0 0 10px;
	color: var(--motto-gold);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.motto-pmap__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.motto-pmap .motto-pmap__chip,
.motto-pmap .motto-pmap__chip:hover,
.motto-pmap .motto-pmap__chip:focus {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0;
	padding: 7px 12px;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.035);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
	color: var(--motto-ink-2);
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	cursor: pointer;
	transition: box-shadow 0.25s ease, color 0.25s ease;
}

.motto-pmap .motto-pmap__chip:hover,
.motto-pmap .motto-pmap__chip[aria-expanded="true"] {
	box-shadow: inset 0 0 0 1px rgba(201, 160, 80, 0.7);
	color: var(--motto-ink);
}

.motto-pmap__chip-count {
	color: var(--motto-gold);
	font-size: 12px;
	font-variant-numeric: tabular-nums;
}

.motto-pmap .motto-pmap__back,
.motto-pmap .motto-pmap__back:hover,
.motto-pmap .motto-pmap__back:focus {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 14px;
	padding: 8px 14px 8px 10px;
	border: 0;
	border-radius: 999px;
	background: var(--motto-gold);
	color: #121212;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}

.motto-pmap .motto-pmap__back[hidden] {
	display: none;
}

.motto-pmap__back svg {
	width: 16px;
	height: 16px;
}

.motto-sec .motto-pmap__hint {
	margin: auto 0 0;
	padding-top: 18px;
	color: var(--motto-ink-3);
	font-size: 12.5px;
	line-height: 1.5;
}

/* ---------------------------------------------------------------------------
 * Sahne
 * ------------------------------------------------------------------------ */
.motto-pmap__stage {
	position: relative;
	min-width: 0;
}

.motto-pmap__map {
	position: relative;
	height: clamp(360px, 60vh, 560px);
	overflow: hidden;
	border-radius: 24px;
	background:
		radial-gradient(60% 70% at 50% 50%, rgba(201, 160, 80, 0.06), transparent 70%),
		#0c0c0c;
	box-shadow: inset 0 0 0 1px var(--motto-line);
}

.motto-pmap__canvas {
	position: absolute;
	inset: 0;
	display: block;
	cursor: grab;
	touch-action: pan-y;
}

.motto-pmap__canvas:active {
	cursor: grabbing;
}

.motto-pmap__pins {
	position: absolute;
	z-index: 2;
	inset: 0;
	pointer-events: none;
}

.motto-pmap .motto-pmap__back--stage {
	position: absolute;
	z-index: 4;
	top: 14px;
	left: 14px;
	margin: 0;
}

/* Yakınlaştır / uzaklaştır (yalnız kürede). */
.motto-pmap__zoom {
	position: absolute;
	z-index: 4;
	right: 14px;
	bottom: 14px;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: 12px;
	background: rgba(14, 14, 14, 0.82);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.motto-pmap .motto-pmap__zoom button,
.motto-pmap .motto-pmap__zoom button:hover,
.motto-pmap .motto-pmap__zoom button:focus {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--motto-ink);
	font-family: inherit;
	font-size: 20px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
}

.motto-pmap .motto-pmap__zoom button:hover {
	color: var(--motto-gold);
}

.motto-pmap__zoom button + button {
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.motto-pmap__panel.is-country .motto-pmap__zoom {
	display: none;
}

/* Küredeki ülke işareti uzakta yalnız sayıyı gösterir (adı ipucunda); iyice yakınlaşınca ad da yazılır. */
.motto-pmap__pin--country .motto-pmap__name {
	display: none;
}

.motto-pmap__pin--country .motto-pmap__tag {
	padding: 3px 8px;
}

.motto-pmap__panel.is-near .motto-pmap__pin--country .motto-pmap__name {
	display: inline;
}

/* İpucu: kürede üzerine gelinen ülkenin adı. */
.motto-pmap__tip {
	position: absolute;
	z-index: 3;
	top: 0;
	left: 0;
	padding: 6px 10px;
	border-radius: 8px;
	background: rgba(14, 14, 14, 0.9);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
	color: var(--motto-ink);
	font-size: 12.5px;
	font-weight: 600;
	white-space: nowrap;
	pointer-events: none;
}

.motto-pmap__tip.is-project {
	box-shadow: inset 0 0 0 1px rgba(201, 160, 80, 0.75);
	color: #f3d690;
}

.motto-pmap__tip[hidden] {
	display: none;
}

/* Noktalar: ülke (kürede) ve şehir (ülke görünümünde). */
.motto-pmap .motto-pmap__pin,
.motto-pmap .motto-pmap__pin:hover,
.motto-pmap .motto-pmap__pin:focus {
	position: absolute;
	display: block;
	width: 28px;
	height: 28px;
	margin: -14px 0 0 -14px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--motto-ink);
	cursor: pointer;
	pointer-events: auto;
	-webkit-tap-highlight-color: transparent;
}

.motto-pmap .motto-pmap__pin--country {
	top: 0;
	left: 0;
	transition: opacity 0.3s ease;
	will-change: transform;
}

.motto-pmap__pin:focus-visible {
	outline: 2px solid var(--motto-gold);
	outline-offset: 2px;
}

.motto-pmap__led {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 10px;
	margin: -5px 0 0 -5px;
	border-radius: 50%;
	background: #f3d690;
	box-shadow: 0 0 0 3px rgba(201, 160, 80, 0.35), 0 0 14px 4px rgba(201, 160, 80, 0.6);
	transition: transform 0.4s var(--motto-ease-out), box-shadow 0.4s ease;
}

.motto-pmap__led::after {
	content: "";
	position: absolute;
	inset: -3px;
	border-radius: 50%;
	box-shadow: 0 0 0 1px rgba(232, 199, 126, 0.8);
	opacity: 0;
	animation: motto-pmap-pulse 3.2s ease-out infinite;
	animation-delay: calc(var(--o, 0) * 0.35s + 1s);
}

.motto-pmap__pin.is-hot .motto-pmap__led,
.motto-pmap__pin:hover .motto-pmap__led,
.motto-pmap__pin[aria-expanded="true"] .motto-pmap__led {
	transform: scale(1.35);
	box-shadow: 0 0 0 4px rgba(201, 160, 80, 0.4), 0 0 24px 8px rgba(201, 160, 80, 0.7);
}

.motto-pmap__tag {
	position: absolute;
	top: 50%;
	left: calc(100% - 4px);
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 4px 9px 4px 10px;
	border-radius: 999px;
	background: rgba(12, 12, 12, 0.76);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.2;
	white-space: nowrap;
	transform: translateY(-50%);
	transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.motto-pmap__pin--left .motto-pmap__tag {
	right: calc(100% - 4px);
	left: auto;
}

.motto-pmap__pin.is-hot .motto-pmap__tag,
.motto-pmap__pin:hover .motto-pmap__tag,
.motto-pmap__pin[aria-expanded="true"] .motto-pmap__tag {
	background: rgba(20, 17, 10, 0.92);
	box-shadow: inset 0 0 0 1px rgba(201, 160, 80, 0.7);
}

.motto-pmap__count {
	color: var(--motto-gold);
	font-variant-numeric: tabular-nums;
}

.motto-pmap__hq {
	padding: 2px 6px;
	border-radius: 4px;
	background: rgba(201, 160, 80, 0.16);
	color: var(--motto-gold);
	font-size: 9px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* Şehir noktaları ülke görünümü açılınca sırayla belirir. */
.motto-pmap__pin:not(.motto-pmap__pin--country) {
	opacity: 0;
	transform: scale(0.4);
	transition: opacity 0.4s ease, transform 0.6s var(--motto-ease-out);
	transition-delay: calc(0.5s + var(--o, 0) * 0.12s);
}

.motto-pmap__panel.is-pins .motto-pmap__pin {
	opacity: 1;
	transform: none;
}

/* ---------------------------------------------------------------------------
 * Proje kartı: geniş ekranda noktanın yanında, telefonda haritanın altında.
 * ------------------------------------------------------------------------ */
.motto-pmap__cards {
	position: absolute;
	z-index: 5;
	inset: 0;
	pointer-events: none;
}

.motto-pmap__card {
	position: absolute;
	top: 0;
	left: 0;
	width: min(320px, 100%);
	padding: 14px 10px 10px;
	border-radius: 16px;
	background: rgba(16, 16, 16, 0.95);
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
	box-shadow: inset 0 0 0 1px rgba(201, 160, 80, 0.32), 0 20px 50px rgba(0, 0, 0, 0.55);
	opacity: 0;
	transform: translateY(8px) scale(0.98);
	transition: opacity 0.25s ease, transform 0.4s var(--motto-ease-out);
	pointer-events: auto;
}

.motto-pmap__card.is-open {
	opacity: 1;
	transform: none;
}

.motto-pmap__card[hidden] {
	display: none;
}

.motto-pmap__card-head {
	padding: 0 6px 9px;
	border-bottom: 1px solid var(--motto-line);
}

.motto-sec .motto-pmap__card-place {
	margin: 0;
	color: var(--motto-ink);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.25;
}

.motto-sec .motto-pmap__card-meta {
	margin: 3px 0 0;
	color: var(--motto-gold);
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.motto-pmap__card-list {
	max-height: 300px;
	margin: 6px 0 0;
	padding: 0;
	overflow-y: auto;
	list-style: none;
	overscroll-behavior: contain;
	scrollbar-width: thin;
}

.motto-pmap .motto-pmap__project {
	display: grid;
	grid-template-columns: 46px minmax(0, 1fr) 14px;
	align-items: center;
	gap: 10px;
	padding: 6px;
	border-radius: 10px;
	color: var(--motto-ink);
	text-decoration: none;
	transition: background-color 0.25s ease;
}

.motto-pmap .motto-pmap__project:hover,
.motto-pmap .motto-pmap__project:focus-visible {
	background: rgba(255, 255, 255, 0.055);
	color: var(--motto-ink);
}

.motto-pmap__thumb {
	display: block;
	width: 46px;
	height: 46px;
	overflow: hidden;
	border-radius: 8px;
	background: #1d1d1d;
}

.motto-pmap__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.motto-pmap__project-body {
	min-width: 0;
}

.motto-pmap__project-title {
	display: block;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
}

.motto-pmap__project-meta {
	display: block;
	margin-top: 2px;
	color: var(--motto-ink-3);
	font-size: 11.5px;
	line-height: 1.3;
}

.motto-pmap__project svg {
	width: 14px;
	height: 14px;
	color: var(--motto-gold);
	opacity: 0.55;
}

.motto-pmap__project:hover svg {
	opacity: 1;
}

/* Betik yoksa kartlar liste olarak görünür, harita sahnesi gizlenir. */
html:not(.motto-js) .motto-pmap__map {
	height: auto;
	overflow: visible;
	background: none;
	box-shadow: none;
}

html:not(.motto-js) .motto-pmap__canvas {
	display: none;
}

html:not(.motto-js) .motto-pmap__cards {
	position: static;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 12px;
}

html:not(.motto-js) .motto-pmap__card[hidden] {
	position: static;
	display: block;
	width: auto;
	opacity: 1;
	transform: none;
}

@keyframes motto-pmap-pulse {
	0% {
		opacity: 0.9;
		transform: scale(1);
	}

	70%,
	100% {
		opacity: 0;
		transform: scale(3.2);
	}
}

@media (max-width: 1023px) {
	.motto-pmap__panel {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}

	.motto-pmap__side {
		padding: 0;
	}

	.motto-pmap__side .motto-pmap__back,
	.motto-sec .motto-pmap__hint {
		display: none;
	}

	.motto-pmap__map {
		height: clamp(300px, 62vw, 460px);
	}
}

@media (min-width: 1024px) {
	.motto-pmap .motto-pmap__back--stage {
		display: none;
	}
}

@media (max-width: 767px) {
	.motto-pmap__map {
		height: min(92vw, 380px);
		border-radius: 18px;
	}

	/* Telefonda etikette yalnızca sayı kalır; adlar listede. */
	.motto-pmap__pin:not(.motto-pmap__pin--country) .motto-pmap__name,
	.motto-pmap__hq {
		display: none;
	}

	.motto-pmap__pin:not(.motto-pmap__pin--country) .motto-pmap__tag {
		gap: 0;
		padding: 3px 7px;
		font-size: 11px;
	}

	/* Telefonda kart haritanın altında açılır; harita görünür kalır. */
	.motto-pmap__cards {
		position: static;
	}

	.motto-pmap__card {
		position: relative;
		width: auto;
		margin-top: 12px;
	}

	.motto-pmap__card-list {
		max-height: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.motto-pmap__led::after {
		animation: none;
	}

	.motto-pmap__pin:not(.motto-pmap__pin--country),
	.motto-pmap__card {
		transition: none;
	}
}
