/* ===== Services Section ===== */
#services {
  padding: 0rem 0.3rem;
  padding-bottom: 2rem;
  background-color: #ffffff;
  text-align: center;
  color: #1b4332;
  box-sizing: border-box;
}

#services 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 */
}

/* Side line to the right of the h2 */
#services 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;
}

#services p {
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 850px;
  margin: 0 auto 1rem auto;
  color: #333;
}

/* ===== Flickity Carousel Styling ===== */
.gallery {
  background: #f4f4f4;
  margin: 0 auto;
  max-width: 90%;  /*change width here*/
}

/* Remove padding from gallery-cell top for the image */
.gallery-cell {
  width: 80%;
  height: 330px;
  margin-right: 10px;
  background: #e6f4ea;
  /*border-radius: 12px;*/
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  counter-increment: gallery-cell;
  text-align: center;
  padding: 0 0 1.5rem 0; /* only bottom padding */
  box-sizing: border-box;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.gallery-cell:hover {
  transform: translateY(-5px);
}

/* Image container fills top, left, and right edges */
.service-img {
  position: relative;
  width: 100%; /* full width */
  height: 180px;
  background-size: cover;
  background-position: center;
  /*border-top-left-radius: 12px;
  border-top-right-radius: 12px;*/
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-end; /* h3 at bottom */
  justify-content: center;
  overflow: hidden;
}

/* Keep h3 on top of image, remove background and add text shadow for readability */
.service-img h3 {
  color: #ffffff;
  /* background: rgba(0,0,0,0.4); */ /* removed */
  padding: 0.5rem 1rem;
  font-size: 2.4rem;
  border-radius: 6px;
  margin: 0 0 10px 0;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7); /* subtle shadow behind text */
}


.gallery-cell p {
  padding: 0 1rem; /* add horizontal padding for text only */
  color: #555;
  font-size: 1rem;
  line-height: 1.6;
}





/* ===== Read More Link Styling ===== */
.gallery-cell p a {
  display: inline-block;
  margin-left: 8px;
  color: #1b4332;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid #1b4332;
  padding-bottom: 2px;
  transition: 0.3s ease;
}

.gallery-cell p a:hover {
  color: #0a281b;
  border-bottom-color: #0a281b;
}


/* =============================================
      SERVICES — MOBILE (max-width: 768px)
============================================= */
@media (max-width: 768px) {

  /* Make services section fit small screens */
  #services {
    padding: 2rem 0.5rem;
  }

  /* Make the gallery full-width on mobile */
  #services .gallery {
    max-width: 100%;
    width: 100%;
  }

  /* Make each carousel cell full width */
  #services .gallery-cell {

    margin-right: 10px;
    height: auto; /* allow height to grow naturally */
    padding-bottom: 1.5rem;
  }

  /* Adjust image height for mobile */
  #services .service-img {
    height: 160px;
  }

  #services .service-img h3 {
    font-size: 1.8rem;
  }

  /* Text adjustments */
  #services .gallery-cell p {
    font-size: 0.95rem;
    padding: 0 0.8rem;
  }

  /* Heading size adjust */
  #services h2 {
    font-size: 1.8rem;
    margin-left: 1rem;
  }
}

/* =============================================
      SMALL MOBILE (max-width: 480px)
============================================= */
@media (max-width: 480px) {

  #services .service-img {
    height: 140px;
  }

  #services .service-img h3 {
    font-size: 1.6rem;
  }

  #services .gallery-cell p {
    font-size: 0.9rem;
    line-height: 1.5;
  }
    /* Heading size adjust */
  #services h2 {
    font-size: 2rem;

  }
}
