/* CSS for the services area on the homepage which has 3 separate columns and individual hover over areas. */

/* Container for the three pillar cards */
.services-section {
  display: flex;
  gap: 20px;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 50px 20px;
  font-family: "Poppins", sans-serif;
}

/* Each service card wrapper */
.s-card {
  position: relative;
  flex: 1;
  height: 600px;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  /* GSAP handles the initial entrance (y and opacity) */
  opacity: 0;
  transform: translateY(30px);
  pointer-events: auto !important;
}

/* Background image inside the card */
.s-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
  opacity: 0.8;
}

/* Overlay content panel at the bottom of the card */
.s-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px; /* Hidden state showing only title */
  padding: 25px;
  box-sizing: border-box;
  transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Theme-specific overlay background colors */
.s-card.social .s-content {
  background: rgba(70, 130, 180, 0.9);
}
.s-card.creation .s-content {
  background: rgba(76, 175, 80, 0.9);
}
.s-card.optimization .s-content {
  background: rgba(236, 135, 33, 0.9);
}

/* Title styling inside overlay */
.s-content h3 {
  margin: 0;
  color: #fff;
  font-size: 28px;
  font-weight: 400;
  font-family: "Lora", serif;
}

/* Description text hidden until hover */
.s-description {
  margin-top: 20px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.4s ease;
  font-size: 19px;
  line-height: 1.5;
}

/* Hover behavior for desktop */
.s-card:hover .s-content {
  height: 80%;
}

.s-card:hover .s-description {
  opacity: 1;
  transition-delay: 0.2s;
}

.s-card:hover img {
  transform: scale(1.1);
}

/* Responsive layout adjustments for medium screens */
@media screen and (max-width: 1100px) {
  .s-card {
    width: 32%;
  }
  .services-section {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0px;
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 20px;
  }
  .s-card.active-mobile .s-content {
    height: 85% !important;
  }
  .s-content {
    height: 110px;
  }
  .s-card.active-mobile .s-description {
    opacity: 1;
    transition-delay: 0.2s;
    font-size: 17px;
  }
}

/* Mobile layout tweaks */
@media (max-width: 768px) {
  .services-section {
    flex-direction: column;
  }
  .s-card {
    flex: none;
    width: 100%;
    height: 500px;
  }

  .s-card.active-mobile h3 {
    margin: 0 !important;
  }
  .s-card .s-content {
    padding: 10px !important;
  }
  .s-card.active-mobile .s-content {
    height: 80% !important;
  }
  .s-card.active-mobile .s-description {
    opacity: 1;
    transition-delay: 0.2s;
    font-size: 16px;
  }
  .s-card.active-mobile img {
    transform: scale(1.1);
  }
}
