/* Consolidated font declarations with font-display for better performance */
@font-face {
    font-family: "Amatic";
    src: url("Fonts/Amatic_SC/AmaticSC-Regular.ttf") format("truetype");
    font-display: swap;
}

@font-face {
    font-family: "Outfit";
    src: url("Fonts/Outfit/Outfit-VariableFont_wght.ttf") format("truetype");
    font-display: swap;
}

*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;

}

html {
    scroll-behavior: smooth;
    overflow-x:hidden;
    -ms-overflow-x:hidden;
}

body{
    overflow: hidden;
}

/* Za WebKit browsere (Chrome, Edge, Safari) */
::-webkit-scrollbar {
  width: 15px;
}

::-webkit-scrollbar-track {
  background: #111; /* tamna pozadina */
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #35af60, #28a745); /* Neon zelena #35af60 */
  border-radius: 10px;
  box-shadow: 0 0 10px #35af60, 0 0 20px #28a745; /* Neon svetlo efekti */
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #28a745, #35af60); /* Neon zelena */
  box-shadow: 0 0 15px #28a745, 0 0 30px #35af60; /* Povećani efekat svetlosti */
  transform: scale(1.1); /* Povećanje scroll bara na hover */
}

/* Firefox */
* {
  scrollbar-width: auto;
  scrollbar-color: #35af60 #111; /* Neon zelena boja */
}

.scroll-container {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    overflow-y: scroll;
    height: 100vh;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

/* Smooth scrolling animation */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-container {
        scroll-behavior: smooth;
        scroll-padding: 0;
    }
}

/* Hide scrollbar on desktop browsers to encourage navbar navigation */
@media (min-width: 769px) {
    .scroll-container {
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
    }

    .scroll-container::-webkit-scrollbar {
        display: none;  /* Chrome, Safari and Opera */
    }
}


@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

section {
    height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
}

/* Add subtle transitions to section backgrounds for smoother visual flow */
section {
    transition: background-color 0.6s ease;
}

/* Ensure each section maintains its unique color */
#jezikainje {
    background-color: #3c3c3c;
}

#kalkulator {
    background-color: #3c3c3c;
}

#znanstvenjak {
    background-color: #5fc9f8;
}

#shramba {
    background-color: #35af60;
}

#ekipa {
    background-color: white;
}

 #home{
    background-color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    min-height: 100vh;
    padding: 2rem;

 } 


 .header {
    width: 100%;
    max-width: 900px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    animation: fadeIn 3.2s ease-out;
    margin-top: -5rem;
}

.title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    font-family: "Amatic";
    transform: translateX(-25px);
}

  
.egg{
    height: 300px;
}

  
.zate {
    font-size: 4.5em;
    color: rgb(0, 0, 0);
    font-family: "Amatic";
    margin-bottom: 20px;
    font-weight: bold;
    transform: translateX(-20px);
}
  
#omega{
    width: 20px;
    height: 20px;
}
  
.text {
    width: 100%;
    font-size: 1.4em;
    line-height: 1.6;
    letter-spacing: 2px;
    word-spacing: 5px;
    color: rgb(49, 49, 49);
    font-weight: 100;
    text-align: center;
    padding: 0 20px;
    transform: translateY(-50px);
    font-family: "Amatic";
    font-weight: 600;
    margin-bottom: 5vh;
}

.text span {
    display: block;
    margin-top: 3vh;
}


.btn {
    width: 100%;
    display: flex;
    justify-content: center;
    transform: translateY(-50px);
    margin-right: 26px;
}

#Header-button {
    position: relative;
    background-color: white;
    color: rgb(49, 49, 49);
    border: 4px solid rgb(49, 49, 49);
    padding: 10px 20px;
    
    border-radius: 50px;
    width: 350px;
    height: 80px;
    font-family: "Outfit";
    font-weight: bold;
    font-size: 27px;
    box-shadow: 4px 4px 0px rgb(49, 49, 49);
    cursor: none;
    z-index: 1;
}

