*,
*::before,
*::after {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  list-style: none;
  list-style-type: none;
  text-decoration: none;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1rem;
  font-weight: normal;
  line-height: 1.5;
  color: #252a32;
  background: #ffffff;
}

.container {
  max-width: 80rem;
  width: 100%;
  /* padding: 4rem 2rem; */
  margin: 0 auto;
}
.img-gallery {
  padding: 10px;
}
.card-image {
  position: relative;
  /* Needed to position the icon relative to the image */
  display: inline-block;
}

.img-gallery {
  width: 100%;
  transition: all 0.3s ease-in-out;
}

.view-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 30px;
  color: rgba(255, 255, 255, 0);
  background-color: #ff3b009e;
  border-radius: 4px;
  padding: 10px;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  
}

.card-image:hover .view-icon {
  opacity: 1;
  /* Make the icon visible on hover */
  color: white;
  /* Change icon color when hovered */
}

.card-image:hover .card-image {
  border: 3px solid #ff5733;
  /* Border appears on hover */
  transform: scale(1.05);
  /* Slight zoom effect */
}

.card-image:hover .img-gallery {
  animation: borderAnimation 1s infinite alternate;
  /* Animated border effect */
}

@keyframes borderAnimation {
  0% {
      border-color: rgba(255, 255, 255, 0);
      /* Start with no visible border */
  }

  50% {
      border-color: #ff5733;
      /* Halfway, make the border visible */
  }

  100% {
      border-color: rgba(255, 255, 255, 0);
      /* End with no visible border */
  }
}
.main .container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 2rem;
  justify-content: center;
  align-items: center;
  padding: 0;
}
.main .card {
  color: #252a32;
  border-radius: 2px;
  background: #ffffff;
  box-shadow: 0 5px 20px rgba(34, 34, 34, .10);
  background-color: #f5f7e7; 
  transition: transform 0.3s ease, 0.6s ease;
}
.main .card:hover{
  background: linear-gradient(135deg, #33669B, #23376D, #F15A29, #23376D, #33669B);
  background-size: 400% 400%;
  animation: gradientAnimation 5s ease forwards;
}
.main .card .badge-text{
  font-size: 12px;
}
.main .card:hover .badge-text{
  color: white;
 
}
.main .card:hover .gallery-h6{
  color: white;
}
@keyframes gradientAnimation {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}
.main .card-image {
  position: relative;
  display: block;
  width: 100%;
  padding-top: 70%;
  background: #ffffff;
}
.main .card-image img {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media only screen and (max-width: 600px) {
  .main .container {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 1rem;
  }
}