/* Top Navigation Bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: var(--bg-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  transition: all var(--transition-normal);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Marca / Logo */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 2px 8px rgba(79, 70, 229, 0.25));
}

.ca-brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: var(--radius-md);
  filter: drop-shadow(0 2px 8px rgba(14, 165, 233, 0.25));
  transition: transform var(--transition-fast);
}

.navbar-brand:hover .ca-brand-logo {
  transform: scale(1.05);
}

.brand-name-group {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.brand-subtitle {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.brand-divider {
  color: var(--border-hover);
  font-size: 1.1rem;
  margin: 0 0.15rem;
  font-weight: 300;
}

.brand-product-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
}

.brand-product-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.brand-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Links de Navegação Desktop */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  border-radius: var(--radius-pill);
}

/* Controles Direitos */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Alternador de Tema */
.theme-toggle-btn {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface-elevated);
  transform: rotate(15deg);
}

.theme-toggle-btn svg {
  width: 18px;
  height: 18px;
}

.theme-icon-sun {
  display: none;
}
.theme-icon-moon {
  display: block;
}

[data-theme="dark"] .theme-icon-sun {
  display: block;
}
[data-theme="dark"] .theme-icon-moon {
  display: none;
}

/* Botão Hamburguer Mobile */
.navbar-toggler {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  width: 42px;
  height: 42px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.navbar-toggler svg {
  width: 24px;
  height: 24px;
}

/* Menu Mobile (Drawer) */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1099;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100%;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  z-index: 1100;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: right var(--transition-normal);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
}

.mobile-menu-drawer.active {
  right: 0;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-menu-close {
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mobile-nav-link {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  display: block;
  padding: 0.5rem 0;
}

.mobile-nav-link:hover {
  color: var(--primary);
}

.mobile-menu-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Responsividade Navbar */
@media (max-width: 992px) {
  .navbar-nav {
    display: none;
  }
  .navbar-toggler {
    display: flex;
  }
  .navbar-actions .btn-primary {
    display: none;
  }
}
