/* --- IMPORTS & GLOBAL STYLES --- */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: #495057; /* Malo mekša crna za tekst */
  background-color: #ffffff;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700; /* Podebljani naslovi */
  color: #212529;
}

/* --- NAVBAR --- */
.navbar-brand {
  font-size: 1.5rem;
}

.navbar-nav .nav-link {
  font-weight: 600;
  transition: color 0.2s ease-in-out;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: #f39c12;
}

/* --- HERO SECTION --- */
.hero {
  background: linear-gradient(
    180deg,
    rgba(248, 249, 250, 0.5) 0%,
    #ffffff 100%
  );
}

.hero .btn-lg {
  padding: 0.75rem 2rem;
  font-weight: 600;
}

/* --- VRIJEDNOSTI (VALUES) SECTION --- */
#vrijednosti .card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
}

#vrijednosti .card:hover {
  transform: translateY(-10px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* --- USLUGE / EKSPERTIZE SECTION --- */
#usluge img {
  border: 1px solid #dee2e6;
  padding: 5px;
}

/* --- CHAT WIDGET STYLES (ISPRAVLJENO) --- */

/* Kontejner koji je "zalijepljen" za donji desni kut ekrana */
.chat-widget-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

/* Gumb za otvaranje/zatvaranje chata */
#chat-toggle {
  font-size: 1.5rem;
  width: 60px;
  height: 60px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Sam prozor za chat */
#chat-box {
  width: 350px;
  max-height: 500px;
  position: absolute; /* Pozicionira se u odnosu na .chat-widget-container */
  bottom: 80px; /* Pozicija iznad gumba */
  right: 0; /* KLJUČNO: Poravnava se na desnu stranu kontejnera */
  display: flex;
  flex-direction: column;
}

/* Prozor za prikaz poruka */
#chat-messages {
  flex-grow: 1; /* Omogućuje da ovaj element zauzme sav dostupan prostor */
  min-height: 200px;
  max-height: 300px;
  overflow-y: auto;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Opći stil za "oblačiće" s porukama */
.chat-bubble {
  max-width: 85%;
  padding: 10px 15px;
  border-radius: 18px;
  font-size: 0.9rem;
  line-height: 1.4;
  word-wrap: break-word;
  animation: fadeIn 0.3s ease;
}

/* Korisnička poruka */
.user-msg {
  background-color: #f39c12; /* Narančasta boja */
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* GPT poruka */
.gpt-msg {
  background-color: #e9ecef;
  color: #212529;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

/* Animacija "piše..." */
.typing-indicator {
  display: inline-block;
  padding: 10px 0;
}
.typing-indicator span {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #6c757d;
  border-radius: 50%;
  margin-right: 3px;
  animation: bounce 1.4s infinite ease-in-out;
}
.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

/* --- ANIMACIJE --- */

@keyframes bounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-5px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- RESPONZIVNI DIZAJN --- */
@media (max-width: 576px) {
  .hero h1 {
    font-size: 2.2rem; /* Smanji naslov na manjim ekranima */
  }

  #chat-box {
    width: 90vw; /* Chat prozor zauzima skoro cijelu širinu na mobitelu */
    max-height: 70vh;
  }
}
/* (Opcionalno) Lagana dorada kontakt forme */
#kontakt form {
  background: #f8f9fa;
  border-radius: 16px;
  padding: 32px 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
#kontakt .form-label {
  font-weight: 600;
}


