:root {
  scrollbar-width: none;
  /* logo colours */
  --logo-green1: #a8cf46;
  --logo-green2: #ccc43c;
  --logo-blue1: #4c548c;
  --logo-blue2: #245c8c;
  --logo-blue3: #3058a8;
  --logo-blue4: #138ed4;
  --logo-blue5: #138bd2;
  --logo-blue6: #06a5e6;
  --logo-brown: #913032;
  --logo-orange: #f4b433;
  --logo-red: #ed3237;
  /* Gradient as a CSS variable for reusability */
  --logo-gradient: linear-gradient(139deg, var(--logo-blue1), var(--logo-blue2), var(--logo-blue3), var(--logo-blue4), var(--logo-blue5), var(--logo-blue6));
}

@keyframes animatedBackground {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 100% 0;
  }
}

#animate-area {
  position: relative;
  z-index: 8;
  margin-top: 6rem;
  height: 180px;
  width: 100vw;
  background-image: url(https://davidwalsh.name/demo/bg-clouds.png);
  background-position: 0px 0px;
  background-repeat: repeat-x;
  animation: animatedBackground 40s linear infinite;
}

.container {
  margin: 1rem 1rem;
  max-width: 100%;
  padding: 2rem 8rem;
  position: relative; /* Required for parallax effect */
  overflow: hidden;
}


#animate-area h1 {
  text-align: center;
  margin: 2rem;
  color: white;
}

/* Parallax effect for the grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  transform: translateY(0);
  will-change: transform;
  transition: transform 0.2s ease-out;
}

.container:hover .grid {
  transform: translateY(-10px); /* Subtle parallax shift */
}

.card {
  background: #fff;
  margin: 1rem;
  border-radius: 20px; /* Rounded corners for the cards */
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
  transform: translateY(30px);
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card:hover {
  transform: translateY(-10px); /* Subtle hover effect */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Ensure Images are Rounded at the Top */
.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-top-left-radius: 20px; /* Match card border-radius */
  border-top-right-radius: 20px;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease;
  margin-bottom: -5px; /* Reduces spacing between image and card content */
}

.card:hover img {
  transform: perspective(800px) rotateX(10deg) rotateY(10deg) scale(1.1);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* Scroll Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card Content */
.card-content {
  padding: 3rem 1rem;
  text-align: center;
  /* border-bottom-left-radius: 20px;  */
  /* border-bottom-right-radius: 20px; */
}

.card-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--logo-blue1); /* Darker shade for better readability */
  /* margin-bottom: 10px; */
  text-transform: uppercase; /* Add emphasis */
  letter-spacing: 1px; /* Slight spacing for elegance */
  transition: color 0.3s ease;
}

.card-title:hover {
  color: var(--logo-green1); /* Highlight title on hover */
}

.card-description {
  font-size: 0.9rem;
  color: var(--logo-blue3); /* Softer shade for the description */
  margin-bottom: 15px;
  line-height: 1.6; /* Improve readability */
}

/* Styling for the cost */
.card-description .cost {
  font-size: 1.5rem;
  font-weight: bold;
  color: black;
  display: block; /* Ensures the cost appears on a new line */
  margin-top: 10px; /* Adds a bit of space between the description and the cost */
}

/* Style for the red and bigger star */
.star {
  color: var(--logo-red);
  font-size: 1.2em; /* Make the star larger */
}

.card-content span{
  font-size: 1rem;
}

.card-button {
  display: inline-block;
  text-decoration: none;
  background:  var(--logo-blue6); 
  color: #fff;
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 6px rgba(0, 123, 255, 0.4); /* Subtle shadow */
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.card-button:hover {
  background: var(--logo-green1);
  transform: translateY(-2px); /* Slight lift on hover */
  box-shadow: 0 6px 12px rgba(0, 123, 255, 0.6); /* More prominent shadow */
}

/* Responsive Media Queries */
/* Tablets (768px and below) */
@media (max-width: 768px) {

  .container{
    padding: 2rem 4rem;
  }
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px; /* Adjust spacing between cards */
  }

  .card {
    border-radius: 16px; /* Slightly smaller rounding for tablets */
    margin: 0.5rem; /* Less margin for tablets */
  }

  .card img {
    height: 180px; /* Adjust image height */
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
  }

  .card-title {
    font-size: 1.1rem; /* Slightly smaller title for better readability */
  }

  .card-description {
    font-size: 0.85rem; /* Smaller description for tablets */
  }

  .card-button {
    padding: 8px 16px; /* More compact button */
    font-size: 0.9rem; /* Smaller font for buttons */
  }
}

/* Phones (480px and below) */
@media (max-width: 480px) {
  .container{
    padding: 0;
  }
  .grid {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 10px; /* Tighter gap between cards */
  }

  .card {
    border-radius: 12px; /* Smaller rounding for phones */
    margin: 0.3rem; /* Even smaller margin */
  }

  .card img {
    height: 150px; /* Smaller image height */
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
  }

  .card-title {
    font-size: 1rem; /* Smaller font size for phone screens */
  }

  .card-description {
    font-size: 0.8rem; /* Smaller description text */
  }

  .card-button {
    padding: 6px 12px; /* Even smaller button for phones */
    font-size: 0.85rem; /* Adjust font size for mobile */
  }
}