@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
}

body {
  background: #000;
  color: #fff;
  overflow-x: hidden;
}

/* ⭐ Zvijezde i meteori */
#stars {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at bottom, #020111 0%, #000 100%);
  pointer-events: none;
}

/* HEADER */
header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 20px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  z-index: 10;
}

header .logo-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

header img {
  height: 55px;
  width: auto;
  filter: brightness(1.1);
}

header h1 {
  font-size: 1.6rem;
  letter-spacing: 2px;
}

header nav a {
  color: #fff;
  text-decoration: none;
  margin-left: 25px;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

header nav a:hover {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* GLAVNI HERO I POGLAVLJA HERO BLOKOVI */
#hero-story,
.chapter-hero {
  position: relative;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

#hero-story video,
.chapter-hero video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  filter: brightness(0.6);
}

#hero-story .overlay,
.chapter-hero .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.45);
  z-index: -1;
}

#hero-story .content h2,
.chapter-hero .content h2 {
  font-size: 3rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.3rem;
}

#hero-story .content h3,
.chapter-hero .content h3 {
  font-size: 1.6rem;
  color: #ccc;
}

/* BLUR SEKCIJE */
.blur-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  padding: 100px 20px;
  background: transparent;
}

.blur-section .inner {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  padding: 60px 50px;
  border-radius: 25px;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
  max-width: 950px;
  color: #fff;
  animation: fadeInOnly 1.5s ease-in-out forwards;
}

.blur-section h2 {
  font-size: 2.8rem;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255,255,255,0.25);
}

.blur-section p {
  font-size: 1.15rem;
  line-height: 1.9;
  color: #dddddd;
  text-align: justify;
  margin-bottom: 1.5rem;
}

/* FOOTER */
footer {
  background: rgba(0, 0, 0, 0.7);
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  color: #aaa;
}

/* ANIMACIJA */
@keyframes fadeInOnly {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  #hero-story .content h2, .chapter-hero .content h2 { font-size: 2.2rem; }
  .blur-section .inner { padding: 40px 25px; }
  .blur-section h2 { font-size: 2rem; }
}


.read-icon {
  position: absolute;
  top: 22px;
  right: 28px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 1.2rem;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.35s ease;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 10px rgba(255,255,255,0.05);
  z-index: 10;
}

.read-icon:hover {
  background: rgba(255,255,255,0.15);
  transform: scale(1.08);
  box-shadow: 0 0 15px rgba(255,255,255,0.2);
}

.read-icon.active {
  color: #000;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 0 25px rgba(255,255,255,0.6);
  animation: pulseWhite 1.8s infinite ease-in-out;
}

@keyframes pulseWhite {
  0%, 100% { box-shadow: 0 0 15px rgba(255,255,255,0.4); }
  50% { box-shadow: 0 0 30px rgba(255,255,255,0.9); }
}

.audio-controls {
  position: absolute;
  top: 20px;
  right: 25px;
  display: flex;
  gap: 10px;
  z-index: 10;
}

.read-icon {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 1rem;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(6px);
}

.read-icon:hover {
  background: rgba(255,255,255,0.15);
  transform: scale(1.07);
  box-shadow: 0 0 10px rgba(255,255,255,0.15);
}

.read-icon.active {
  background: rgba(255,255,255,0.9);
  color: #000;
  box-shadow: 0 0 20px rgba(255,255,255,0.5);
  animation: pulseWhite 1.8s infinite ease-in-out;
}

@keyframes pulseWhite {
  0%, 100% { box-shadow: 0 0 10px rgba(255,255,255,0.4); }
  50% { box-shadow: 0 0 25px rgba(255,255,255,0.9); }
}

/* Sakrijemo pause/reset dok ne zatrebaju */
.read-icon.pause,
.read-icon.reset {
  display: none;
}

.narration-text {
  margin-top: 40px;
  font-size: 1.15rem;
  line-height: 1.9;
  color: #ddd;
  text-align: justify;
}

.narration-text span {
  transition: all 0.15s ease;
}

.narration-text span.active {
  color: #fff;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* Minimalističke bijele kontrole */
.audio-controls {
  position: absolute;
  top: 25px;
  right: 25px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.read-icon {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-size: 1rem;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(6px);
}

.read-icon:hover {
  background: rgba(255,255,255,0.15);
  transform: scale(1.07);
}

.read-icon.active {
  background: rgba(255,255,255,0.9);
  color: #000;
  box-shadow: 0 0 25px rgba(255,255,255,0.6);
  animation: pulseWhite 1.8s infinite ease-in-out;
}

@keyframes pulseWhite {
  0%, 100% { box-shadow: 0 0 10px rgba(255,255,255,0.4); }
  50% { box-shadow: 0 0 25px rgba(255,255,255,0.9); }
}

/* Stil teksta */
.narration-text {
  color: #ddd;
  font-size: 1.1rem;
  line-height: 1.9;
  margin-top: 40px;
  text-align: justify;
  position: relative;
  overflow: hidden; /* sprečava pomjeranje overlaya */
}

/* Glavni highlight za praćenje riječi (non-destructive overlay) */
.word-overlay {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.18);
  pointer-events: none;
  z-index: 3;
  transition:
    left 0.08s ease-out,
    top 0.08s ease-out,
    width 0.08s ease-out,
    height 0.08s ease-out,
    background 0.25s ease-in-out,
    box-shadow 0.25s ease-in-out;
  animation: wordGlow 0.45s ease-out;
}

/* Suptilna animacija prilikom prelaska na novu riječ */
@keyframes wordGlow {
  0% {
    background: rgba(255, 255, 255, 0.02);
    box-shadow: 0 0 2px rgba(255, 255, 255, 0.05);
    transform: scale(1.03);
    opacity: 0;
  }
  50% {
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.25);
    opacity: 1;
  }
  100% {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.18);
    transform: scale(1);
    opacity: 1;
  }
}