#Header-button::after {
    content: "";
    position: absolute;
    bottom: -14px;
    right: -13px;
    width: 103%;
    height: 120%;
    border-right: 4px solid rgb(0, 0, 0);
    border-bottom: 4px solid rgb(0, 0, 0);
    border-radius: 50px;
    z-index: -1;
}

#Header-button:hover{
    scale: 0.99;
}

#Header-button:hover::after {
    opacity: 0;
}

@media (max-width: 1024px) {
    .zate {
        font-size: 5.3em;
    }

    .text {
        font-size: 1em;
        padding: 0 10px;
    }

    #Header-button {
        font-size: 1.4em;
        touch-action: manipulation; /* Improve mobile tap performance */
    }
}

@media (max-width: 768px) {
    .zate {
        font-size: 4.6em;
        margin-bottom: 23px;
    }

    .title {
        flex-direction: column;
        transform: none;
    }

    .egg {
        height: 30vh;
    }

    .text {
        font-size: 1em;
        letter-spacing: 1px;
        word-spacing: 2px;
        transform: none;
    }

    #Header-button {
        font-size: 1.2em;
        padding: 10px 14px;
        width: 300px;
        height: 70px;
        margin-top: 50px;
        margin-right: 5px;
    }

    .title{
        flex-direction: row;
        flex-wrap: wrap; /* ako želiš da ipak prelamaju kad je baš usko */
        justify-content: center;
        transform: none;
        transform: translateY(50px);
        margin-right: 60px;
    }
}

@media (max-width:480px) {
    .zate {
        margin-bottom: 17px;
        margin-left: 15px;
        font-size: 3.5em;
    }

    .text {
        font-size: 0.95em;
    }

    #Header-button {
        font-size: 1em;
        padding: 8px 12px;
        width: 220px;
        height: 60px;
        margin-top: 50px;
        margin-left: 15px;
    }

    .egg {
        height: 25vh;
    }

    .title{
        flex-direction: row;
        flex-wrap: wrap; /* ako želiš da ipak prelamaju kad je baš usko */
        justify-content: center;
        transform: none;
        transform: translateY(60px);
        margin-right: 40px;
    }

}



@media (min-width: 481px) and (max-width: 485px) {
  .zate {
    margin-bottom: 17px;
    font-size: 3.5em;
    text-align: center;
  }

  .text {
    font-size: 0.95em;
    padding: 0 10px;
  }

  #Header-button {
    font-size: 1em;
    padding: 8px 12px;
    width: 220px;
    height: 60px;
    margin-top: 50px;
    margin-left: 15px;
  }

  .egg {
    height: 25vh;
  }

  .title {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    transform: translateY(50px);
    margin-right: 40px;
  }
}



@media (min-width: 321px) and (max-width: 421px) {
  .zate {
    margin-bottom: 17px;
    font-size: 3.5em;
    text-align: center;
  }

  .text {
    font-size: 0.95em;
    padding: 0 10px;
  }

  #Header-button {
    font-size: 1em;
    padding: 8px 12px;
    width: 220px;
    height: 60px;
    margin-top: 50px;
    margin-left: 15px;
  }

  .egg {
    height: 25vh;
  }

  .title {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;       /* sprečava prelamanje */
    justify-content: center;
    align-items: center;
    gap: 8px;                /* razmak između stavki */
    transform: translateY(50px);        /* uklanja translaciju */
    margin-right: 30px;
  }
}




@media (max-width:320px) {
    .zate {
        margin-bottom: 9px;
        font-size: 2em;
    }

    .text {
        font-size: 0.6em;
        
    }

    #Header-button {
        font-size: 0.8em;
        padding: 8px 12px;
        width: 160px;
        height: 40px;
        margin-top: 50px;
        margin-left: 15px;
    }

    .egg {
        height: 15vh;
    }

    .title{
        flex-direction: row;
        flex-wrap: wrap; /* ako želiš da ipak prelamaju kad je baš usko */
        justify-content: center;
        transform: none;
        transform: translateY(30px);
        margin-right: 35px;
    }

    .header{
        margin-bottom: 100px;
    }
}