* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* KLJUČNO: Onemogućujemo standardni scrollbar preglednika */
body, html {
  height: 100%;
  font-family: sans-serif;
  overflow: hidden; /* Sva skrolanja se sada dešavaju u .scrollable */
}

@font-face {
  font-family: 'ITM';
  src: url('/assets/fonts/playfair-display.regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}
/* Glavni preloader kontejner */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000; /* crna pozadina */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Pulsirajuće kružnice */
.circle {
  position: absolute;
  width: 100px;
  height: 100px;
  border: 6px solid #fff; /* bijela boja i deblja linija */
  border-radius: 50%;
  opacity: 0;
}

/* Animacija pulsiranja */
.pulse {
  animation: pulse-ring 2s infinite ease-out;
}

.delay-1 {
  animation-delay: 0.4s;
}

.delay-2 {
  animation-delay: 0.8s;
}

/* Keyframes animacija */
@keyframes pulse-ring {
  0% {
    transform: scale(0.5);
    opacity: 0.9;
  }
  80% {
    transform: scale(2.2);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

h1, h4{
  font-family: 'ITM', sans-serif;
}

/* --- Virtual Scroll Struktura --- */
.scrollable {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  z-index: 10; /* Mora biti iznad sadržaja da bi uhvatio interakcije */
}

.content-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
}

.content {
  /* Visinu ovog elementa će definirati JavaScript */
  width: 100%;
  position: relative;
}

/* --- Glavni kontejner sa sadržajem --- */
#page-content {
  position: relative;
  z-index: 1; /* Ispod scrollbar kontrolera */
  width: 100%;
  background-color: #000; /* Pozadina za slučaj da se pojavi rupa zbog učitavanja */
  will-change: transform; /* Optimizacija za performanse animacije */
}

/* --- Stilovi za vaš sadržaj --- */
.logo-fixed {
  position: fixed;
  top: 20px;
  left: 8%;
  z-index: 999;
  width: 200px;
  height: 200px;
}

/* Kontejner za tekst u sekcijama */
.text-container {
  position: relative;
  z-index: 2;
  color: white;
  padding-left: 300px; /* Odmak od lijeve strane radi loga */
  padding-right: 50px;
  width: 90%;
}

.text-container h4 {
  font-size: 2rem;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.7);
  will-change: transform; /* Optimizacija */
  margin-top: 100px;
}

.text-container h1 {
  font-size: 4rem;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.7);
  will-change: transform; /* Optimizacija */
  margin-top: 20px;
}

/* Prva sekcija */
header.paralax {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center; /* Vertikalno centrira .text-container */
}

.grey-img-wrapper {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.grey-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform; /* Optimizacija */
}

/* Druga sekcija */
.second-section {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex; /* Koristimo flex za lako centriranje */
  align-items: center; /* Vertikalno centrira .text-container */
}

.second-section img {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform; /* Optimizacija */
}

/* NOVO: Treća sekcija - identičan stil kao druga */
.third-section {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.third-section img {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform; /* Optimizacija */
}

.fourth-section {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.fourth-section img {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform; /* Optimizacija */
}

.fifth-section {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.fifth-section img {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform; /* Optimizacija */
}

/* --- Responsivnost --- */
@media (max-width: 768px) {
  .logo-fixed {
    width: 150px;
    height: 150px;
    left: 5%;
  }

  .text-container {
    padding-left: 180px; /* Smanjujemo odmak za tablete */
    padding-right: 30px;
  }

  .text-container h1 {
    font-size: 2rem;
  }
   .text-container h4 {
    font-size: 1.5rem;
  }

  .fourth-section img {
        object-position: left; /* Prikazuje lijevi dio slike */
    }
}

@media (max-width: 480px) {
  .logo-fixed {
    width: 100px;
    height: 100px;
    left: 20px; /* Fiksna vrijednost za mobitele */
  }

  .text-container {
    /* Na mobitelu, odmak je manji */
    padding-bottom: 100px;
    padding-left: 50px; 
    padding-right: 20px;
  }

  .text-container h1 {
    font-size: 1.6rem;
  }
   .text-container h4 {
    font-size: 1rem;
  }
}


@keyframes fadeInUp {
  0% {
    transform: translateY(100%);
    opacity: 0;
  }
  100% {
    transform: translateY(0%);
    opacity: 1;
  }
}

.fadeInUp-animation {
  animation: 2.5s fadeInUp;
}