/* =======================
   GLOBAL 
======================= */

html, body {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* =======================
   SEKCIJA USLUGE
======================= */

.services {
  background-color: #031c35;
  color: #fff;
  text-align: center;
  padding: 80px 0 40px 0;
  position: relative;
  overflow: hidden;
}

.uslugenaslov {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 60px;
  color: #ffffff;
}

/* =======================
   GRID USLUGA
======================= */

.services-grid,
.services-grid2 {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.service-box {
  background: linear-gradient(180deg, #f7f9fc 0%, #e8f0ff 100%);
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  width: 240px;
  height: 220px;
  text-decoration: none;
  color: #0a2a4d;
  transition: all 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.service-box img {
  width: 60px;
  height: auto;
  margin-bottom: 15px;
  transition: transform 0.3s ease-in-out;
}

.service-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.service-box:hover img {
  transform: scale(1.1);
}

.service-box h3 {
  color: #012a4a;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

/* =======================
   TALAS (GORNJI)
======================= */

.wave-divider {
  position: relative;
  width: 100vw;
  margin: 0;
  padding: 0;
  overflow: hidden;
  line-height: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  height: 100px;
  background-color: white; 
}

.wave-divider::before {
  content: "";
  position: absolute;
  top: 0;
  left: -2px;
  width: 4px;
  height: 100%;
  background-color: #031c35;
  z-index: 5;
}

.wave-divider svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(180deg); 
}

.wave-divider path {
  fill: #031c35;
  animation: waveMotion 6s ease-in-out infinite;
}

/* CSS animacija talasa */
@keyframes waveMotion {
  0% {
    d: path("M0,400 L0,150 C141.857,166.82 283.714,183.64 406,175 C528.285,166.35 631,132.25 733,137 C835,141.75 936.285,185.35 1054,194 C1171.714,202.64 1305.857,176.32 1440,150 L1440,400 L0,400 Z");
  }
  50% {
    d: path("M0,400 L0,150 C104.714,183.57 209.428,217.14 342,211 C474.571,204.85 635,159 774,127 C912.999,95 1030.571,76.85 1138,83 C1245.428,89.14 1342.714,119.57 1440,150 L1440,400 L0,400 Z");
  }
  100% {
    d: path("M0,400 L0,150 C141.857,166.82 283.714,183.64 406,175 C528.285,166.35 631,132.25 733,137 C835,141.75 936.285,185.35 1054,194 C1171.714,202.64 1305.857,176.32 1440,150 L1440,400 L0,400 Z");
  }
}

/* =======================
   DONJI TALAS
======================= */

.bottom-wave {
  position: relative;
  width: 100%;
  height: 120px;
  overflow: hidden;
  line-height: 0;
  background: #f6f8fc;
  margin-top: -2px;
  z-index: 1;
}

.bottom-wave svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.bottom-wave path {
  fill: #021627;
  animation: waveMotion 6s ease-in-out infinite;
}

/* =======================
   RESPONSIVE
======================= */

@media (max-width: 768px) {
  .service-box {
    width: 180px;
    height: 190px;
  }

  .uslugenaslov {
    font-size: 2rem;
  }

  .services-grid,
  .services-grid2 {
    gap: 25px;
  }

  .wave-divider,
  .bottom-wave {
    height: 80px;
  }
}

@media (max-width: 480px) {
  .service-box {
    width: 150px;
    height: 170px;
  }

  .service-box img {
    width: 50px;
  }

  .uslugenaslov {
    font-size: 1.8rem;
  }

  .wave-divider,
  .bottom-wave {
    height: 70px;
  }
}
