/* Asegurar que el padding no afecte al ancho total */
.iufor-buscador-wrapper,
.iufor-buscador-wrapper * {
  box-sizing: border-box;
}

.iufor-buscador-wrapper {
  font-family: "Outfit", sans-serif;
}

/* Formulario de búsqueda */
.iufor-search-form {
  background: #fdfdfd;
  padding: 30px;
  border-bottom: 1px solid #eee;
  margin-bottom: 40px;
}

/* Barra superior (Input texto) */
.iufor-search-top {
  position: relative;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.iufor-input-text {
  width: 100%;
  padding: 12px 40px 12px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  color: #333;
  font-family: "Outfit", sans-serif;
}

.iufor-search-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: #00bf62;
}

/* Filtros en Grid */
.iufor-search-filters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  align-items: end;
  background: #f8f9fa;
  padding: 20px;
  border-radius: 4px;
}

@media (min-width: 1200px) {
  .iufor-search-filters {
    grid-template-columns: repeat(4, 1fr);
  }
}

.iufor-filter-group {
  display: flex;
  flex-direction: column;
}

.iufor-filter-group label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 5px;
  letter-spacing: 0.5px;
}

.iufor-filter-group select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
  font-size: 14px;
  color: #333;
  font-family: "Outfit", sans-serif;
}

.iufor-filter-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 10px;
}

.iufor-btn-reset {
  background: transparent;
  border: 1px solid #00bf62;
  color: #00bf62;
  padding: 8px 24px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.3s ease;
  font-family: "Outfit", sans-serif;
}

.iufor-btn-reset:hover {
  background: #00bf62;
  color: #fff;
}

/* Grid de Resultados */
.iufor-results-container {
  width: 100%;
}

.iufor-results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
}

@media (max-width: 1024px) {
  .iufor-results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .iufor-results-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Tarjeta Investigador - NUEVO DISEÑO */
.iufor-researcher-card {
  background: #fff;
  border: none;
  border-radius: 0;
  padding: 25px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  font-family: "Outfit", sans-serif;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  min-height: 140px;
}

.ellipsis {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.iufor-researcher-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.iufor-researcher-content {
  flex: 1;
  padding-right: 15px;
  min-width: 0; /* Crucial para que flex-shrink funcione con texto largo */
}

.iufor-researcher-group-label {
  font-size: 11px;
  font-weight: 600;
  color: #444;
  line-height: 1.2;
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}

.iufor-researcher-link {
  text-decoration: none;
}

.iufor-researcher-name {
  font-size: 19px;
  font-weight: 700;
  color: #00bf62;
  margin: 0 0 10px 0;
  line-height: 1.2;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: normal;
}

.iufor-researcher-link:hover .iufor-researcher-name {
  text-decoration: underline;
}

.iufor-researcher-email {
  display: flex;
  align-items: center;
  gap: 8px;
}

.iufor-researcher-email span.dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
  color: #00bf62;
}

.iufor-researcher-email a {
  text-decoration: none;
  font-size: 13px;
  color: #00bf62;
  font-weight: 500;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-all; /* Los emails pueden ser muy largos */
}

.iufor-researcher-email a:hover {
  text-decoration: underline;
}

/* Imagen a la derecha */
.iufor-researcher-image {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  background: #f0f0f0;
  border-radius: 0;
  overflow: hidden;
}

.iufor-researcher-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.iufor-researcher-no-img {
  width: 100%;
  height: 100%;
  background-color: #eee;
}

/* Spinner */
#iufor-loading .spinner {
  visibility: visible;
}
