/* ── BA Map Points ─────────────────────────────────────────────────────────── */

.ba-map-points {
	width: 100%;
}

.ba-map-points__canvas {
	position: relative;
	display: inline-block;
	width: 100%;
	line-height: 0;
}

.ba-map-points__bg {
	width: 100%;
	height: auto;
	display: block;
}

/* ── Punto ─────────────────────────────────────────────────────────────────── */

.ba-map-points__point {
	position: absolute;
	transform: translate(-50%, -50%);
	z-index: 10;
}

.ba-map-points__point.is-open {
	z-index: 100;
}

.ba-map-points__trigger {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	display: block;
	line-height: 0;
}

.ba-map-points__trigger:focus-visible {
	outline: 2px solid #0072CE;
	outline-offset: 2px;
	border-radius: 50%;
}

/* Íconos: mostrar cerrado por defecto, activo cuando está abierto */
.ba-map-points__icon {
	display: block;
}

.ba-map-points__icon--active {
	display: none;
}

.ba-map-points__point.is-open .ba-map-points__icon--closed {
	display: none;
}

.ba-map-points__point.is-open .ba-map-points__icon--active {
	display: block;
}

/* ── Popup ─────────────────────────────────────────────────────────────────── */

.ba-map-points__popup {
	position: absolute;
	background: #fff;
	border-radius: 24px;
	border: 1px solid #504C4C33;
	padding: 20px 30px;
	width: 400px;
	z-index: 20;
	line-height: 1.4;
}

.ba-map-points__popup[hidden] {
	display: none;
}

/* Flecha base */
.ba-map-points__popup::after {
	content: '';
	position: absolute;
	border: 6px solid transparent;
}

/* Derecha + sube: popup a la derecha del ícono, borde inferior alineado con el ícono */
.ba-map-points__popup--top-right {
	left: calc(100% + 8px);
	bottom: 0;
}
.ba-map-points__popup--top-right::after {
	right: 100%;
	bottom: 10px;
	border-right-color: #fff;
}

/* Izquierda + sube: popup a la izquierda del ícono, borde inferior alineado con el ícono */
.ba-map-points__popup--top-left {
	right: calc(100% + 8px);
	bottom: 0;
}
.ba-map-points__popup--top-left::after {
	left: 100%;
	bottom: 10px;
	border-left-color: #fff;
}

/* Derecha + baja: popup a la derecha del ícono, borde superior alineado con el ícono */
.ba-map-points__popup--bottom-right {
	left: calc(100% + 8px);
	top: 0;
}
.ba-map-points__popup--bottom-right::after {
	right: 100%;
	top: 10px;
	border-right-color: #fff;
}

/* Izquierda + baja: popup a la izquierda del ícono, borde superior alineado con el ícono */
.ba-map-points__popup--bottom-left {
	right: calc(100% + 8px);
	top: 0;
}
.ba-map-points__popup--bottom-left::after {
	left: 100%;
	top: 10px;
	border-left-color: #fff;
}

/* ── Contenido del popup ───────────────────────────────────────────────────── */

.ba-map-points__popup-title {
	font-size: 24px;
	line-height: 28px;
	font-weight: 500;
	margin: 0 0 12px 0;
	background: linear-gradient(135deg, #B1D786, #89B7DD, #B1D786, #89B7DD);
	background-size: 300% 300%;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	animation: ba-map-title-gradient 8s ease infinite;
}

@keyframes ba-map-title-gradient {
	0%   { background-position: 0% 0%; }
	50%  { background-position: 100% 100%; }
	100% { background-position: 0% 0%; }
}

@media (prefers-reduced-motion: reduce) {
	.ba-map-points__popup-title {
		animation: none;
		background-position: 0% 0%;
	}
}

.ba-map-points__popup-data {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ba-map-points__popup-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 18px;
	color: #333;
}

.ba-map-points__popup-item svg {
	flex-shrink: 0;
}

.ba-map-points__popup-item a {
	color: #333;
	text-decoration: none;
}

.ba-map-points__popup-item a:hover {
	color: #0072CE;
	text-decoration: underline;
}

/* ── Botón web ─────────────────────────────────────────────────────────────── */

.ba-map-points__popup-web {
	padding-top: 12px;
}

.ba-map-points__popup-web-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #0A71B4;
	font-size: 18px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
}

.ba-map-points__popup-web-btn:hover {
	text-decoration: underline;
}

/* ── Tablet ────────────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
	.ba-map-points__icon svg {
		width: 24px;
		height: 24px;
	}

	.ba-map-points__popup--tablet-top-right    { left: calc(100% + 8px); right: auto; bottom: 0; top: auto; }
	.ba-map-points__popup--tablet-top-left     { right: calc(100% + 8px); left: auto; bottom: 0; top: auto; }
	.ba-map-points__popup--tablet-bottom-right { left: calc(100% + 8px); right: auto; top: 0; bottom: auto; }
	.ba-map-points__popup--tablet-bottom-left  { right: calc(100% + 8px); left: auto; top: 0; bottom: auto; }

	.ba-map-points__popup--tablet-top-right::after,
	.ba-map-points__popup--tablet-bottom-right::after { right: 100%; left: auto; border-right-color: #fff; border-left-color: transparent; }
	.ba-map-points__popup--tablet-top-left::after,
	.ba-map-points__popup--tablet-bottom-left::after  { left: 100%; right: auto; border-left-color: #fff; border-right-color: transparent; }

	.ba-map-points__popup--tablet-top-right::after,
	.ba-map-points__popup--tablet-top-left::after     { bottom: 10px; top: auto; }
	.ba-map-points__popup--tablet-bottom-right::after,
	.ba-map-points__popup--tablet-bottom-left::after  { top: 10px; bottom: auto; }

	.ba-map-points__popup {
		width: 300px;
		padding: 16px 22px;
	}

	.ba-map-points__popup-title {
		font-size: 18px;
		line-height: 22px;
	}

	.ba-map-points__popup-item,
	.ba-map-points__popup-web-btn {
		font-size: 14px;
	}

	.ba-map-points__popup-item svg {
		width: 26px;
		height: 26px;
	}
}

/* ── Móvil ─────────────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
	.ba-map-points__mobile-overlay {
		position: absolute;
		top: 20px;
		left: 20px;
		right: 20px;
		z-index: 200;
		background: #fff;
		border-radius: 24px;
		border: 1px solid #504C4C33;
		padding: 16px 22px;
		line-height: 1.4;
	}

	.ba-map-points__mobile-overlay[hidden] {
		display: none;
	}

	.ba-map-points__icon svg {
		width: 15px;
		height: 15px;
	}
}

/* ── Reducir movimiento ────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
	.ba-map-points__popup {
		transition: none;
	}
}
