/**
 * Explore map — frontend.
 */

.m306-map {
	--m306-map-ink: #182220;
	--m306-map-line: #e6e6e6;
	--m306-map-mint: #a7d9cf;
	--m306-map-font-title: 'Cinzel', 'Times New Roman', serif;
	--m306-map-font: 'Fahkwang', 'Times New Roman', serif;

	width: 100%;
	background: #fff;
	box-sizing: border-box;
}

.m306-map *,
.m306-map *::before,
.m306-map *::after {
	box-sizing: border-box;
}

.m306-map__shell {
	position: relative;
	width: 100%;
	min-height: clamp(480px, 70vh, 760px);
	overflow: hidden;
	background: #ececec;
}

.m306-map__canvas {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: 100%;
	height: 100%;
}

.m306-map__menu {
	position: absolute;
	z-index: 5;
	top: 56px;
	/* Clear Leaflet +/- zoom (top-left ~10px + ~34px control) */
	left: 96px;
	bottom: auto;
	width: min(320px, calc(100% - 120px));
	height: auto;
	max-height: calc(100% - 80px);
	overflow: auto;
	background: #fff;
	padding: 28px 35px 70px !important;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
	border-radius: 0 !important;
	box-sizing: border-box !important;
}

.m306-map__title {
	margin: 0 0 18px;
	padding: 0;
	font-family: var(--m306-map-font-title);
	font-size: 28px;
	font-weight: 400;
	letter-spacing: 0.2em;
	line-height: 1.15;
	text-align: center;
	text-transform: uppercase;
	color: #182220;
}

