body {
    padding:0px;
    margin:0px;
    font-family: 'Oswald', sans-serif;
}

section {
    height: 100vh;
    padding: 50px;
    border-bottom: 1px solid #ccc;
    display: flex;
    justify-content: center; /* horizontalo */
    align-items: center;     /* vertikalno */
    gap: 40px;
}

#section1 {
    position: relative;   /* video/slika i overlay(tekst) pozicionirani relativno na ovaj section */
    height: 100vh;
    overflow: hidden;
    display: grid;
    grid-template-columns: 2fr 3fr;
    grid-template-rows: 1fr;
    grid-column-gap: 0px;
    grid-row-gap: 0px;
}

#section4 {
    display: grid;
    justify-content:center;
    grid-template-columns: 50% 50%;
    gap: 8px;
}

#section4 #image img {
    width:100%;
}

#section1 #bg-video {
    position: absolute;   /* relativno pozicionirano na section1 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;    /* bez distortion-a */
    z-index: -1;          /* iza overlaya (teksta) */
    filter: brightness(60%); /* smanji svjetlinu na 60% */
    opacity: 0.8;
}


#section1 .content {
    position: relative;
    z-index: 1;            /* preko slike/videa */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: white;
    text-align: center;
    padding: 20px;


    font-family: 'Oswald', sans-serif;
    font-weight: 800;
    letter-spacing: 3px;
}

#section1 .content h1 {
    font-size: 5rem;
    text-transform: uppercase;
}

#section1 button {
    padding: 16px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    transition-duration: 0.4s;
    cursor: pointer;
    background-color: white;
    color: black;
    border: 2px solid black;
    border-radius: 10px;
}

#section1 button:hover {
    background-color: #EF4723;
    color: white;
    border: 2px solid #bb371a;

}

#section1 button a {
  text-decoration: none;
  color: black;
}

#section1 .content h1,
#section1 .content p {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* header fiksiran na vrhu*/
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 10px;
    z-index: 10;           /* preko svega ostalog */
    display: flex;
    justify-content: end;
    transition: transform 0.2s;
}

nav#header.scrolled{
    /*background: #DEDBD8;*/
    background: white;
    border: 2px solid black;
}

#header-logo.scrolled {
    content: url("../images/Logo1.svg");
}

#nav-container {
    margin-right: 10px;
}

nav a {
    margin-right: 20px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    font-family: 'Oswald', sans-serif;
    display: inline-block;
    transition: transform 0.2s;
}

#nav-container a {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  padding-top: 0.5rem;
}

#nav-container a:hover {
    transform: scale(1.15);
}

nav .scrolled a {
    /*color: #8b0101;*/
    color: black;
}

#section3 {
    display:block
}

.usluga {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        align-items: center;

        border: 2px solid #333;
        border-radius: 15px;
        padding: 20px;

        transition: transform 0.5s ease,
                    border-color 0.5s ease;
                    /*box-shadow 0.5s ease; */

        cursor: pointer;
        height: 80%;

        backdrop-filter: blur(3px);
        /*box-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);*/
}

.usluga:hover {
     transform: scale(1.05)
     translateX(10px);

     border-color: #EF4723;
     /*box-shadow: 0 0 15px #EF4723;*/
}

.usluga_button {
    font-size: 32px;
    font-weight: bold;
    margin-top: 15px;
    transition: transform 0.3s ease, color 0.3s ease;
    color: #333;
}

.usluga:hover .usluga_button {
    transform: translateX(8px) scale(1.2);
    color: #EF4723;
}

.usluga_icon {
    display: flex;
    justify-content: center;
    align-items: center;
    height:5rem;
    width:5rem
}

.usluga_icon > img{
    height:3rem;
    width:3rem
}

.usluga_title {
    text-align: center;
}

.usluga_description {
    text-align: center;
}

