/* Reset */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .spinner {
    border: 6px solid #ccc;
    border-top: 6px solid #333;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
  }

  @keyframes spin {
    to { transform: rotate(360deg); }
  }
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /*background-color: #f9f9f9;*/
    color: #333;
    line-height: 1.6;
}

/* Header fullscreen */
header {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh; /* Cijela visina ekrana */
    background-color: white;
    overflow: hidden;
    border-bottom: 1px solid #ddd;
    z-index: 998;
    transition: height 0.5s ease, padding 0.5s ease;
}

/* Pozadinska slika */
.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('slike/didoos_ograda1.jpg') center center / cover no-repeat;
    opacity: 0.3;
    transition: opacity 0.5s ease;
    z-index: 0;
}

/* Sadržaj unutar headera */
.header-container {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centrirano po visini */
    align-items: center;
    text-align: center;
    transition: transform 0.4s ease;
}

/* Kad se skrola – sakrij sliku */
.header-scrolled .header-bg {
    opacity: 0;
}


/* Naslov */
header h1 {
    margin: 0;
    font-size: 56px;
    transition: font-size 0.4s ease;
}

header p {
    font-size: 22px;
    transition: font-size 0.4s ease;
}

.top-contact p {
    font-size: 20px;
    transition: font-size 0.4s ease;
}

.top-contact a {
    color: #333; /* Tamno siva boja za linkove */
    text-decoration: none;
}

.top-contact a:hover {
    color: #007bff; /* Plava boja kad se pređe mišem preko linka */
}

/* STANJE KAD SE SKROLA */
.header-scrolled {
    height: 110px; /* Smanjena visina headera */
}

.header-scrolled .header-bg {
    opacity: 0; /* Slika nestaje */
}

.header-scrolled .header-container {
    transform: scale(0.85); /* Smanjuje sadržaj */
}

.header-scrolled h1 {
    font-size: 32px;
}

.header-scrolled p,
.header-scrolled .top-contact p {
    font-size: 16px;
}


/* Stilovi za meni */
.menu-toggle {
    position: fixed;
    top: 40px;
    right: 20px;
      display: flex;
      flex-direction: column;
      cursor: pointer;
      width: 30px;
      height: 25px;
      justify-content: center;
      z-index: 1000;
    }

    .menu-toggle span {
      height: 2px;
      width: 100%;
      background: black;
      margin: 3px 0;
      border-radius: 2px;
      transition: all 0.3s ease;
    }

    /* Animacija hamburger u X */
    .menu-toggle.active span:nth-child(1) {
      transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
      opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
      transform: rotate(-45deg) translate(5px, -5px);
    }

    nav {
      display: flex;
      flex-direction: column;
      background: #fff;
      position: fixed; /*absolute*/
      top: 55px;
      right: 0;
      width: 200px;
      padding: 10px;
      z-index: 999;
      opacity: 0;
      transform: translateY(-10px);
      pointer-events: none;
      transition: all 0.3s ease;
      text-align: center;
      border-radius: 5px;
    }

    nav.active {
      opacity: 0.9;
      transform: translateY(0);
      pointer-events: auto;
    }

    nav a {
      padding: 7px;
      border-bottom: 0px solid #555;
      color: black;
      text-decoration: none;
      transition: background 0.2s;
    }

    nav a:hover {
      /*background: white;*/
      font-weight: 600;
    }


/* kraj za MENU */



/* Globalna pravila za sve sekcije */
section {
    padding: 40px 15%;  /* Jednak padding za sve sekcije */
    margin-top: 40px;  /* Razmak između sekcija */
    background-color: #ffffff;  /* bijela pozadina */
    /*border-radius: 8px;  /* Zaobljeni kutovi */
    /*box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); */ /* Sjena oko sekcija */
    /*max-width: 1500px;  /* Maksimalna širina sekcija */
}


/* Naslov u svakoj sekciji */
section h2 {
    font-size: 32px;
    text-align: left;  /* Centriran naslov */
    color: #333;
    margin-bottom: 40px;
    border-left: 5px solid #3498db;  /* Plavi naglasak lijevo od naslova */
    padding-left: 15px;
}
section h3 {
    font-size: 20px;
    text-align: center;  /* Centriran naslov */
    color: #333;
    margin-top: -25px;
    margin-bottom: 20px;
    /* border-left: 5px solid #3498db;   Plavi naglasak lijevo od naslova */
    padding-left: 15px;
}

/* Stilovi za paragraf u svakoj sekciji */
section p {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px;
    text-align: justify;  /* Justificirani tekst */
}

/* Za istaknute dijelove teksta (strong) */
section strong {
    font-weight: bold;
    color: #007bff;  /* Plava boja za istaknute dijelove */
}

/* Galerija sa 3 slike u redu */
#galerija .gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 kolone u galeriji */
    gap: 20px;  /* Razmak između slika */
    justify-items: center;  /* Centriranje slika */
    margin-top: 20px;
}
#galerija .gallery.five {
    
    grid-template-columns: repeat(5, 1fr); /* 5 kolona u galeriji */
    
}

#galerija .gallery a {
    display: block;
    overflow: hidden;
    position: relative;
    border-radius: 8px;  /* Zaobljeni rubovi za slike */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);  /* Sjena oko slika */
    transition: transform 0.3s ease, box-shadow 0.3s ease;  /* Prijelaz pri hoveru */
}

#galerija .gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;  /* Slike se prilagođavaju unutar okvira */
    border-radius: 8px;  /* Zaobljeni rubovi za slike */
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#galerija .gallery img:hover {
    transform: scale(1.05);  /* Lagano povećanje slike pri hoveru */
    opacity: 0.9;
}

