.mobile-nav-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  pointer-events: none;
  background: #001E46;
  border-top: 1px solid rgba(175, 223, 249, 0.18);
}

.mobile-nav {
  position: relative;
  height: 68px;
  padding-bottom: env(safe-area-inset-bottom);
  background: #001E46;
  border-top: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1030;
  pointer-events: auto;
  box-shadow: 0 -8px 26px rgba(0, 0, 0, 0.34);
}

.mobile-lang-switcher {
  position: absolute;
  right: 8px;
  bottom: calc(68px + env(safe-area-inset-bottom) + 8px);
  background: rgba(0, 30, 70, 0.97);
  border: 1px solid rgba(175, 223, 249, 0.28);
  border-radius: 10px;
  padding: 5px 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
}

.mobile-lang-switcher .lang-switcher-label {
  display: none;
}

.mobile-lang-switcher .lang-switcher-list {
  border: 0;
  background: transparent;
  padding: 0;
  gap: 0.16rem;
}

.mobile-lang-switcher .lang-switcher-btn {
  min-width: 34px;
  min-height: 30px;
  padding: 0.2rem 0.25rem;
}

.mobile-lang-switcher .lang-switcher-btn .lang-code {
  display: none;
}

.mobile-nav a,
.mobile-nav .mnav-tab {
  flex: 1;
  height: 100%;
  text-align: center;
  color: rgba(175, 223, 249, 0.65);
  text-decoration: none;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: color 0.2s ease, background 0.2s ease;
  position: relative;
  border-top: 2px solid transparent;
}

.mobile-nav a.active,
.mobile-nav a:hover,
.mobile-nav .mnav-tab.active,
.mobile-nav .mnav-tab:hover {
  color: #ffffff;
  background: transparent;
  border-top-color: #AFDFF9;
}

/* Active tab icon wrap pill */
.mobile-nav .mnav-tab.active .mnav-icon-wrap {
  background: rgba(0, 75, 156, 0.35);
  border-radius: 8px;
}

.mobile-nav a:focus-visible,
.mobile-nav .mnav-tab:focus-visible {
  outline: 2px solid #AFDFF9;
  outline-offset: 2px;
  border-top-color: #AFDFF9;
}

.mobile-nav svg {
  width: 22px;
  height: 22px;
  display: block;
  margin: 0 auto 2px;
  fill: currentColor;
}

/* Bootstrap Icons font support */
.mobile-nav .bi {
  font-size: 22px;
  line-height: 1;
  display: block;
  margin: 0 auto 2px;
}

/* Hide-on-scroll transition */
.mobile-nav-wrap {
  transition: transform 0.25s ease;
}

.mobile-nav-wrap.mnav-hidden {
  transform: translateY(100%);
}

@media (min-width: 769px) {
  .mobile-nav-wrap {
    display: none;
  }
}

@media (max-width: 768px) {
  /* Override any display:none from main.css at this breakpoint */
  .mobile-nav-wrap {
    display: block !important;
  }

  /* Ensure body and main both clear the bottom nav */
  body {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }

  main,
  main.flex-grow-1 {
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  }

  /* ---- Overflow containment ---- */
  /* Prevent horizontal scroll caused by overflowing containers/rows */
  .container,
  .container-fluid,
  .container-sm,
  .container-md,
  .container-lg,
  .container-xl,
  .row {
    max-width: 100%;
    overflow-x: clip;
  }

  /* Clamp media/tables that can cause page-level overflow */
  img,
  table,
  iframe,
  video {
    max-width: 100%;
  }

  /* ---- Tap targets ≥ 44px ---- */
  /* Ensure primary interactive controls meet WCAG 2.5.5 minimum */
  .btn,
  .nav-link,
  a.list-group-item,
  [role="button"] {
    min-height: 44px;
  }

  .mobile-nav svg {
    width: 20px;
    height: 20px;
  }

  .mobile-nav .bi {
    font-size: 20px;
  }
}
