/* Bottom Navigation Bar Styles */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 9vmax;
  background-color: #03370c;
  border-top: solid 1px #1f742e;
  z-index: 1000;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
  padding: 0;
  margin: 0;
}

/* Scroll-driven fade-out and slide-up animation for bottom nav */
div#bottomNav {
  animation: fadeOutSlideDownOnScroll linear;
  animation-timeline: scroll(body);
  animation-range: 0px 10px;
}

@keyframes fadeOutSlideDownOnScroll {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(100px);
  }
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-decoration: none;
  padding: 8px 12px;
  transition: opacity 0.2s ease, transform 0.2s ease;
  opacity: 1;
  flex: 1;
  min-width: 0;
}

.bottom-nav-item:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.bottom-nav-item.activeBNav {
  opacity: 1;
  color: #ffffff;
}

.bottom-nav-item.activeBNav i {
  transform: scale(1.1);
}

.bottom-nav-item i {
  font-size: 24px;
  margin-bottom: 4px;
  transition: transform 0.2s ease;
  display: block;
}

.bottom-nav-item span {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Adjust main content padding to account for bottom nav */
main {
  padding-bottom: 80px !important; /* Nav height (70px) + margin (10px) */
}

/* Smooth page transition (optional enhancement) */
body {
  transition: opacity 0.2s ease-in-out;
}

body.page-loading {
  opacity: 0.8;
}

body.page-loaded {
  opacity: 1;
}
