/* ===== Why Choose Us Section ===== */
#why {
  padding: 0rem 2rem;
  padding-top: 1rem;
  background-color: #ffffff;
  text-align: center;
  color: #1b4332;
  box-sizing: border-box;
}

/* Section Title */
#why h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #002410;
  margin-bottom: 2rem;
  text-align: left; /* left align the heading */
  display: flex;
  margin-left: 2rem;
  align-items: center; /* align text and line */
}

/* Decorative underline */
#why h2::after {
  content: "";
  flex-grow: 1; /* take up remaining space */
  height: 2px; /* line thickness */
  background-color: #002410; /* side line color */
  margin-left: 1rem; /* space between text and line */
  border-radius: 2px;
}



/* Grid */
#why .why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

/* Card */
#why .why-card {
  background-color: #f7fdf9;
  padding: 2rem 1.5rem;
  /*border-radius: 14px;*/
  /*box-shadow: 0 4px 10px rgba(0,0,0,0.05);*/
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  text-align: center;
}

/* Icon */
#why .why-icon {
  font-size: 3rem;
  color: #2E8B57;
  margin-bottom: 1rem;
  transition: transform 0.3s ease, color 0.3s ease;
}

/* Title */
#why .why-card h3 {
  font-size: 1.2rem;
  color: #2E8B57;
  margin-bottom: 0.5rem;
  transition: opacity 0.3s ease;
}

/* Description */
#why .why-card p {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(1px);
  transition: all 0.4s ease;
}

/* Hover Effect */
#why .why-card:hover {
  background: linear-gradient(90deg, #1f633c ,#2E8B57);
  color: #fff;
  /*transform: translateY(-6px);*/
  /*box-shadow: 0 8px 20px rgba(46,139,87,0.2);*/
}

#why .why-card:hover .why-icon {
  color: #fff;
  transform: scale(1.1);
}

#why .why-card:hover h3 {
  opacity: 0; /* hide title on hover */
}

#why .why-card:hover p {
  opacity: 1; /* show paragraph */
  transform: translateY(0);
  color: #f0fdf4;
}

/* Responsive */
@media (max-width: 768px) {
  #why {
    padding: 3.5rem 1.2rem;
  }

  #why h2 {
    font-size: 1.8rem;
  }

  #why .why-icon {
    font-size: 2.5rem;
  }
}


/* ===== Scroll Ease-In for Why Cards ===== */
.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
      WHY CHOOSE US — MOBILE VIEW
============================================= */
@media (max-width: 768px) {

  /* Reduce padding on section */
  #why {
    padding: 1rem 0.5rem;
  }

  #why h2 {
    font-size: 1.8rem;
    margin-left: 1rem;
  }

  /* Turn grid into horizontal scroll */
  #why .why-grid {
    display: flex;               /* change from grid to flex */
    flex-direction: row;
    overflow-x: auto;            /* enable horizontal scrolling */
    overflow-y: hidden;
    gap: 1rem;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  /* Portrait card layout */
  #why .why-card {
    flex: 0 0 70%;               /* each card takes 70% of screen width */
    max-width: 30%;
    min-width: 30%;
    height: 280px;               /* keep portrait feel */
    scroll-snap-align: start;
    padding: 1.5rem 1rem;
    text-align: center;
  }

  /* Icon and text sizes for mobile */
  #why .why-icon {
    font-size: 4.5rem;
    margin-bottom: 0.8rem;
  }

  #why .why-card h3 {
    font-size: 1.1rem;
    margin-top: 1rem;
  }

  #why .why-card p {
    font-size: 0.95rem;
    line-height: 1.5;
  }
}

/* =============================================
      SMALL MOBILE (max-width: 480px)
============================================= */
@media (max-width: 480px) {

  #why .why-card {
    flex: 0 0 50%;
    max-width: 50%;
    min-width: 50%;
    height: 300px;
  }

  #why h2 {
    font-size: 1.6rem;
  }

 
}

#why .why-grid::-webkit-scrollbar {
  display: none;
}

#why .why-grid {
  scrollbar-width: none; /* Firefox */
}