#galerija .gallery a:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);  /* Povećanje sjene pri hoveru */
}




/* Kontakt forma */
form {
    /*background-color: #ffffff;*/
    margin: 0px 10%;
    padding: 30px 30px 0px 30px;
    /*border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);*/
    display: flex;
    flex-direction: column;
    gap: 15px;
}

label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #2c3e50;
}

input, textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    background-color: #fdfdfd;
}

button {
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #2980b9;
    transform: scale(1.05);
}

#forma-status {
    margin-top: 15px;
    font-size: 16px;
    font-weight: 500;
    min-height: 24px;
}

/* Spinner animacija */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



/* Stilizacija checkboxa u kontakt formi */
.checkbox-container {
    font-size: 15px;
    color: #333;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.4;
}

.checkbox-container input[type="checkbox"] {
    margin-top: 4px;
    transform: scale(1.2);
    cursor: pointer;
}

/* Footer */
footer {
    background-color: #ffffff;
    color: #333;
    text-align: center;
    padding: 20px;
    font-size: 15px;
    margin-top: 20px;
}
/* Animacija za ulazak sekcija */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-up {
    opacity: 0;
    animation: fadeUp 0.8s ease-out forwards;
}

/* Kasniji ulazak (za efekt valova) */
.fade-delay-1 {
    animation-delay: 0.2s;
}

.fade-delay-2 {
    animation-delay: 0.4s;
}

.fade-delay-3 {
    animation-delay: 0.6s;
}
.checkbox-container {
    font-size: 15px;
    color: #333;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.4;
}

.checkbox-container input[type="checkbox"] {
    margin-top: 4px;
    transform: scale(1.2);
    cursor: pointer;
}
/* Stilizacija sekcije O nama */


#o-nama h2 {
    font-size: 32px;
    text-align: left; /* Centrirani naslov */
    color: #333;
    margin-bottom: 40px;
}

#o-nama p {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px;
    text-align: justify; /* Tekst poravnat u oba smjera */
}

#o-nama strong {
    font-weight: bold;
    color: #007bff; /* Plava boja za istaknute dijelove */
}

#scrollToTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 24px;
    cursor: pointer;
    display: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
    padding-top: 6px;
}

#scrollToTopBtn:hover {
    background-color: #0056b3;
    transform: scale(1.1);
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: #222;
    color: #fff;
    z-index: 9999;
    padding: 15px 20px;
    display: none; /* Skriven dok se ne učita */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.cookie-banner .cookie-content {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    text-align: center;
}

.cookie-banner p {
    margin: 0;
    font-size: 14px;
    flex: 1;
    color: #ccc;
}

.cookie-banner a {
    color: #00aaff;
    text-decoration: underline;
}

.cookie-banner button {
    background-color: #00aaff;
    border: none;
    padding: 8px 20px;
    color: white;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.cookie-banner button:hover {
    background-color: #0077cc;
}
.h2-pomak-gore {
    margin-top: -30px !important;
}
.section2 {
background-color: #f9f9f9 !important; 

}
.buttonlink {
    text-decoration: none !important;
    color: white !important;
}

.textlink {
    text-decoration: none !important;
    color: #555 !important;
}
#show-more {
      margin-top: 20px;
      }
.float-image-wrapper {
        overflow: hidden; /* sprečava kolaps okvira */
        
    }

    .float-image-wrapper img {
        float: left;
        width: 300px;
        max-width: 100%;
        margin-right: 20px;
        margin-bottom: 10px;
    }

    .float-image-wrapper p {
        text-align: justify;
    }

    .counter-container {
      display: flex;
      gap: 40px;
      justify-content: center;
      text-align: center;
      margin-top: 40px; /* Pomaknuto da moraš skrolati do brojača */
    }

    .counter-box {
      background-color: #fff;
      padding: 20px 40px;
      border-radius: 10px;
      box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }

    .counter-number {
      font-size: 48px;
      font-weight: bold;
      color: #2c3e50;
    }

    .counter-label {
      font-size: 16px;
      color: #7f8c8d;
    }




/*======================================================*/
/* Responzivnost */

@media (max-width: 1000px) {

    #galerija .gallery.five {
        grid-template-columns: repeat(4, 1fr);
    }
}


@media (max-width: 768px) {
    .menu {
    width: 200px;
    }
    .menu-toggle {
    top: 20px;
    }
    #galerija .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    #galerija .gallery.five {
        grid-template-columns: repeat(3, 1fr);
    }

    #galerija .gallery a {
      display: block;
      margin-bottom: 10px;
      width: 100%;
    }

    #galerija .gallery img {
      height: 250px; /* Postavljamo istu visinu za sve slike */
      object-fit: cover; /* Slike će popuniti svoj kontejner bez deformacija */
      border-radius: 4px;
    }

    section {
    margin: 40px auto;  /* Razmak između sekcija */
    max-width: 768px;  /* Maksimalna širina sekcija */
    }
    form {
    /*background-color: #ffffff;*/
    margin: 0px;
    }
    header h1 {
        font-size: 24px; /* Manji font za naslove na manjim ekranima */
    }
    section {
    padding: 40px 20px;  /* Jednak padding za sve sekcije */
    }
    
}

@media (max-width: 600px) {
    #galerija .gallery.five {
        grid-template-columns: repeat(2, 1fr);
    }
  .cookie-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .cookie-content button {
    width: 100%;
    max-width: 300px;
  }

  .float-image-wrapper img {
            float: none;
            display: block;
            margin: 0 auto 15px auto;
        }
}

@media (max-width: 480px) {
    #galerija .gallery {
        grid-template-columns: 1fr;
    }
    #galerija .gallery.five {
        grid-template-columns: repeat(1, 1fr);
    }
    
}




