@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Roboto:wght@300;400;500;700&display=swap');

.services-section {
  padding: 82px 0 88px;
}

.services-section .row {
  row-gap: 28px;
}

/* Unified Garden Card style matching Home Page */
.services-section .garden-card,
.services-section .service-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  height: clamp(330px, 34vw, 400px);
  cursor: pointer;
  width: 100%;
  box-shadow: 0 18px 38px rgba(31, 43, 31, 0.12);
  isolation: isolate;
  display: block;
  text-decoration: none;
  color: #ffffff;
  background: #2b452b;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.services-section .garden-card img,
.services-section .service-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.services-section .card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 22px 20px;
  background: linear-gradient(to top, rgba(27, 48, 27, 0.98) 0%, rgba(27, 48, 27, 0.88) 60%, rgba(27, 48, 27, 0.15) 100%);
  color: #ffffff;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 136px;
  transition: padding 0.35s ease, background 0.35s ease;
}

.services-section .card-content h4,
.services-section .card-content h5,
.services-section .card-content h6 {
  font-weight: 600;
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.25;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.services-section .card-content p {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.94);
  margin: 0;
  width: 100%;
  max-width: 320px;
  transition: max-height 0.35s ease, opacity 0.25s ease;
}

/* Desktop Hover Interaction (Reveal short description smoothly over the image) */
@media (hover: hover) and (pointer: fine) {
  .services-section .garden-card:hover,
  .services-section .service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 46px rgba(27, 48, 27, 0.22);
  }

  .services-section .garden-card:hover img,
  .services-section .service-card:hover img {
    transform: scale(1.07);
  }

  .services-section .garden-card .card-content p,
  .services-section .service-card .card-content p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: calc(2 * 1.6em);
    opacity: 0.88;
  }

  .services-section .garden-card:hover .card-content,
  .services-section .service-card:hover .card-content {
    padding-top: 68px;
    background: linear-gradient(to top, rgba(27, 48, 27, 0.98) 0%, rgba(27, 48, 27, 0.92) 72%, rgba(27, 48, 27, 0.25) 100%);
  }

  .services-section .garden-card:hover .card-content p,
  .services-section .service-card:hover .card-content p {
    display: block;
    -webkit-line-clamp: unset;
    max-height: 12em;
    opacity: 1;
  }
}

/* Mobile & Touch Presentation (No hover requirement: Titles and descriptions always clearly visible) */
@media (max-width: 767.98px), (hover: none) {
  .services-section {
    padding: 50px 0 60px;
  }

  .services-section .row {
    row-gap: 20px;
  }

  .services-section .garden-card,
  .services-section .service-card {
    height: 330px;
    border-radius: 16px;
  }

  .services-section .card-content {
    padding: 16px 14px 18px;
    background: linear-gradient(to top, rgba(22, 38, 22, 0.98) 0%, rgba(22, 38, 22, 0.88) 65%, rgba(22, 38, 22, 0.15) 100%);
  }

  .services-section .card-content h4,
  .services-section .card-content h5,
  .services-section .card-content h6 {
    font-size: 17.5px;
  }

  .services-section .card-content p {
    font-size: 13.5px;
    line-height: 1.55;
    display: block;
    opacity: 0.95;
    max-height: none;
  }
}