.usluga_button {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* css za usluge */
.parent {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /*grid-template-rows: repeat(3, 1fr);*/
    /*grid-column-gap: 1rem;*/
    grid-row-gap: 1rem;
    height: 100%;

    align-items: center;
    justify-items: center;
}

.parent a {
    width: 15vw;
    height: 30vh;
}

/* naslov sectiona - usluge*/
.usluge_header {
    grid-area: 1 / 1 / 2 / 5;
}

.usluge_header_title {
    justify-self: center;
        align-content: center;
        font-family: 'Oswald', sans-serif;
        font-weight: 800;
        letter-spacing: 3px;
        font-size: 2rem;
        color: #1F271B
}

.usluge_header_desc {
    justify-self: center;
    align-content: center;
}

.hex-content {
  padding: 1rem;
}

#section2 {
    border: 2px solid #EF4723;
    border-radius: 5rem;
    border-color: #EF4723;
    /*box-shadow: 0 0 15px #EF4723;*/

    backdrop-filter: blur(3px);
}

#section2 #about {
    width: 50vw;
    height:100%;
}

#section2 #about-me-photo {
    height:40%;
    overflow: hidden;
}

#section2 #about-me-text {
    height:60%
}

#section2 #about-me-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(70%);
}

#section2 #about2 {
    width: 50vw;
    height:70%;
}


#section2 #about2 img{
    width: 3rem;
    height: 3rem;
    display: inline-block;
    vertical-align: middle;
}

#section2 #about2 div{
    width: calc(100% - 3rem);
    margin-left: 1rem;
}

#section2 #values > div {
    display: flex;
    align-items: center;
    flex: 1;
}

#section2 #values {
    display: flex;
    flex-direction: column;
    height:70%;
}

#section2 #stats {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    height:30%
}

#section2 #stats > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-items: center;
}

#section2 #stats > div > p{
    white-space: nowrap;
}


@media (max-width: 768px) {
    #section1 .content h1 { font-size: 2rem; }
    #section1 .content p { font-size: 1rem; }
    nav a { font-size: 0.9rem; }
}

#section5 {
background:#5b0302;
}

.box {
      opacity: 0;
      transform: translateY(200px);
      transition: all 2s ease-out;
    }

    .box.show {
      opacity: 1;
      transform: translateY(0);
    }

    .content5 {
      padding: 2rem;
      background: white;
      border-radius: 12px;
      box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    }


/* test section2 */
#about2 #values > div {
  opacity: 0;
  transform: translateX(100px);
  transition: all 0.8s ease-out;
}

#about2 #values > div.show {
  opacity: 1;
  transform: translateX(0);
}

/*test section 2*/

#section2 {
display: flex;
}

#section2 #about {
    width: 70%;
}

#section2 #about2 {
    width: 50%;
    height: 100%
}

#t1 {
    height:100vh;
    width:100vw;
    padding:0;
    gap:0px;
}

#t1 > div {
    position: relative;
    height: 80%;
    width: 90%;

    border-radius: 5rem;
}

#t1 > div > img {
    width: 15vw;
    height: 15vw;
    border-radius: 50%;
    position: absolute;
    left: -3rem;
    top: -3rem;

    border: 2px solid #EF4723;
    border-color: #EF4723;
    /*box-shadow: 0 0 15px #EF4723;*/
}

#section2 #about-me-text {
height:100%;
padding-left: 2rem;
align-content: center;
}

#about {
align-content: center;
}

#about-me-more {
justify-self: center;
    margin-top: 25px;
}

.usluge_header {
      opacity: 0;
      transform: translateY(100px);
      transition: all 1s ease-out;
    }

    .usluge_header.show {
      opacity: 1;
      transform: translateY(0);
    }

.about-me-text {
      opacity: 0;
      transform: translateY(200px);
      transition: all 2s ease-out;
    }

    .about-me-text.show {
      opacity: 1;
      transform: translateY(0);
    }


/* projekti slider */

.CSSgal {
  position: relative;
  overflow: hidden;
  height: 100%;
}


.CSSgal .slider {
  height: 100%;
  white-space: nowrap;
  font-size: 0;
  transition: 0.8s;
}


.CSSgal .slider > * {
  font-size: 1rem;
  display: inline-block;
  white-space: normal;
  vertical-align: top;
  height: 100%;
  width: 100%;
  background: none 50% no-repeat;
  background-size: cover;
}



