/* === SERVICES === */
body {
  background-image: url("../../assets/images/img1.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.services {
  background: #ffffff;
  padding: 2rem 6rem 4rem;
  max-width: 1100px;
  margin: 3rem auto;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.services h1 {
  font-size: 2.2rem;
  margin-bottom: 2.5rem;
  color: #15143E;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 3px solid #15143E;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.services h2 {
  font-size: 1.8rem;
  color: #15143E;
  margin: 2rem 0 1.5rem;
  border-left: 5px solid #29C86C;
  padding-left: 10px;
  text-align: left;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ===== Service Cards ===== */
.service-card {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  height: 200px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform, box-shadow;
}

/* Card images */
.service-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1) translateZ(0);
  transition: transform 0.3s ease;
  will-change: transform;
}

/* Zoom effect on hover */
.service-card:hover img {
  transform: scale(1.03);
}

/* Overlay layer for darkening images */
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  transition: background 0.3s ease;
  z-index: 1; /* below text but above image */
}

/* Lighten overlay on hover */
.service-card:hover::before {
  background: rgba(0, 0, 0, 0.2);
}

/* Card hover effects */
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Text on top of image */
.service-card h3,
.service-card p {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 95%;
  color: white;
  text-align: center;
  text-shadow: 1px 1px 6px rgba(0,0,0,0.9);
  z-index: 2; /* above overlay */
  line-height: 1.3;
}

/* Text positioning */
.service-card h3 {
  top: 15%;
  font-size: 1.3rem;
  font-weight: bold;
}

.service-card p {
  top: 35%;
  font-size: 1rem;
}

/* Hover button */
.hover-btn {
  display: none;
  position: absolute;
  bottom: 15px;
  left: 0;
  width: 100%;
  text-align: center;
  background: #29C86C;
  color: white;
  padding: 0.5rem 0rem;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
  white-space: nowrap;
  z-index: 2; /* above overlay */
}

.hover-btn:hover {
  background: #1ea75a;
}

.service-card:hover .hover-btn {
  display: inline-block;
}

/* Color accents */
.service-card.blue {
  border-top: 4px solid #1e90ff;
}

.service-card.red {
  border-top: 4px solid #e63946;
}

.service-card.blue h3 {
  color: #55aaff;
}

.service-card.red h3 {
  color: #e45a65;
}


@media (max-width: 900px) {
  .services {
    padding: 2.5rem;
  }

  .service-card {
    border-radius: 10px;
    height: 150px;
  }

  .service-card h3 {
    font-size: 1rem;
  }
}

@media (max-width: 700px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-card h3{
    font-size: 1rem;
  }
}

@media (max-width: 500px) {
  .service-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  .service-card p {
    font-size: 0.8rem;
  }
}

@media (hover: none) and (pointer: coarse) {
  .hover-btn:active {
    display: inline-block;
    position: relative;
    bottom: 0;
    background: #29C86C;
    margin-top: 0.5rem;
  }
}