.m306-map__list,
.m306-map .m306-map__list,
.elementor .m306-map__list {
	list-style: none;
	margin: 0 !important;
	padding: 0 !important;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.m306-map__list li {
	margin: 0;
	border-top: 1px solid var(--m306-map-line);
}

.m306-map__list li:last-child {
	border-bottom: 1px solid var(--m306-map-line);
}

.m306-map__item,
.m306-map button.m306-map__item,
.elementor .m306-map__item,
.elementor button.m306-map__item {
	appearance: none;
	-webkit-appearance: none;
	width: 100%;
	max-width: 100%;
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0;
	padding: 14px 12px !important;
	border: none !important;
	border-radius: 0 !important;
	background: transparent !important;
	background-color: transparent !important;
	cursor: pointer;
	text-align: left;
	color: #182220 !important;
	font-family: var(--m306-map-font) !important;
	font-size: 13px !important;
	font-weight: 400 !important;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	box-shadow: none !important;
	outline: none !important;
	box-sizing: border-box !important;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.m306-map__item:hover,
.m306-map__item:focus,
.m306-map__item:focus-visible,
.m306-map__item.is-active,
.m306-map button.m306-map__item:hover,
.m306-map button.m306-map__item:focus,
.m306-map button.m306-map__item.is-active,
.elementor .m306-map__item:hover,
.elementor .m306-map__item:focus,
.elementor .m306-map__item.is-active,
.elementor button.m306-map__item:hover {
	background: var(--m306-map-mint) !important;
	background-color: var(--m306-map-mint) !important;
	color: #182220 !important;
	font-weight: 400 !important;
	box-shadow: none !important;
	outline: none !important;
	border-color: transparent !important;
}

.m306-map__item-icon {
	display: inline-flex;
	width: 22px;
	height: 22px;
	flex: 0 0 auto;
	color: #182220;
}

.m306-map__item-icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

.m306-map__item-label {
	flex: 1 1 auto;
}

/* Custom Leaflet markers — proper teardrop pin (no default div-icon box) */
.m306-map .leaflet-div-icon.m306-map-pin,
.m306-map-pin.leaflet-div-icon {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
}

.m306-map-pin {
	width: 36px !important;
	height: 46px !important;
	margin-left: -18px !important;
	margin-top: -46px !important;
	background: transparent !important;
	border: none !important;
}

.m306-map-pin__body {
	position: relative;
	width: 36px;
	height: 46px;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.m306-map-pin__shape {
	position: absolute;
	top: 0;
	left: 3px;
	width: 30px;
	height: 30px;
	background: #182220;
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	transform-origin: center center;
}

.m306-map-pin__icon {
	position: absolute;
	z-index: 1;
	top: 6px;
	left: 50%;
	transform: translateX(-50%);
	width: 14px;
	height: 14px;
	color: #fff;
	line-height: 0;
	pointer-events: none;
}

.m306-map-pin__icon svg {
	width: 100%;
	height: 100%;
	display: block;
	stroke: currentColor;
}

.m306-map-pin.is-dimmed {
	opacity: 0.25;
	pointer-events: none;
}

.m306-map-pin.is-active .m306-map-pin__shape {
	background: #2f5b54;
}

/* Apartment building pin — larger, mint, with the 306 logo */
.m306-map-pin.m306-map-pin--home {
	width: 52px !important;
	height: 66px !important;
	margin-left: -26px !important;
	margin-top: -66px !important;
}

.m306-map-pin--home .m306-map-pin__body {
	width: 52px;
	height: 66px;
	filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3));
}

.m306-map-pin--home .m306-map-pin__shape {
	left: 4px;
	width: 44px;
	height: 44px;
	background: #a7d9cf;
	border: 2px solid #182220;
}

.m306-map-pin--home .m306-map-pin__logo {
	position: absolute;
	z-index: 1;
	top: 9px;
	left: 50%;
	transform: translateX(-50%);
	width: 32px !important;
	height: auto !important;
	max-width: none !important;
	/* White logo → ink so it reads on the mint pin */
	filter: brightness(0) saturate(100%);
	opacity: 0.88;
	pointer-events: none;
}

.m306-map .leaflet-container {
	font-family: var(--m306-map-font);
	background: #e8eceb;
}

.m306-map .leaflet-popup-content-wrapper,
.m306-map .leaflet-popup-tip {
	background: #a7d9cf !important;
	color: #182220;
	border-radius: 0 !important;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.m306-map .leaflet-popup-content-wrapper {
	border-radius: 0 !important;
}

.m306-map .leaflet-popup-content {
	margin: 14px 16px;
	font-family: var(--m306-map-font);
	color: #182220;
}

.m306-map .leaflet-popup-close-button {
	color: #182220 !important;
}

.m306-map-popup__title {
	margin: 0 0 6px;
	font-family: var(--m306-map-font-title);
	font-size: 16px;
	font-weight: 400;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.m306-map-popup__desc {
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 300;
	line-height: 1.45;
}

.m306-map-popup__link {
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #182220;
	text-decoration: underline;
}

@media (max-width: 720px) {
	.m306-map__shell {
		display: flex;
		flex-direction: column;
		min-height: 0;
		height: auto;
		overflow: visible;
	}

	/* Horizontal carousel bar above the map (replaces side desktop panel) */
	.m306-map__menu {
		position: relative !important;
		top: auto !important;
		left: auto !important;
		right: auto !important;
		bottom: auto !important;
		order: -1;
		width: 100% !important;
		max-width: none !important;
		height: auto !important;
		max-height: none !important;
		margin: 0;
		padding: 20px 0 0 !important;
		box-shadow: none !important;
		background: #fff;
		overflow: visible;
		z-index: 2;
	}

	.m306-map__title {
		font-size: 22px;
		padding: 0 6vw 32px;
		margin: 0;
		text-align: center;
		letter-spacing: 0.2em;
	}

	.m306-map__list,
	.m306-map .m306-map__list,
	.elementor .m306-map__list {
		display: flex !important;
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: stretch;
		margin: 0 !important;
		padding: 0 !important;
		width: 100%;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		-ms-overflow-style: none;
		touch-action: pan-x;
		cursor: grab;
		border-top: 1px solid var(--m306-map-line);
		border-bottom: 1px solid var(--m306-map-line);
	}

	.m306-map__list::-webkit-scrollbar {
		display: none;
		width: 0;
		height: 0;
	}

	.m306-map__list:active {
		cursor: grabbing;
	}

	.m306-map__list li {
		flex: 0 0 auto;
		margin: 0;
		border-top: none !important;
		border-bottom: none !important;
		border-right: 1px solid var(--m306-map-line);
	}

	.m306-map__list li:last-child {
		border-right: none !important;
		border-bottom: none !important;
	}

	.m306-map__item,
	.m306-map button.m306-map__item,
	.elementor .m306-map__item,
	.elementor button.m306-map__item {
		flex-direction: column;
		justify-content: center;
		align-items: center;
		gap: 10px;
		min-width: 110px;
		height: 100%;
		padding: 16px 22px !important;
		text-align: center;
		white-space: nowrap;
	}

	.m306-map__item-icon {
		width: 28px;
		height: 28px;
	}

	.m306-map__item-label {
		flex: 0 0 auto;
		font-size: 11px !important;
		letter-spacing: 0.06em;
	}

	.m306-map__canvas {
		position: relative !important;
		inset: auto !important;
		order: 1;
		width: 100%;
		height: min(70vh, 560px);
		min-height: 420px;
		z-index: 1;
	}
}
