/* Animation helpers */
.animate-delay-1 {
  animation-delay: 0.1s !important;
}
.animate-delay-2 {
  animation-delay: 0.2s !important;
}
.animate-delay-3 {
  animation-delay: 0.3s !important;
}
.animate-delay-4 {
  animation-delay: 0.4s !important;
}
.animate-delay-5 {
  animation-delay: 0.5s !important;
}

/* Custom animation keyframes */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.float {
  animation: float 5s ease-in-out infinite;
}

/* Add smooth transitions for hover effects */
#wlcm div button,
#main .content-container button,
#main .single-image span,
#products a i {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Welcome section enhancements */
#wlcm {
  position: relative;
  height: 600px;
  width: 100%;
  border-radius: 20px;
  display: flex;
  align-items: center;
  overflow: hidden; /* For parallax effect */
}

#wlcm::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(/img/wlcmBcg.png);
  background-size: cover;
  background-position: center -100px;
  border-radius: 50px;
  background-repeat: no-repeat;
  filter: brightness(0.65);
  transition: transform 0.5s ease-out;
}

#wlcm div {
  margin-left: 50px;
  z-index: 2;
}
#wlcm div h2 {
  font-size: 3.5rem;
  color: #fff;
  max-width: 600px;
  font-weight: bold;
}
#wlcm div p {
  font-size: 1.2rem;
  color: #fff;
  max-width: 600px;
}
#wlcm div button {
  background-color: #1e3759;
  color: #fff;
  font-size: 1.1rem;
  border: none;
  width: 160px;
  height: 48px;
  border-radius: 10px;
  transition: all 0.1s;
}
#wlcm div button:hover {
  background-color: #294a79;
}
#main {
  margin-top: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
#main .content-container {
  display: flex;
  align-items: end;
  background-color: #fafafa;
  border-radius: 30px;
  width: 35%;
}
#main .content-container img {
  height: 250px;
  border-radius: 30px 0px 0px 30px;
}
#main .txt-c {
  position: relative;
  top: -15px;
  margin-left: 15px;
}
#main .txt-c h3 {
  font-size: 1.4rem;
  color: #061120;
  font-weight: bold;
}
#main .txt-c ul {
  padding: 0px;
  margin: 0;
  margin-left: 22px;
}
#main .txt-c ul li {
  font-size: 1.1rem;
}

#main .content-container button {
  position: relative;
  top: -10px;
  width: 120px;
  height: 35px;
  border: 1px solid #294a79;
  background-color: transparent;
  color: #333;
  border-radius: 200px;
  transition: all 0.1s;
}

#main .content-container button:hover {
  background-color: #294a79;
  color: #fff;
}

#main .single-image {
  width: 15%;
  margin-inline: 10px;
  position: relative;
}
#main .single-image img {
  width: 100%;
  object-fit: cover;
  border-radius: 25px;
  height: 250px;
  object-fit: cover;
  transition: filter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
#main .single-image span {
  display: grid;
  place-content: center;
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 120px;
  height: 40px;
  background-color: #1e3759;
  font-size: 1.1rem;
  color: #f0f0f0;
  border-radius: 10px 10px 0px 0px;
  border: 1px solid #ffffff65;
}
#main .single-image span:hover {
  background-color: #294a79;
  cursor: pointer;
}
#products {
  display: flex;
  align-items: stretch; /* Poravnaj kartice po visini */
  flex-wrap: wrap;
}

/* Dodaj flex layout za .product */
#products .product {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  width: 31%;
  margin-inline: 15px;
  margin-top: 80px;
  /* Dodaj minimalnu visinu za poravnanje */
  min-height: 520px;
  box-sizing: border-box;
  background: #fff;
  padding-bottom: 24px;
}

#products .product img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 20px;
  transition: filter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-bottom: 12px;
}
#products h4 {
  margin-top: 14px;
  font-size: 1.7rem;
  font-weight: bold;
  margin-bottom: 10px;
}
#products p {
  color: #333;
  font-size: 1rem;
  flex: 1 1 auto; /* Paragraf zauzima preostali prostor */
  margin-bottom: 16px;
}
#products a {
  color: #1e3759;
  align-self: flex-start;
  margin-top: auto; /* Dugme ide na dno kartice */
}
#products a i {
  margin-left: 10px;
  transition: margin-left 0.2s;
}
#products a:hover i {
  margin-left: 20px;
}

