@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;500;600&display=swap');
@import url(//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css);

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: "Raleway", sans-serif;
}

body {
	display: flex;
	flex-direction: column;
	/* apila en columna */
	min-height: 100vh;
	background-color: white;
}

html,
body {
	height: 100%;
}


#din_prin_div {
    width: 100%;
    height: 100%;
    flex: 1;
    z-index: 0;
    padding-bottom: 80px; /* 👈 espacio para el nav flotante */
    box-sizing: border-box;
}

#map2 {
	/*width: 100%;
  height: 100%;*/
	width: 100%;
	height: 100%;
	flex: 1;
	z-index: 0;
	/* asegura que quede detrás */
}

nav {
    width: 100%;
    height: 80px;
    background-color: #cccccc;
    position: fixed;   /* 👈 ahora fijo */
    bottom: 0;         /* 👈 pegado al fondo */
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;     /* 👈 encima del mapa/tabla */
}

.nav-list {
	display: flex;
	/*width: 350px;*/
	width: auto;
}

.nav-item {
	position: relative;
	list-style: none;
	width: 70px;
	height: 70px;
	z-index: 1;
}

.nav-item a {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	font-weight: 600
}

.nav-item .icon {
	position: relative;
	display: block;
	line-height: 60px;
	font-size: 1.5em;
	transition: .5s;
	color: black
}

.nav-item .text {
	position: absolute;
	color: black;
	font-weight: 500;
	font-size: 0.85em;
	opacity: 0;
	transition: .5s;
	transform: translateY(20px)
}

/* ACTIVE state */
.nav-item.active .icon {
	transform: translateY(-35px)
}

.nav-item.active .text {
	opacity: 1;
	transform: translateY(10px);
}

.indicator {
	position: absolute;
	top: -55%;
	width: 70px;
	height: 70px;
	background-color: #5cab5c;
	border-radius: 50%;
	border: 6px solid white;
	transition: .5s
}

.indicator:before {
	content: '';
	position: absolute;
	top: 56%;
	left: -21px;
	width: 20px;
	height: 20px;
	background-color: transparent;
	border-top-right-radius: 20px;
	box-shadow: 1px -10px 0 0 rgba(255, 255, 255, 0)
}

.indicator:after {
	content: '';
	position: absolute;
	top: 56%;
	right: -21px;
	width: 20px;
	height: 20px;
	background-color: transparent;
	border-top-left-radius: 20px;
	box-shadow: -1px -10px 0 0 rgba(255, 255, 255, 0)
}



/* Moving the indicator to the active link */
/* 70px because each item is 70px wide */
.nav-item:nth-child(1).active~.indicator {
	transform: translate(calc(70px * 0))
}

.nav-item:nth-child(2).active~.indicator {
	transform: translate(calc(70px * 1))
}

.nav-item:nth-child(3).active~.indicator {
	transform: translate(calc(70px * 2))
}

.nav-item:nth-child(4).active~.indicator {
	transform: translate(calc(70px * 3))
}

.nav-item:nth-child(5).active~.indicator {
	transform: translate(calc(70px * 4))
}

.pulsing-marker {
	position: relative;
	width: var(--marker-size);
	height: var(--marker-size);
	background: var(--marker-color);
	border-radius: 50%;
	box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
	transform: translate(-50%, -50%);
	z-index: 1000;
	/* asegura que quede sobre el heatmap */
}

.pulsing-marker::after {
	content: "";
	position: absolute;
	width: var(--marker-size);
	height: var(--marker-size);
	border-radius: 50%;
	background: var(--marker-color);
	opacity: 0.5;
	top: 0;
	left: 0;
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0% {
		transform: scale(1);
		opacity: 0.7;
	}

	100% {
		transform: scale(var(--pulse-size));
		opacity: 0;
	}
}


/* Ajustes para móviles */
@media (max-width: 600px) {
	#map2 {
		height: calc(100vh - 90px);
		/* resta la altura real del nav en móvil */
	}

	#din_prin_div {
		height: calc(100vh - 90px);
	}

	nav {
		height: 90px;
		/* más alto para dar espacio */
	}

	.nav-item {
		width: 80px;
		/* más ancho que los 70px originales */
		height: 80px;
	}

	.nav-item .icon {
		line-height: 40px;
		font-size: 2em;
		/* íconos más grandes */
	}

	.nav-item .text {
		font-size: 1em;
		/* texto más legible */
		transform: translateY(18px);
	}

	.indicator {
		width: 80px;
		height: 80px;
		top: -55%;
		border-width: 6px;
	}

	/* Ajustar desplazamiento del indicador según nuevo ancho */
	.nav-item:nth-child(1).active~.indicator {
		transform: translateX(calc(80px * 0));
	}

	.nav-item:nth-child(2).active~.indicator {
		transform: translateX(calc(80px * 1));
	}

	.nav-item:nth-child(3).active~.indicator {
		transform: translateX(calc(80px * 2));
	}

	.nav-item:nth-child(4).active~.indicator {
		transform: translateX(calc(80px * 3));
	}

	.nav-item:nth-child(5).active~.indicator {
		transform: translateX(calc(80px * 4));
	}


}