* {
  padding: 0;
  margin: 0;
}

.portada-servicios {
  width: 100%;
}

.services {
  width: 73%;
  margin: auto;
  padding: 45px 0 70px;
}

.sectionTitle{
  color: #00B0B9;
  font-size: 26px;
  font-weight: 400;
  line-height: 31.69px;
  text-align: center;
  text-transform: uppercase
}

.container-services {
  display: grid;
  gap: 3%;
  row-gap: 5%;
  grid-template-columns: repeat(3, 1fr);
  justify-items: center;
  justify-content: space-between;
  margin-top: 45px;
}

.service {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 16px;
  width: 100%;
  height: auto;
  cursor: pointer;
  transition: all 0.5s ease-in-out;
}

.service figure {
  margin: 0;
  padding: 0;
  position: relative;
  width: 100%;
  height: auto;
}

.service img {
  overflow: hidden;
  display: block;
  position: relative;
  height: 100%;
  width: 100%;
  margin-top: 0;
  aspect-ratio: 1;
  -o-object-fit: cover;
  object-fit: cover;
  border-radius: 16px;
  filter: brightness(80%);
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #00b0b9;
  /* Fondo celeste */
  display: none;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  opacity: 0;
  transition: opacity 0.5s, transform 0.5s;
  transform: translateY(100%);
}

.show-more {
  display: none;
  font-size: 13px;
  font-weight: 400;
  line-height: 17.07px;
  text-align: left;
  overflow-y: auto;
  max-height: 85px;
  margin-block: 18px;
  padding-right: 5%;
}

.show-more::-webkit-scrollbar {
  width: 3px;
}

.show-more::-webkit-scrollbar-track {
  background: transparent;
}

.show-more::-webkit-scrollbar-thumb {
  background: #dbdbdbe3;
}

.service.open .overlay {
  opacity: 1;
  transform: translateY(0);
  display: flex;
}

.service.open .show-more {
  display: inline-table;
  animation: slide-up 0.5s forwards;
}

.service.closing .show-more {
  animation: slide-down 0.5s forwards;
}

@keyframes slide-up {
  from {
    transform: translateY(30%);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes slide-down {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(30%);
  }
}

.text-service {
  position: absolute;
  bottom: 0;
  left: 0;
  height: auto;
  width: 100%;
  box-sizing: border-box;
  padding: 26px;
  border-radius: 16px;
  color: white;
  background: linear-gradient(180deg, rgb(0 0 0 / 0%) 0%, rgb(0 0 0 / 62%) 100%);
}

.service.open .text-service {
  background: unset;
  box-sizing: border-box;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
}

.titleCont {
  height: auto;
}

.text-service h2 {
  font-family: Montserrat;
  font-size: 18px;
  font-weight: 600;
  line-height: 19.24px;
  text-align: left;
  color: white;
  min-height: 22px;
  width: 90%;
}

.text-service p.serviceBtn {
  padding: 5px 0px;
  color: white;
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  line-height: 13.9px;
  text-align: left;
  margin-top: 5px;
  position: relative;
  float: left;
  width: auto;
  height: auto;
  cursor: pointer;
}

a.serviceBtn {
  display: block;
  color: white;
  background-color: #00b0b9;
  width: calc(31% - 80px);
  padding: 20px 40px 20px 40px;
  border-radius: 41px;
  margin: 0 auto;
  margin-top: 60px;
  text-align: center;
  cursor: pointer;
}

a.serviceBtn:hover {
  font-weight: bold;
}

@media screen and (max-width: 768px) {
  .services {
    padding: 4% 0;
    width: 92%;
  }

  .container-services {
    display: flex;
    flex-direction: column;
  }

  .text-service h2 {
    width: 85%;
  }

  .service,
  .service-kids {
    margin-bottom: 20px;
    width: 100%;
  }

  a.serviceBtn {
    width: calc(100% - 80px);
    margin-top: 0px !important;
  }
}

@media screen and (max-width: 1100px) {
  .container-services {
    grid-template-columns: repeat(2, 1fr);
  }

  .lineEffectCenter:hover::before {
    width: 100%;
    left: 0%;
  }

  .lineEffectCenter::before {
    bottom: 0px;
  }

  .lineEffectCenter::before {
    content: "";
    background: white;
    height: 1px;
    width: 0%;
    position: absolute;
    left: 50%;
    -webkit-transition: left 0.4s cubic-bezier(0.4, 0, 1, 1), width 045s cubic-bezier(0.4, 0, 1, 1);
    -o-transition: left 0.4s cubic-bezier(0.4, 0, 1, 1), width 0.4s cubic-bezier(0.4, 0, 1, 1);
    transition: left 0.4s cubic-bezier(0.4, 0, 1, 1), width 0.4s cubic-bezier(0.4, 0, 1, 1);
  }
  a.serviceBtn {
    width: calc(100% - 80px);
    margin-top: 40px;
  }
}
