/* ==========================================================================
   MAPA INTERACTIVO BVB - VERSIÓN DEFINITIVA
   Sincronizado con map.js (usa clase .is-open) y map.php (usa --x, --y)
   ========================================================================== */

/* ---------- SECCIÓN ---------- */
.bvb-map-section {
	padding: 40px 0 60px;
	background: linear-gradient(180deg, #ffffff 0%, #faf8f3 100%);
}

.bvb-map-section--cream {
	background: #faf8f3;
}

/* ---------- GRID ---------- */
.bvb-map-grid {
	display: grid;
	grid-template-columns: 1fr 1.3fr;
	gap: 60px;
	align-items: center;
}

/* ---------- COPY (texto + botón) ---------- */
.bvb-map-copy__title {
	font-family: 'Roboto Serif', Georgia, serif;
	font-size: clamp(1.8rem, 3vw, 2.5rem);
	font-weight: 400;
	line-height: 1.2;
	color: #1a1a1a;
	margin: 0 0 30px 0;
}

.bvb-map-copy__cta {
	margin: 0;
}

/* ---------- BOTÓN DORADO ---------- */
.bvb-btn--gold-dark {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 16px 32px;
	background: linear-gradient(135deg, #b8860b 0%, #daa520 100%);
	color: #ffffff;
	text-decoration: none;
	font-family: 'Roboto', sans-serif;
	font-weight: 600;
	font-size: 0.85rem;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	border: none;
	cursor: pointer;
	transition: all 0.4s ease;
	box-shadow: 0 4px 20px rgba(184, 134, 11, 0.3);
}

.bvb-btn--gold-dark:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 30px rgba(184, 134, 11, 0.4);
}

.bvb-btn__plus {
	font-weight: 700;
	margin-left: 4px;
}

/* ---------- STAGE (contenedor del mapa) ---------- */
.bvb-map-stage {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1.1;
	max-height: 700px;
}

.bvb-map-stage__base {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
}

/* ---------- CAPA DE MARCADORES ---------- */
.bvb-map-markers {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
	pointer-events: none;
}

/* ---------- MARCADOR INDIVIDUAL ---------- */
/* FIX: --x y --y ya vienen con % desde PHP, usamos var() directo */
.bvb-map-marker {
	position: absolute;
	left: var(--x);
	top: var(--y);
	transform: translate(-50%, -50%);
	pointer-events: auto;
	opacity: 0;
	animation: bvb-marker-appear 0.6s ease var(--delay, 0ms) forwards;
}

@keyframes bvb-marker-appear {
	from {
		opacity: 0;
		transform: translate(-50%, -50%) scale(0);
	}
	to {
		opacity: 1;
		transform: translate(-50%, -50%) scale(1);
	}
}

/* ---------- HIT (área clickeable) ---------- */
.bvb-map-marker__hit {
	position: relative;
	width: 28px;
	height: 28px;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.3s ease;
}

.bvb-map-marker__hit:hover {
	transform: scale(1.15);
}

/* ---------- PUNTO DORADO ---------- */
.bvb-map-marker__dot {
	display: block;
	width: 18px;
	height: 18px;
	background: linear-gradient(135deg, #daa520 0%, #b8860b 100%);
	border-radius: 50%;
	border: 3px solid #ffffff;
	box-shadow: 0 0 0 0 rgba(184, 134, 11, 0.7);
	animation: bvb-pulse 2s infinite;
}

@keyframes bvb-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(184, 134, 11, 0.7); }
	70%  { box-shadow: 0 0 0 14px rgba(184, 134, 11, 0); }
	100% { box-shadow: 0 0 0 0 rgba(184, 134, 11, 0); }
}

/* ---------- LÍNEA CONECTORA ---------- */
.bvb-map-marker__tail {
	position: absolute;
	left: 22px;
	top: 50%;
	width: 110px;
	height: 2px;
	transform: translateY(-50%);
	pointer-events: none;
	opacity: 0;
	animation: bvb-tail-appear 0.5s ease calc(var(--delay, 0ms) + 200ms) forwards;
}

@keyframes bvb-tail-appear {
	from {
		opacity: 0;
		width: 0;
	}
	to {
		opacity: 0.6;
		width: 110px;
	}
}

.bvb-map-marker__tail svg {
	width: 100%;
	height: 100%;
}

.bvb-map-marker__tail svg line {
	stroke: #b8860b;
	stroke-width: 2;
	stroke-dasharray: 6, 4;
}

/* ---------- ETIQUETA DEL PAÍS ---------- */
.bvb-map-marker__label {
	position: absolute;
	left: 140px;
	top: 50%;
	transform: translateY(-50%);
	font-family: 'Roboto Serif', Georgia, serif;
	font-size: 1.1rem;
	font-weight: 400;
	color: #1a1a1a;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	animation: bvb-label-appear 0.5s ease calc(var(--delay, 0ms) + 300ms) forwards;
}