/* Dodatno: dark/light varijante (po želji) */
body.dark .word-overlay {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.15);
}

body.light .word-overlay {
  background: rgba(0, 0, 0, 0.1);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.25);
}


/* === Dropdown meni (poboljšano) === */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  cursor: pointer;
  white-space: nowrap;
}

.dropdown-content {
  display: block;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 5px;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  min-width: 160px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s 0.2s;
  pointer-events: none;
}

/* Kad se hovera, aktivira se i ne nestaje odmah */
.dropdown:hover .dropdown-content,
.dropdown-content:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: all;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s;
}

/* Linkovi unutar menija */
.dropdown-content a {
  color: #fff;
  padding: 12px 16px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
}

.dropdown-content a:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.02);
}

/* Zastavice */
.flag {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 5px rgba(255,255,255,0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
  .content h2 { font-size: 2rem; }
  .content h3 { font-size: 1.2rem; }
  
  header { 
    flex-direction: column;
    gap: 15px;
    padding: 15px; 
  }
  
  header nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }
  
  header .logo-group { 
    margin-bottom: 5px; 
  }
  
  #about .content {
    padding: 40px 30px;
  }
  
  #about .content h2 {
    font-size: 2.2rem;
  }
  
  #about .content h3 {
    font-size: 1.4rem;
  }
  
  #about .content p {
    font-size: 1rem;
    line-height: 1.8;
  }
  
  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
    padding: 0 15px;
  }
  
  .team-grid .member .img-wrap {
    width: 150px;
    height: 150px;
  }
  
  .member h3 {
    font-size: 1.1rem;
  }
  
  .member p {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .team-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .team-grid .member .img-wrap {
    width: 200px;
    height: 200px;
  }
}


/* === Dropdown meni – samo zastavice (kompaktna verzija) === */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: color 0.3s ease;
}

/* Glavni container */
.dropdown-content {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  min-width: auto;             /* automatska širina prema sadržaju */
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  z-index: 30;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s 0.25s;
  padding: 4px;                /* blago unutrašnje poravnanje */
}

/* Aktivno stanje */
.dropdown.open .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: all;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s;
}

/* Svaka zastava kao "dugme" */
.dropdown-content a {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px;                /* manji padding */
  transition: background 0.3s ease, transform 0.2s ease;
}

.dropdown-content a:hover {
  background: rgba(255,255,255,0.15);
  transform: scale(1.05);
  border-radius: 6px;
}

/* Zastavice */
.flag {
  width: 28px;
  height: 20px;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 0 6px rgba(255,255,255,0.25);
  margin: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Efekat na hover zastave */
.flag:hover {
  transform: scale(1.08);
  box-shadow: 0 0 10px rgba(255,255,255,0.4);
}





/* Responsive ostaje isto */


/* Responsive Design */
@media (max-width: 768px) {
  .content h2 { font-size: 2rem; }
  .content h3 { font-size: 1.2rem; }
  
  header { 
    flex-direction: column;
    gap: 15px;
    padding: 15px; 
  }
  
  header nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }
  
  header .logo-group { 
    margin-bottom: 5px; 
  }
  
  #about .content {
    padding: 40px 30px;
  }
  
  #about .content h2 {
    font-size: 2.2rem;
  }
  
  #about .content h3 {
    font-size: 1.4rem;
  }
  
  #about .content p {
    font-size: 1rem;
    line-height: 1.8;
  }
  
  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
    padding: 0 15px;
  }
  
  .team-grid .member .img-wrap {
    width: 150px;
    height: 150px;
  }
  
  .member h3 {
    font-size: 1.1rem;
  }
  
  .member p {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .team-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .team-grid .member .img-wrap {
    width: 200px;
    height: 200px;
  }
}


/* === FINALNA VERZIJA: DVA DUGMETA GORE DESNO === */
.audio-controls {
  position: absolute;      /* vraća u ugao kao prije */
  top: 22px;
  right: 28px;
  display: flex;
  gap: 10px;               /* razmak između dugmadi */
  z-index: 10;
}

.audio-controls .read-icon {
  position: relative;      /* sprečava preklapanje */
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(6px);
}

.audio-controls .read-icon:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  transform: scale(1.1);
}

.audio-controls .pause,
.audio-controls .reset {
  display: none; /* ostaju sakrivena dok se ne klikne play */
}
