.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.92); /* semi-transparente */
  backdrop-filter: blur(4px); /* opcional: dá um efeito de vidro suave */
  -webkit-backdrop-filter: blur(4px); /* compatibilidade Safari */
  z-index: 1000;
  padding: 0;
  box-sizing: border-box;
}

.navbar-inner {
  max-width: 1600px;
  margin: auto;
  padding: 0 16px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  width: 100%;
}

/* LOGO - fixada à esquerda */
.logo {
  position: relative;
  z-index: 1001;
  height: 100%;
  display: flex;
  align-items: center;
  /* Força ficar no canto esquerdo */
  flex: 0 0 auto;
}

.logo img {
  height: 110px;
  width: auto;
  filter: drop-shadow(0 0 4px rgba(255, 94, 0, 0.5));
  transition: transform 0.3s;
  position: relative;
  z-index: 1002;
}

.logo img:hover {
  transform: scale(1.04);
}

/* ESPAÇADOR */
.navbar-spacer {
  height: 80px;
}

/* CONTROLES MOBILE: BLOG + HAMBURGUER - CORRIGIDO */
.nav-mobile-controls {
  display: none;
  align-items: center;
  /* Remove qualquer gap que possa separar os botões */
  gap: 0;
  /* Força ficar no canto direito */
  margin-left: auto;
  justify-content: flex-end;
}

/* BLOG MOBILE - ajustado */
.nav-blog-mobile {
  color: #d0d0d0;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  white-space: nowrap;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  height: 100%;
  /* Remove qualquer margem */
  margin: 0;
}

.nav-blog-mobile:hover {
  color: #FF5E00;
}


.menu-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 2.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  padding: 0;
  margin: 0;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.menu-toggle:hover,
.menu-toggle:focus {
  color: #FF5E00;
  outline: none;
}


.nav-desktop {
  display: none;
  gap: 24px;
  align-items: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  color: #d0d0d0;
  font-weight: 600;
  padding: 4px 0;
  text-decoration: none;
  font-size: 0.95rem;
  white-space: nowrap;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #FF5E00;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}


.dropdown {
  position: fixed;
  top: 80px;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  display: none;
  padding: 0 16px;
  z-index: 999;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}

.dropdown.open {
  display: block;
}

/* === LÓGICA POR TIPO DE DISPOSITIVO === */

/* 1. PARA DISPOSITIVOS TOUCH (celulares, tablets com touch) */
@media (hover: none) and (pointer: coarse) {
  /* SEMPRE mostrar layout mobile em dispositivos touch */
  .nav-mobile-controls {
    display: flex !important;
  }
  
  .nav-desktop {
    display: none !important;
  }
  
  .menu-toggle {
    display: flex !important;
  }
  
  .nav-blog-mobile {
    display: flex !important;
  }
  
  /* Logo um pouco maior em touch */
  .logo img {
    height: 120px;
  }
  
  /* Garante que os botões fiquem juntos no canto direito */
  .navbar-inner {
    justify-content: space-between;
  }
  
  .nav-mobile-controls {
    flex: 0 0 auto;
  }
}

/* 2. PARA DISPOSITIVOS COM MOUSE (desktop, laptops) */
@media (hover: hover) and (pointer: fine) {
  /* Em telas grandes com mouse, mostrar desktop */
  @media (min-width: 992px) {
    .nav-mobile-controls {
      display: none !important;
    }
    
    .menu-toggle {
      display: none !important;
    }
    
    .nav-blog-mobile {
      display: none !important;
    }
    
    .nav-desktop {
      display: flex !important;
    }
    
    .logo img {
      height: 110px;
    }
  }
  
  /* Em telas pequenas com mouse (raros) */
  @media (max-width: 991px) {
    .nav-mobile-controls {
      display: flex !important;
    }
    
    .nav-desktop {
      display: none !important;
    }
    
    .logo img {
      height: 120px;
    }
  }
}

/* AJUSTES PARA CELULARES PEQUENOS */
@media (max-width: 480px) {
  .logo img {
    height: 110px; /* Reduz um pouco em telas muito pequenas */
  }
  
  .nav-blog-mobile {
    padding: 12px 12px;
    font-size: 0.9rem;
  }
  
  .menu-toggle {
    width: 56px;
    height: 56px;
    font-size: 2rem;
  }
  
  /* Remove qualquer espaço extra */
  .navbar-inner {
    padding: 0 12px;
  }
}

/* AJUSTE PARA TELAS MUITO PEQUENAS */
@media (max-width: 375px) {
  .logo img {
    height: 105px;
  }
  
  .nav-blog-mobile {
    padding: 12px 10px;
    font-size: 0.85rem;
  }
  
  .menu-toggle {
    width: 52px;
    height: 52px;
    font-size: 1.8rem;
  }
}