/* === NUESTROS SERVICIOS === */
/* === NUESTROS SERVICIOS FULL WIDTH === */
.phi-nuestros-servicios {
  background-color: #000;
  padding: 4rem 0;
  color: #fff;
}

.phi-titulo-seccion {
  text-align: center;
  font-size: 2.5rem;
  color: #fff;
  margin: 0 auto 3rem auto;
  border-bottom: 3px solid #f7b500;
  padding-bottom: 0.5rem;
  width: fit-content;
}

.phi-servicio-wrapper {
  display: flex;
  gap: 0;
  flex-wrap: nowrap;
  justify-content: center;
}

.phi-servicio {
  position: relative;
  overflow: hidden;
}

.phi-servicio figure {
  width: 100%;
  height: 100%;
  margin: 0;
}

.phi-servicio img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.phi-servicio-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.5); /* semitransparente */
  padding: 1.5rem;
  text-align: center;
  color: #fff;
  z-index: 1;
  max-width: 90%;
  box-sizing: border-box;
}

.phi-servicio-content h4 {
  font-size: 1.5rem;
  font-weight: bold;
  color: #f7b500;
  margin-bottom: 0.5rem;
}

.phi-servicio-content p {
  font-size: 0.85rem;
  line-height: 1.3;
  margin: 0;
}
/* ==== efectos ====== */
.phi-servicio {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.phi-servicio:hover {
  transform: scale(1.03);
  z-index: 2;
}

.phi-servicio-content {
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.phi-servicio:hover .phi-servicio-content {
  background-color: rgba(0, 0, 0, 0.7);
  transform: translate(-50%, -50%) scale(1.05);
}

/* ---- movile ------ */
@media (max-width: 1024px) and (min-width: 768px) {
  .phi-servicios-wrapper {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
  }

  .phi-servicios-wrapper .phi-servicio {
    width: calc(50% - 1rem);
    max-width: 100%;
  }

  .phi-servicio figure,
  .phi-servicio img {
    height: auto;
  }

  .phi-servicio-content {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.7);
    text-align: center;
  }

  .phi-servicio:hover {
    transform: none;
  }

  .phi-servicio:hover .phi-servicio-content {
    transform: none;
    background-color: rgba(0, 0, 0, 0.7); /* opcional: mantener el fondo al pasar el mouse */
  }
}



@media (max-width: 767px) {
  .phi-servicios-wrapper {
    display: block !important; /* forzar columna */
  }

  .phi-servicios-wrapper .phi-servicio {
    width: 90%;
    max-width: 320px;
    margin: 0 auto 2rem;
    display: block;
  }

  .phi-servicio figure,
  .phi-servicio img {
    width: 100%;
    height: auto;
    display: block;
  }

  .phi-servicio-content {
    position: relative; /* cambia de absolute/static a relative */
    top: auto;
    left: auto;
    transform: none;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.7);
    margin-top: -4px;
    text-align: center;
  }

  .phi-servicio:hover {
    transform: none; /* desactiva el hover en móvil */
  }

  .phi-servicio:hover .phi-servicio-content {
    background-color: rgba(0, 0, 0, 0.7);
    transform: none;
  }
}
