/************************************ LLISTAT D'INVESTIGADORS ****************************************/
body {
  background-color: #ffffff !important;
  font-family: "Muli", sans-serif !important;
}

.page-title {
  padding: 40px;
  color: #66a1bc;
  font-size: 28x;
  font-weight: 600;
  font-family: "Muli", sans-serif;
  margin: 25px 0;
}

.titol-container {
  padding: 0rem;
  max-width: 1200px;
  margin: 35px auto;
  background-color: #f9f9f9;
}

.inves-title {
  position: relative;
  padding: 40px;
  color: #66a1bc;
  font-weight: 600;
  font-family: "Muli", sans-serif;
  top: -25px;
}

.investigadors-container {
  max-width: 1200px;
  background-color: #f9f9f9;
  margin-bottom: 50px;
  top: 15px;
  padding: 25px;
}

.investigadors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 115px 85px;
  padding: 40px;
  background-color: #f9f9f9 !important;
}

.investigador-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 300px;
  height: 325px;
  top: 50px;
}

.investigador-card:hover {
  transform: translateY(-5px);
  box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.15);
}

.investigador-imatge-container {
  text-align: center;
  top: -90px;
  position: relative;
}

.investigador-imatge-circular {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid #f5f5f5;
  margin: 0 auto;
}

.investigador-imatge-circular.sense-imatge {
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: bold;
  color: #555;
}

.investigador-info {
  position: relative;
  text-align: center;
  /* padding: 5px; */
  /*   width: 300px;
  height: 300px; */
  top: -90px;
}

.investigador-nom {
  margin: 0.5rem 0.5rem;
  color: #66a1bc;
  font-size: 26px;
  font-weight: 700;
}

.investigador-posicio {
  color: #333333;
  /*   font-size: 0.9rem;
  margin: 0.5rem 0 1rem 0; */
  line-height: 1.2;
  font-weight: 600;
  margin-left: 5px;
  margin-right: 5px;
}

.investigador-estudis {
  font-weight: 700;
  margin-top: 8px;
  margin-bottom: -15px;
  color: #808080;
  font-size: 14px;
}

.investigador-preferencies {
  margin-top: 0.8rem;
  font-size: 14px;
  color: #555;
  /* display: flex; */
  flex-wrap: wrap; /* per passar a una nova línia si cal */
  padding: 4px;
}

.investigador-preferencies strong {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.investigador-preferencies p {
  margin: 0;
  line-height: 1.4;
}

.investigador-preferencies ul {
  list-style: none;
  margin: 0;
  padding: 0;
  /*   display: flex; */
  flex-wrap: wrap;
  gap: 0.5rem;
}

.investigador-preferencies li {
  display: inline;
  /*   margin-right: 0.5rem; */
  white-space: nowrap;
}

/* Afig el separador al FINAL de cada item, excepte l'últim */
.investigador-preferencies li.has-sep::after {
  content: "\00a0–"; /* NBSP + guionet, mai apareix al principi de línia */
}
.investigador-enllac {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  cursor: pointer;
}

/******************************************************  RESPONSIVE MOBILE **********************************/

@media (max-width: 768px) {
  .investigadors-grid {
    grid-template-columns: 1fr;
    gap: 40px 20px;
    padding: 20px 10px;
  }

  .investigador-card {
    width: 100%;
    height: auto;
    top: 25px;
    margin-bottom: 50px;
  }

  .investigador-info {
    width: 100%;
    height: auto;
    top: -80px;
    padding: 20px;
  }

  .investigador-imatge-container {
    top: -70px;
  }

  .investigador-imatge-circular {
    width: 130px;
    height: 130px;
  }

  .investigador-nom {
    font-size: 1.2rem;
  }

  .investigador-posicio,
  .investigador-preferencies {
    font-size: 0.85rem;
  }

  .titol-container,
  .investigadors-container {
    padding: 15px;
  }

  .page-title {
    padding: 20px;
    font-size: 22px;
  }

  .inves-title {
    padding: 20px;
    font-size: 22px;
  }
}