@keyframes bvb-label-appear {
	from {
		opacity: 0;
		transform: translateY(-50%) translateX(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(-50%) translateX(0);
	}
}

/* ---------- CARD (tooltip) ---------- */
.bvb-map-marker__card {
	position: absolute;
	bottom: calc(100% + 20px);
	left: 50%;
	transform: translateX(-50%) translateY(10px);
	background: #ffffff;
	padding: 25px 30px;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
	min-width: 280px;
	z-index: 100;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}

/* Estado activo (sincronizado con map.js que usa .is-open) */
.bvb-map-marker.is-open .bvb-map-marker__card {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

.bvb-map-marker__office {
	font-family: 'Roboto Serif', Georgia, serif;
	font-size: 1.3rem;
	font-weight: 600;
	color: #1a1a1a;
	margin: 0 0 15px 0;
	padding-bottom: 15px;
	border-bottom: 2px solid #daa520;
}

.bvb-map-marker__row {
	margin: 10px 0;
	font-family: 'Roboto', sans-serif;
	font-size: 0.95rem;
	color: #555;
}

.bvb-map-marker__row a {
	color: #b8860b;
	text-decoration: none;
	transition: color 0.3s ease;
}

.bvb-map-marker__row a:hover {
	color: #daa520;
	text-decoration: underline;
}

.bvb-map-marker__close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 32px;
	height: 32px;
	background: #f5f5f5;
	border: none;
	border-radius: 50%;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: #999;
	transition: all 0.3s ease;
}

.bvb-map-marker__close:hover {
	background: #e0e0e0;
	color: #333;
	transform: rotate(90deg);
}

/* ---------- LISTA INFERIOR ---------- */
.bvb-map-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 30px;
	list-style: none;
	margin: 60px 0 0 0;
	padding: 0;
}

.bvb-map-list__item {
	display: flex;
	gap: 20px;
	padding: 30px;
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bvb-map-list__item:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.bvb-map-list__dot {
	width: 12px;
	height: 12px;
	background: linear-gradient(135deg, #daa520 0%, #b8860b 100%);
	border-radius: 50%;
	flex-shrink: 0;
	margin-top: 8px;
}

.bvb-map-list__body {
	flex: 1;
}

.bvb-map-list__country {
	font-family: 'Roboto Serif', Georgia, serif;
	font-size: 1.3rem;
	font-weight: 600;
	color: #1a1a1a;
	margin: 0 0 5px 0;
}

.bvb-map-list__office {
	font-family: 'Roboto', sans-serif;
	font-size: 0.95rem;
	color: #666;
	margin: 0 0 10px 0;
}

.bvb-map-list__row {
	margin: 5px 0;
	font-family: 'Roboto', sans-serif;
	font-size: 0.9rem;
}

.bvb-map-list__row a {
	color: #b8860b;
	text-decoration: none;
}

.bvb-map-list__row a:hover {
	text-decoration: underline;
}

/* ---------- RESPONSIVE TABLET ---------- */
@media (max-width: 1024px) {
	.bvb-map-grid {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.bvb-map-marker__label,
	.bvb-map-marker__tail {
		display: none;
	}

	.bvb-map-marker__card {
		left: 10px;
		right: 10px;
		transform: translateX(0) translateY(10px);
		min-width: auto;
		max-width: none;
	}

	.bvb-map-marker.is-open .bvb-map-marker__card {
		transform: translateX(0) translateY(0);
	}
}

/* ---------- RESPONSIVE MÓVIL ---------- */
@media (max-width: 768px) {
	.bvb-map-section {
		padding: 30px 0 40px;
	}

	.bvb-map-stage {
		aspect-ratio: 3 / 4;
		max-height: 500px;
	}

	.bvb-map-marker__hit {
		width: 24px;
		height: 24px;
	}

	.bvb-map-marker__dot {
		width: 14px;
		height: 14px;
		border-width: 2px;
	}

	.bvb-map-marker__card {
		bottom: auto;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%) scale(0.9);
		min-width: 260px;
		max-width: 90vw;
		padding: 20px;
	}

	.bvb-map-marker.is-open .bvb-map-marker__card {
		transform: translate(-50%, -50%) scale(1);
	}

	.bvb-map-marker__office {
		font-size: 1.1rem;
		margin-bottom: 12px;
		padding-bottom: 12px;
	}

	.bvb-map-marker__row {
		font-size: 0.9rem;
		margin: 8px 0;
	}

	.bvb-map-marker__close {
		width: 28px;
		height: 28px;
		font-size: 1.2rem;
	}

	.bvb-map-list {
		grid-template-columns: 1fr;
		gap: 20px;
		margin-top: 40px;
	}

	.bvb-map-list__item {
		padding: 20px;
	}
}

/* ---------- RESPONSIVE MÓVIL PEQUEÑO ---------- */
@media (max-width: 480px) {
	.bvb-map-copy__title {
		font-size: 1.5rem;
		margin-bottom: 20px;
	}

	.bvb-btn--gold-dark {
		padding: 14px 24px;
		font-size: 0.8rem;
	}

	.bvb-map-stage {
		aspect-ratio: 2 / 3;
		max-height: 400px;
	}

	.bvb-map-marker__card {
		min-width: 240px;
		padding: 18px;
	}

	.bvb-map-marker__office {
		font-size: 1rem;
	}

	.bvb-map-marker__row {
		font-size: 0.85rem;
	}
}