/* MycoBH – naslovna: hero kao na stranici Znanstveni tim (pozadina + micelij) i pokret pri skrolu.
   Zaglavlje i logo se ne diraju. */

/* Ista pozadina kao na stranicama Znanstveni tim, Dokumentacija i Publikacije */
body.home .mycobh-hero,
.mt-home-hero.mycobh-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(90% 120% at 88% 0%, rgba(35, 117, 106, .35) 0%, transparent 55%),
    radial-gradient(70% 90% at 0% 100%, rgba(163, 214, 203, .10) 0%, transparent 60%),
    linear-gradient(180deg, #2D3027 0%, #23261E 100%) !important;
}
.mt-home-hero > :not(.mt-home-mycelium) { position: relative; z-index: 1; }
body.home .mycobh-hero .mycobh-eyebrow { color: #A3D6CB; }

.mt-home-mycelium {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none !important;
  margin: 0 !important;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.6s ease;
  transform: translate3d(0, calc(var(--mt-hp, 0) * 18%), 0);
  will-change: transform;
}
.mt-home-mycelium.is-on { opacity: 1; }

/* Ulazna animacija hera – čisti CSS, bez skrivanja sadržaja ako skripta ne radi */
@keyframes mt-home-rise { from { opacity: 0; transform: translate3d(0, 28px, 0); } to { opacity: 1; transform: none; } }
@keyframes mt-home-img { from { opacity: 0; transform: translate3d(0, 36px, 0) scale(.97); } to { opacity: 1; transform: none; } }
body.home .mycobh-hero .wp-block-column:first-child > * { animation: mt-home-rise 1s cubic-bezier(.16, 1, .3, 1) both; }
body.home .mycobh-hero .wp-block-column:first-child > :nth-child(1) { animation-delay: .05s; }
body.home .mycobh-hero .wp-block-column:first-child > :nth-child(2) { animation-delay: .15s; }
body.home .mycobh-hero .wp-block-column:first-child > :nth-child(3) { animation-delay: .3s; }
body.home .mycobh-hero .wp-block-column:first-child > :nth-child(4) { animation-delay: .42s; }
body.home .mycobh-hero .wp-block-column:last-child > * { animation: mt-home-img 1.2s cubic-bezier(.16, 1, .3, 1) .25s both; }

/* Paralaksa hera pri skrolu */
.mt-par-text {
  transform: translate3d(0, calc(var(--mt-hp, 0) * 60px), 0);
  opacity: calc(1 - var(--mt-hp, 0) * .7);
  will-change: transform, opacity;
}
.mt-par-img {
  transform: translate3d(0, calc(var(--mt-hp, 0) * -30px), 0);
  will-change: transform;
}

/* Sekcije koje izranjaju pri skrolu */
.mt-home-anim .mt-rise {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity .9s cubic-bezier(.16, 1, .3, 1), transform 1s cubic-bezier(.16, 1, .3, 1);
  transition-delay: var(--mt-d, 0ms);
}
.mt-home-anim .mt-rise.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .mt-home-mycelium { transition: none; transform: none; }
  body.home .mycobh-hero .wp-block-column > * { animation: none !important; }
  .mt-par-text, .mt-par-img { transform: none !important; opacity: 1 !important; }
  .mt-home-anim .mt-rise { opacity: 1 !important; transform: none !important; transition: none !important; }
}