.CSSgal .prevNext {
  position: absolute;
  z-index: 1;
  top: 50%;
  width: 100%;
  height: 0;
}

.CSSgal .prevNext > div+div {
  visibility: hidden;
}

.CSSgal .prevNext a {
  background: #fff;
  position: absolute;
  width:       60px;
  height:      60px;
  line-height: 60px;
  text-align: center;
  opacity: 0.7;
  -webkit-transition: 0.3s;
          transition: 0.3s;
  -webkit-transform: translateY(-50%);
          transform: translateY(-50%);
  left: 0;
}
.CSSgal .prevNext a:hover {
  opacity: 1;
}
.CSSgal .prevNext a+a {
  left: auto;
  right: 0;
}


.CSSgal .bullets {
  position: absolute;
  z-index: 2;
  bottom: 0;
  padding: 10px 0;
  width: 100%;
  text-align: center;
}
.CSSgal .bullets > a {
  display: inline-block;
  width:       30px;
  height:      30px;
  line-height: 30px;
  text-decoration: none;
  text-align: center;
  background: rgba(255, 255, 255, 1);
  -webkit-transition: 0.3s;
          transition: 0.3s;
}
.CSSgal .bullets > a+a {
  background: rgba(255, 255, 255, 0.5);
}
.CSSgal .bullets > a:hover {
  background: rgba(255, 255, 255, 0.7) !important;
}

/*
.CSSgal >s:target ~ .bullets >* {      background: rgba(255, 255, 255, 0.5);}
#s1:target ~ .bullets >*:nth-child(1) {background: rgba(255, 255, 255,   1);}
#s2:target ~ .bullets >*:nth-child(2) {background: rgba(255, 255, 255,   1);}
#s3:target ~ .bullets >*:nth-child(3) {background: rgba(255, 255, 255,   1);}
#s4:target ~ .bullets >*:nth-child(4) {background: rgba(255, 255, 255,   1);}

.CSSgal >s:target ~ .prevNext >* {      visibility: hidden;}

#s1:target ~ .prevNext >*:nth-child(1) {visibility: visible;}
#s2:target ~ .prevNext >*:nth-child(2) {visibility: visible;}
#s3:target ~ .prevNext >*:nth-child(3) {visibility: visible;}
#s4:target ~ .prevNext >*:nth-child(4) {visibility: visible;}

#s1:target ~ .slider {transform: translateX(   0%); -webkit-transform: translateX(   0%);}
#s2:target ~ .slider {transform: translateX(-100%); -webkit-transform: translateX(-100%);}
#s3:target ~ .slider {transform: translateX(-200%); -webkit-transform: translateX(-200%);}
#s4:target ~ .slider {transform: translateX(-300%); -webkit-transform: translateX(-300%);}

*/

.CSSgal{
  color: #fff;
  text-align: center;
  height: 70%;

  width:100%
}
.CSSgal .slider h2 {
  margin-top: 40vh;
  font-weight: 200;
  letter-spacing: -0.06em;
  word-spacing: 0.2em;
  font-size: 3em;
}
.CSSgal a {
  border-radius: 50%;
  margin: 0 3px;
  color: rgba(0,0,0,0.8);
  text-decoration: none;
}

#section4 {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.CSSgal > s {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  overflow: hidden;
  visibility: hidden;
}


.projekti_header {
      opacity: 0;
      transform: translateY(100px);
      transition: all 1s ease-out;
    }

    .projekti_header.show {
      opacity: 1;
      transform: translateY(0);
    }

.parent > a {
      opacity: 0;
      transform: translateY(200px);
       transition: all 1s ease-out var(--delay);
    }

.parent >a.show {
      opacity: 1;
      transform: translateY(0);
    }

#section3 > .parent > a {
    text-decoration: none;
    color: black;
}

.btn a {
    cursor: pointer;
    font-weight: bold;
    user-select: none;
}

footer {
    display: flex;

}

#custom-alert {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#custom-alert.hidden {
  display: none;
}

.alert-box {
  background: #fff;
  color: #333;
  padding: 20px 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  min-width: 250px;
  max-width: 400px;
  animation: popIn 0.3s ease;
}

