.navbar {
  background-color: rgba(37, 99, 235, 0.9); /* Primary color with opacity */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.navbar-container {
  max-width: var(--max-width);
  height: 70px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  text-decoration: none;
  font-size: 24px;
  font-weight: 800;
  font-family: var(--font-heading);
  letter-spacing: -0.5px;
  z-index: 120;
}

.navbar-brand img {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* Greeting Centered */
.navbar-greeting {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-weight: 600;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.2);
  padding: 4px 16px;
  border-radius: 20px;
  pointer-events: none;
  z-index: 110;
  white-space: nowrap;
  max-width: 40vw;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-menu {
  display: flex;
  justify-content: flex-end;
  z-index: 120;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

/* Navigation Links */
.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 500;
  border-radius: 12px;
  transition: var(--transition);
  height: 44px;
  position: relative;
  overflow: hidden;
}

.nav-link i {
  font-size: 1.2rem;
  z-index: 2;
}

/* Hover Text Animation */
.link-text {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.95rem;
  font-weight: 600;
  margin-left: 0;
}

.nav-link:hover .link-text,
#zaposlodavce:hover .link-text {
  max-width: 150px;
  opacity: 1;
  margin-left: 10px;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* "Za Poslodavce" Special Button */
.nav-link-employer, #zaposlodavce {
  background-color: white;
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-link-employer:hover, #zaposlodavce:hover {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

/* Toggler for Mobile */
.navbar-toggler {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  font-size: 24px;
  cursor: pointer;
  z-index: 130;
  padding: 6px 10px;
  border-radius: 8px;
}

/* Responsive */

@media (max-width: 768px) {
  .navbar-container { 
    padding: 0 16px; 
    display: flex; 
    align-items: center; /* Osigurava da su brand i hamburger u istoj ravnini */
  }

  .navbar-brand { 
    font-size: 20px; 
    display: flex; /* Pretvaramo brand u flex kontejner */
    align-items: center; /* Vertikalno centrira sliku i tekst loga */
    font-family: 'Science Gothic', sans-serif !important; /* Forsiramo font i na mobitelu */
    gap: 0; /* Razmak kontroliraš preko margina slike, ali možeš i ovdje */
  }

  .navbar-brand img {
    margin-right: 10px;
    display: block; /* Uklanja onaj sitni razmak ispod slike koji kvari centriranje */
  }
  
  /* Ostatak koda ostaje isti... */
  .navbar-greeting { 
    position: static; 
    transform: none; 
    display: block; 
    margin: 10px auto 0;
    max-width: 90%; 
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    font-family: 'Science Gothic', sans-serif; /* Dodaj i ovdje ako pozdrav koristi krivi font */
  }

  .navbar-toggler { display: inline-flex; }
  .navbar { height: auto; padding-bottom: 10px; }
  
  .navbar-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--primary);
    padding: 20px;
    flex-direction: column;
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
    border-radius: 0 0 20px 20px;
    z-index: 9999;
  }
  
  /* OVDJE JE BILA GREŠKA: Promijenjeno iz .active u .show kako bi odgovaralo JavaScriptu */
  .navbar-menu.show { display: flex !important; }
  
  .navbar-nav { flex-direction: column; width: 100%; gap: 12px; }
  
  .nav-link { 
    width: 100%; 
    justify-content: flex-start; 
    padding: 12px 20px; 
    background: rgba(255,255,255,0.1);
  }
  
  .link-text { max-width: none; opacity: 1; margin-left: 12px; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .navbar-greeting { max-width: 25vw; font-size: 0.9rem; }
}

@media (min-width: 1025px) and (max-width: 1400px) {
  .navbar-container { max-width: 1100px; padding: 0 28px; height: 68px; }
  .navbar-brand { font-size: 26px; gap: 12px; }
  .navbar-greeting { font-size: 1.05rem; }
}

@media (min-width: 1401px) {
  .navbar-container { max-width: 1400px; padding: 0 40px; height: 72px; }
  .navbar-brand { font-size: 28px; }
  .navbar-greeting { font-size: 1.1rem; }
}