@media only screen and (max-width: 1699px) {
  #main .content-container {
    width: 40%;
  }
  #main .single-image:last-child {
    display: none;
  }
  #main .single-image {
    width: 18%;
  }
}
@media only screen and (max-width: 1499px) {#products .product {
  width: 29%;
}
  #main .content-container {
    height: 230px;
  }
  #main .content-container img {
    height: 230px;
  }
  #main .single-image img {
    height: 230px;
  }
  #main .txt-c {
    margin-left: 10px;
    top: -5px;
  }
  #main .content-container button {
    display: none;
  }
}
@media only screen and (max-width: 1279px) {
  #wlcm {
    height: 500px;
  }

  #main .content-container img {
    width: 150px;
    object-fit: cover;
  }
  #main .content-container {
    width: 45%;
  }
  #main .single-image:nth-last-child(2) {
    display: none;
  }
  #main .content-container button {
    display: block;
  }
  #main .single-image {
    width: 25%;
  }
  #products .product {
    width: 46%;
    margin-inline: 10px;
    min-height: 440px;
  }
}
@media only screen and (max-width: 1023px) {
  #wlcm {
    height: 370px;
  }
  #wlcm div {
    margin-left: 25px;
  }

  #wlcm div h2 {
    font-size: 3rem;
  }
  #wlcm div p {
    font-size: 1.1rem;
  }
  #wlcm div button {
    font-size: 1rem;
    width: 140px;
    height: 46px;
  }
  #main .content-container {
    width: 450px;
    margin-bottom: 20px;
  }
  #main .single-image:nth-last-child(2) {
    display: block;
  }
  #main .single-image:last-child {
    display: block;
  }
  #main .single-image {
    margin-bottom: 20px;
    width: 30%;
  }
  #main .single-image span {
    width: 100px;
    height: 37px;
    font-size: 1rem;
  }
  #main .txt-c h3 {
    font-size: 1.2rem;
  }
  #main .txt-c ul li {
    font-size: 1rem;
  }
  #main .content-container img {
    height: 210px;
  }
  #main .content-container {
    height: 210px;
  }
  #main .content-container button {
    margin-left: 15px;
  }
  #products h4 {
    font-size: 1.5rem;
  }
  #products p {
    font-size: 0.95rem;
  }
  #products a {
    font-size: 0.95rem;
  }
}
@media only screen and (max-width: 767px) {
  #products {
    justify-content: center;
    align-items: center;
  }
  #wlcm::before {
    background-position: center center;
    border-radius: 22px;
  }
  #wlcm div h2 {
    font-size: 2.5rem;
  }
  #wlcm div p {
    font-size: 1.05rem;
  }
  #wlcm div button {
    font-size: 0.95rem;
    width: 130px;
    height: 44px;
  }
  #main {
    display: none;
  }
  #products .product {
    margin-top: 50px;
    width: 100%;
    min-height: 270px;
    padding-bottom: 16px;
    margin-inline: 0; /* Remove horizontal margins on mobile */
    max-width: 95%; /* Limit width to ensure some padding */
  }
  #products .product img {
    height: 200px;
  }
}
@media only screen and (max-width: 499px) {
  #wlcm {
    height: 400px;
  }#wlcm::before {
    border-radius: 10px;
  }
  #wlcm div {
    margin-inline: 5px;
  }
  #wlcm div h2 {
    font-size:1.8rem;
  }
  #wlcm div p {
    font-size: 1rem;
  }
  #wlcm div button {
    font-size: 0.9rem;
    width: 120px;
    height: 40px;
  }
  #products {
    flex-direction: column;
    align-items: center; /* Ensure center alignment */
    width: 100%; /* Make sure container uses full width */
    padding: 0 10px; /* Add some padding to prevent edge-to-edge content */
  }
  #products .product {
    min-height: unset;
    height: auto;
    padding-bottom: 12px;
    width: 100%; /* Full width of container */
    margin-inline: auto; /* Auto margins for centering */
    max-width: 95%; /* Prevent cards from touching screen edges */
  }
}
