/* Centriranje teksta */
body {
  text-align: center;
}

/* Slideshow */
.slideshow-container {
  max-width: 300px; /* Postavi maksimalnu širinu slideshow-a */
  margin: 0 auto; /* Centriraj slideshow */
  overflow: hidden;
  position: relative;
}


.mySlides img {
  width: 100%; /* Slike će zauzeti širinu slideshow okvira */
  height: auto; /* Automatski zadrži proporcije */
  display: block;
}

.mySlides {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.mySlides.active {
  display: block;
  opacity: 1;
}

.text {
  font-family: 'Playfair Display', sans-serif;
  font-size: 18px;
  color: white;
  text-shadow: 1px 2px 2px black;
  position: absolute;
  bottom: 15px;
  width: 100%;
  text-align: center;
}

.dot {
  height: 12px;
  width: 12px;
  margin: 0 5px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s ease;
}

.active {
  background-color: #717171;
}


/* Recepti sekcija */
.service-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Kolone koje se automatski prilagođavaju */
  gap: 20px; /* Razmak između okvira */
  margin: 20px auto;
  max-width: 1200px; /* Maksimalna širina */
  padding: 0 15px; /* Unutrašnji razmak */
  box-sizing: border-box;
}

.item {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.item:hover {
  transform: translateY(-5px);
}

.item img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 8px;
}

.slika_r {
  width: 250px;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  margin: 5px;
}

.item-inner h3 {
  font-family: 'Dancing Script', cursive;
  font-size: 22px;
  color: firebrick;
  margin: 10px 0;
  line-height: 1.5;
  height: 3rem; /* Ograničava visinu naslova na dva reda */
  overflow: hidden; /* Sakriva višak teksta ako postoji */
}

.item-inner p {
  font-family: 'Gentium Basic', serif;
  font-size: 16px;
  color: #555;
  margin-bottom: 10px;
  line-height: 1.5;
  height: 4.5rem; /* Ograničava visinu na tri reda */
  overflow: hidden; /* Sakriva višak teksta */
}

.btn {
  font-family: 'Metal', sans-serif;
  font-size: 16px;
  color: white;
  background-color: firebrick;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: 15px; /* Dodaje razmak između slike i dugmeta */
}

.btn:hover {
  background-color: darkred;
}


/* Popup */
.popup-box {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.8); /* Tamna pozadina */
}

.popup-box.open {
  display: flex;
}

.popup-content {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  max-width: 80%;
  max-height: 80%;
  overflow-y: auto; /* Skrolovanje ako je sadržaj prevelik */
  text-align: center;
}

.popup-header h3 {
  margin: 0;
  font-size: 24px;
  color: firebrick;
}

.popup-body {
  font-size: 16px;
  color: #333;
  margin: 15px 0;
}


/* Responsivnost */
@media (max-width: 768px) {
 .service-items {
    grid-template-columns: 1fr; /* Jedan recept po redu */
    gap: 20px;
  }

  .item img {
    height: 150px;
  }
}