.alert-box button {
  margin-top: 15px;
  background-color: #EF4723;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.alert-box button:hover {
  background-color: #bb371a
}

@keyframes popIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.video_link {
  position: absolute;
  bottom: 10px;
  left: 15px;
  font-size: 10px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.3);
  transition: color 0.3s ease;
}

.video_link:hover {
  color: rgba(255, 255, 255, 0.7);
}

#about-me-more button {
  margin-top: 15px;
  background-color: #5b0302;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

#about-me-more button:hover {
  background-color: rgb(139, 1, 1);
}

#header {
  display: flex;
  justify-content: space-between;
}

#header-name {
  display: none;
}

#header-name {
  display: none;
}

/*#header-name.scrolled {
  display: block;
  color: black;
  cursor: pointer;
  margin-left: 1rem;
}

#header-logo.scrolled {
  display: none;
}*/

#header-logo.scrolled {
  width: 6rem;
  margin: 0;
}

#profile-picture {
  object-fit: cover;
}

.profile-placeholder {
  border-radius: 50%;
  height: 15vw; 
  width: 15vw;
  float: left;
  shape-outside: inset(1% round 50%);
  margin-right: 2rem;
  margin-bottom: 2rem;
}

#about-me-text > div {
  position: absolute;
  top: -3rem;
  left: -3rem;
}

#about-me-text > div > p {
  padding-left: 6rem;
  padding-top: 5rem;
}

#section3 {
  display: block;
  height: auto;
}

@media (max-width: 768px) {
    .parent {
        grid-template-columns: repeat(2, 1fr);
        grid-row-gap: 1rem;
    }

    .parent a {
        width: 35vw;
        height: auto;
    }

    .usluge_header {
        grid-area: 1 / 1 / 2 / 3;
    }
}

/*@media (max-width: 768px) {
    nav {
        flex-wrap: wrap;   
        justify-content: center;
        padding: 5px;
    }

    nav a {
        margin: 5px 10px;  
        font-size: 0.9rem;  
    }
}*/

#hamburger {
  display: none;
  font-size: 2rem;
  cursor: pointer;
}

.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.spinner-border {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 5px solid rgba(255,255,255,0.3);
  border-top: 5px solid #EF4723;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner-logo {
  position: relative;
  width: 50px;
  height: 50px;
  z-index: 1;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.hidden {
  display: none;
}

#about-me-info {
  font-size: 1rem;
}

@media (max-width: 768px) {
  #nav-container {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 0;
    width: 30vw;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 10px;
    background: white;
    z-index: 100;
    align-items: end;
  }

  #nav-container a {
    color:#EF4723;
  }

  #nav-container.show {
    display: flex;
  }

  #hamburger {
    display: block;
  }

  nav {
    position: relative;
    justify-content: space-between;
    padding: 10px 20px;
    padding-bottom: 0;
    width: auto;
  }

  #section5 {
    height: auto;
  }

  #section2 {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        width: 100%;
        padding: 20px 0;
    }

    #section2 #about,
    #section2 #about2 {
        width: 100%;
        height: auto;
    }

    #section2 #about-me-text {
        padding-left: 0;
    }

    #t1 > div > img,
    .profile-placeholder {
        width: 40vw;
        height: 40vw;
        left: 0;
        top: 0;
        margin: 0 auto;
        position: relative;
    }
    
    #about2 #values > div {
        flex-direction: row;
        align-items: center;
        margin-bottom: 15px;
    }
    
    #about2 #values {
        display: flex;
        flex-direction: column; 
        align-items: center;
        gap: 10px;
    }

    /*-----------*/
    #t1 {
      display: block;
      height: auto;
      padding-top: 2rem;
      justify-items: center;
      padding-bottom: 2rem;
    }

    #about-me-text > div {
      position: relative;
      top: -3rem;
      left: -3rem;
    }

    .profile-placeholder {
      display: none;
    }

    .usluga {
      min-height: 15rem;
    }

    #header-logo {
      content: url("../images/Logo1.svg");
    }
}

@media screen and (min-width: 1920px) {
    #about-me-info {
        font-size: 1.5rem;
    }
}