/* ==========================================================================
   CBGO - Mobile Top Header & Bottom Navigation Bar
   Identidade: Azul Institucional (#003366 / #002855) + Dourado (#D4AF37)
   ========================================================================== */

@media (max-width: 1023px) {
  /* Oculta a barra utilitária superior no mobile para manter topo compacto de 64px */
  #top-bar {
    display: none !important;
  }

  #main-nav {
    height: 64px;
    min-height: 64px;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  #main-header.scrolled #main-nav {
    height: 64px;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  #logo-img,
  #main-header.scrolled #logo-img {
    height: 36px !important;
  }

  body:not(.is-home) {
    padding-top: 64px !important;
  }

  /* Garante espaçamento inferior para que nenhum conteúdo fique atrás da Bottom Nav */
  body {
    padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Ajuste do botão rápido "Associado" no topo quando home não está rolada */
  body.is-home #main-header:not(.scrolled) .mobile-top-action {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
  }

  body.is-home #main-header:not(.scrolled) #mobile-menu-btn {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
  }
}

/* ===== BOTTOM NAVIGATION BAR (MOBILE / TABLET < 1024px) ===== */
#mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 950;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(0, 51, 102, 0.1);
  box-shadow: 0 -6px 28px rgba(0, 40, 85, 0.1);
  padding-bottom: max(6px, env(safe-area-inset-bottom, 6px));
}

.cbgo-bottom-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  max-width: 640px;
  margin: 0 auto;
  padding: 4px 6px 2px;
}

.cbgo-bottom-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 52px;
  padding: 6px 2px 4px;
  color: #64748b;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.cbgo-bottom-item:active {
  transform: scale(0.94);
}

.cbgo-bottom-item.is-active {
  color: #003366;
  font-weight: 700;
}

.cbgo-bottom-item.is-active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, #003366, #d4af37);
}

.cbgo-bottom-item.is-active svg {
  color: #003366;
}

/* FAB Central: Associe-se */
.cbgo-bottom-fab-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 52px;
  padding-bottom: 4px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.cbgo-bottom-fab {
  width: 50px;
  height: 50px;
  margin-top: -22px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #003366 0%, #002855 100%);
  color: #d4af37;
  border: 2px solid rgba(212, 175, 55, 0.85);
  box-shadow: 0 8px 20px rgba(0, 40, 85, 0.32), 0 0 0 4px rgba(255, 255, 255, 0.95);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.cbgo-bottom-fab-wrap:active .cbgo-bottom-fab {
  transform: scale(0.93);
}

.cbgo-bottom-fab-wrap.is-active .cbgo-bottom-fab {
  background: linear-gradient(135deg, #002855 0%, #001c3d 100%);
  border-color: #d4af37;
  box-shadow: 0 10px 24px rgba(212, 175, 55, 0.35), 0 0 0 4px rgba(255, 255, 255, 0.98);
}

.cbgo-bottom-fab-label {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 800;
  color: #003366;
  letter-spacing: 0.01em;
}

